AgentSkillsCN

findertags

通过命令行读取、添加、删除、替换或清空macOS Finder中文件与目录的标签。当用户希望通过颜色标签整理文件、查询某一路径上有哪些标签、对项目文件夹进行批量打标,或统计整个目录树中各标签的使用频率时使用。该功能兼容任何与Finder兼容的标签。

SKILL.md
--- frontmatter
name: findertags
description: >
  Read, add, remove, replace, and clear macOS Finder tags on files and directories from the command line.
  Use when the user wants to organize files with color tags, query which tags are on a path, bulk-tag
  project folders, or list tag frequencies across a directory tree. Works with any Finder-compatible tag.

findertags

Read and modify macOS Finder tags from the command line.

Install

bash
brew install aayush9029/tap/findertags

Usage

bash
# Read tags on a file
findertags read ~/Documents/report.pdf

# Include paths with no tags
findertags read --verbose ~/Desktop/file.txt ~/Desktop/other.txt

# Add tags (positional args, not flags)
findertags add ~/project Work Important

# Replace all tags on a file
findertags write ~/file.txt Archive

# Remove specific tags
findertags remove ~/file.txt Draft

# Clear all tags
findertags clear ~/file.txt

# List tag frequencies across paths
findertags list ~/Documents

# JSON output
findertags read --format json ~/Documents/report.pdf

Subcommands

CommandDescription
readRead tags for one or more paths
writeReplace tags on a path
addAdd tags without duplicating existing ones
removeRemove one or more tags from a path
clearRemove all tags from a path
listList tag frequencies across paths