{"id":13584261,"url":"https://github.com/manufac-tech/macOS-utilities-Finder-Tags-via-Keystroke","last_synced_at":"2025-04-07T01:31:51.230Z","repository":{"id":178768906,"uuid":"104413728","full_name":"manufac-tech/macOS-utilities-Finder-Tags-via-Keystroke","owner":"manufac-tech","description":"Tag macOS Finder items via keyboard shortcut","archived":false,"fork":false,"pushed_at":"2017-10-14T05:03:39.000Z","size":412,"stargazers_count":21,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-06T01:39:47.956Z","etag":null,"topics":["automator","automator-workflow","finder","finder-tags","keyboard-shortcuts","macos","tagging","tags"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manufac-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-22T00:50:47.000Z","updated_at":"2024-10-27T10:00:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ef7b1d5-796a-4085-a353-b73226f9eab5","html_url":"https://github.com/manufac-tech/macOS-utilities-Finder-Tags-via-Keystroke","commit_stats":null,"previous_names":["manufactured/macos-utilities-finder-tags-via-keystroke","manufac-tech/macos-utilities-finder-tags-via-keystroke"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manufac-tech","download_url":"https://codeload.github.com/manufac-tech/macOS-utilities-Finder-Tags-via-Keystroke/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247577994,"owners_count":20961214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automator","automator-workflow","finder","finder-tags","keyboard-shortcuts","macos","tagging","tags"],"created_at":"2024-08-01T15:04:07.601Z","updated_at":"2025-04-07T01:31:46.214Z","avatar_url":"https://github.com/manufac-tech.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# Assign macOS Finder Tags via Keystroke  \nUse keyboard shortcuts to assign tags to items in macOS Finder.  \nI have tried intermittently to enable this functionality since Mavericks, and was extremely happy to get this working last year.  I post this on the off chance that anyone else has an irrational need to have \"keystroke = tag\" capability.  \n\n### Made possible by the \"tag\" command    \nPortland's own [James Berry](https://github.com/jdberry) made a very useful command line tool (_[tag](https://github.com/jdberry/tag)_) that can, among other things, add/remove tags to/from Finder items.  \n\n- It can add tags:  \n\t`tag -a YourTagHere`  \n\n- It can remove tags:  \n\t`tag -r YourTagHere`\n\nMore in the _tag_ [README](https://github.com/jdberry/tag).  \n\n### Automator workflow (saved as a Service)\nThe example Automator workflows I have included here are one way to trigger _tag_ to act on the selected finder items via keyboard shortcut. (This functionality is probably available using LaunchBar, Alfred, Keyboard Maestro, etc., but I wanted to assign tags via keyboard w/o needing any other apps running.)  \n\n\n#### Running Shell Scripts from keyboard shortcuts  \nThe _tag_ command is used in a tiny Bash script. Note: The Automator action requires including the path to the command.\n\n    for f in \"$@\"  \n    do  \n    /usr/local/bin/tag -a YourTagHere \"$f\"  \n    done  \n\n1. The Bash script is contained in an Automator action in a workflow  \n2. The workflow is saved as a macOS Service  \n3. A keyboard shortcut is assigned to the Service  \n\nNote: Services can be assigned a keyboard shortcut in _System Preferences -\u003e Keyboard -\u003e Shortcuts -\u003e Services._  \n\n### Toggling a tag on or off (on an item)  \nI currently toggle a \"flag\" tag in the most simple manner:  \n1. \"cmd-shift-L\" ADDS the \"flag\" tag  \n2. \"cmd-opt-shift-L\" REMOVES the \"flag\" tag.  \n\nFurther ideas: It could be useful in some circumstances to:\n1. Read the state of the tag on the file  \n2. Use a _single_ key command to toggle that state.  \n\n### Note: Setting up _tag_ using homebrew in macOS terminal  \nRequirements (from the [readme.md](https://github.com/jdberry/tag/blob/master/README.md))  \n1. 10.9 Mavericks and above  \n2. You must have Xcode or the Command Line Tools installed to build/install.  \n\nInstallation of _tag_  \n1. Install [Homebrew](https://github.com/Homebrew/brew/) on your Mac.  \n2. Install the _tag_ package via the command line.  \n`brew install tag`  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanufac-tech%2FmacOS-utilities-Finder-Tags-via-Keystroke/lists"}