Requirements
- Node.js 20 or newer
- An npm-compatible package manager
Install
chainpatrol binary. Verify it:
The npm package is
@chainpatrol/cli. The unscoped chainpatrol package on npm is a
placeholder for the JavaScript SDK and does not contain the CLI.Upgrading
--json and --quiet
mode so it can never corrupt machine-readable output, and it never delays your command by
more than half a second.
Configuration
Configuration lives inconfig.json inside the CLI’s config directory:
$XDG_CONFIG_HOME/chainpatrol/(defaults to~/.config/chainpatrol/)~/.chainpatrol/is still used if it already exists and the XDG directory does not$CHAINPATROL_CONFIG_DIRoverrides both
~/.config/chainpatrol/config.json
Setting a default organization
Most organization-scoped commands take--org <slug>. Passing it saves the slug as your
default, so later commands can omit it:
1
--org flag
An explicit
--org <slug> always wins, and is written back to config.json.2
Saved default
defaultOrg from config.json.3
Environment variable
CHAINPATROL_ORG, useful in CI where you do not want to write a config file.Organization required. Use --org <slug> to specify one. and exit code
3.
Environment variables
Shell completions
chainpatrol setup installs completions for you. To write the script yourself: