Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 2.19 KB

cli.md

File metadata and controls

38 lines (28 loc) · 2.19 KB

Command line reference

petsitter's flags and the pet subcommands.

← back to the README


CLI Options

Option Short Description
--config -c Path to a config file (e.g., another_petsitter_config.conf.json) or a config directory (anything without a file extension; its config is config.json). Defaults to $PET_CONFIG_DIR if set, else ~/.config/petsitter. Tricksets live in <base>/tricksets.
--listen -l Host:port to listen on (default: localhost:8080). 0.0.0.0:8080 lets other machines use it
--no-browser Don't open the dashboard in a browser on startup (it isn't opened over SSH or without a display anyway)
--version -v Show version and exit

LOGLEVEL (e.g. LOGLEVEL=DEBUG) sets how much petsitter logs. To pick up config files edited by hand without restarting, POST /readconfig.

pet subcommands

pet edits the same JSON files the dashboard writes, so the two always agree and neither needs the server running. pet --help lists everything; the ones worth knowing:

Command What it does
pet ts List tricksets; pet ts <name> for detail, pet ts <name> <trick> <param> <value> to set one
pet tricks List available local trick modules
pet add / pet rm Add or remove a trick from a trickset
pet search [query] Search the community index
pet cat <owner>/<name> Print a community trick's source without installing it
pet install <owner>/<name> Install from the index (a bare name instead runs a local trick's install() hook)
pet installed List tricks installed from the index
pet publish <trick> Publish a trick to the index
pet model Show or set model config; pet model _default > f.json / cat f.json | pet --import model backs up and restores the whole modelset
pet agents list, register, unregister coding tools; pet agents restore puts every tool's config back if petsitter was killed without cleaning up
pet examples Install the example tricksets
pet status Config dir, model, and each trickset's enabled tricks