Add color tags to files and folders on Mac OS X
Note: this module currently only supports color tags on OS X. Support for adding/setting/getting all tags may come in the future. Pull Requests for this are welcome.
$ npm install --global finder-tag
$ finder-tag --help
Easily add color tags to files and folders on Mac OS X
Usage
$ finder-tag [path] [color]
Available Colors:
`gray`, `green`, `purple`, `blue`, `yellow`, `red`, `orange`
To clear all tags pass `clear` as the color
Examples
$ finder-tag ~/Desktop blue
/Users/dave/Downloads is tagged `blue`
$ finder-tag app.js yellow
/root/site/scripts/app.js is tagged `yellow`
$ finder-tag app.js clear
/root/site/scripts/app.js all tags have been cleared
$ npm install --save finder-tag
const finderTag = require('finder-tag');
finderTag('/some/path', 'blue').then(
(result) => console.log(result)
// { code: 0,
// command: 'xattr ...',
// path: '/some/path',
// tag: 'blue' }
);
Type: string
The filesystem path to apply the tag to.
Type: string
Available Colors:
- 'gray'
- 'green'
- 'purple'
- 'blue'
- 'yellow'
- 'red'
- 'orange'
- 'clear' - This will remove all tags
MIT © DaveJ