0.0.8 • Published 8 years ago

watchpaths v0.0.8

Weekly downloads
6
License
-
Repository
github
Last release
8 years ago

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

Examples/

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:

Feedback GitHub issues Join the chat at https://gitter.im/russianidiot/WatchPaths.sh.cli GitHub followers


0.0.8

8 years ago