0.0.8 • Published 8 years ago
watchpaths v0.0.8
Install
npm install -g watchpaths
Features
create LaunchAgents with **WatchPaths**
- custom arguments
- export variables: $PLIST, $WATCHPATHS
- launchctl commands - list, load, unload
Usage
usage: WatchPaths COMMAND [options]
Available commands:
create create .plist
find find .plist files
list launchctl list
load launchctl load
unload launchctl unload
rm rm .plist files
run `WatchPaths help COMMAND` for more infos
Example
$ WatchPaths add "$path" "$@"
$ WatchPaths find
~/Library/LaunchAgents/.WatchPath.path1.plist
~/Library/LaunchAgents/.WatchPath.path2.plist
# launchctl commands
$ WatchPaths load
+ launchctl load ~/Library/LaunchAgents/.WatchPath.path1.plist
+ launchctl load ~/Library/LaunchAgents/.WatchPath.path2.plist
$ WatchPaths list
pid 0 WatchPath.path1
pid 0 WatchPath.path2
$ WatchPaths unload
+ launchctl unload ~/Library/LaunchAgents/.WatchPath.path1.plist
+ launchctl unload ~/Library/LaunchAgents/.WatchPath.path2.plist
$ WatchPaths rm
+ ~/Library/LaunchAgents/.WatchPath.path1.plist
+ ~/Library/LaunchAgents/.WatchPath.path2.plist
Structure
~/Library/LaunchAgents
│ .WatchPaths.path1.plist
│ .WatchPaths.path2.plist
.WatchPaths.path.plist:
<key>Label</key>
<string>WatchPaths.path</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/WatchPaths</string>
<string>run</string>
<string>~/Library/LaunchAgents/.WatchPaths.path.plist</string>
<string>arguments</string>
</array>
<key>WatchPaths</key>
<array>
<string>path</string>
</array>
Sources:
- bin/WatchPaths-rm
- bin/WatchPaths-load
- bin/WatchPaths-create
- bin/WatchPaths-unload
- bin/WatchPaths-run
- bin/WatchPaths-find
- bin/WatchPaths
0.0.8
8 years ago