macOS Finder scripts


Keywords
Finder, applescript, cli, macos
License
Unlicense
Install
pip install mac-finder==2019.6.25

Documentation

Travis

Installation

$ [sudo] npm i -g mac-finder
$ [sudo] pip install mac-finder

Scripts usage

command usage
finder usage: finder command [args]
finder-alias usage: finder-alias source target
finder-close-bg usage: finder-close-bg
finder-close-duplicates usage: finder-close-duplicates
finder-comment usage: finder-comment path [comment]
finder-exec usage: finder-exec command [args ...]
finder-frontmost usage: finder-frontmost
finder-icon usage: finder-icon path image
finder-reveal usage: finder-reveal path
finder-selection usage: finder-selection

Examples

create Finder alias

$ finder-alias ~/Downloads ~/Downloads2

read/write Finder comment

$ finder-comment path "comment value"
$ finder-comment path
comment value

set Finder icon

$ finder-icon path image.png
$ finder-reveal ~/git

get Finder selection

$ finder-selection
/Users/username/Desktop
/Users/username/Downloads

execute command from every selected Finder directory

$ finder-exec python setup.py install

frontmost (1 or 0)

$ finder-frontmost
0

python-readme-generator