CLI reference
The cavalry binary is distributed as @cavalry/cli on npm. Install globally:
npm install -g @cavalry/cli
cavalry --helpConfiguration
Resolution order (first match wins):
--url/--tokenflags./cavalry.jsonin the current directory or any ancestorCAVALRY_URL/CAVALRY_TOKENenv vars~/.cavalry/config.json
Commands
login
cavalry login --url https://cavalry.company.com --token cav_...Saves credentials to ~/.cavalry/config.json.
logout
cavalry logoutwhoami
Shows the active gateway + token prefix.
init
Creates a cavalry.json in the current directory — used by publish for installable project metadata.
publish [path]
cavalry publish ./my-skillPacks the directory into a tarball and uploads it to your org's private registry. Requires a token with scope skills:write.
install <ref>
cavalry install acme/kafka-wrapper # internal
cavalry install tessl:stripe/stripe # upstream
cavalry install tessl:stripe/stripe@^2.0.0 # semver rangeStreams the artifact into .cavalry/skills/<ns>/<name>. Exit codes:
0— installed2— hard deny by policy (seecavalry policy list)3— pending approval (retry after approval is decided)1— other errors (network, invalid ref, etc.)
policy list
cavalry policy list [--json]Shows active policies from the gateway's /v1/policies endpoint.
doctor
Basic config + connectivity check.
Environment variables
| Variable | Purpose |
|---|---|
CAVALRY_URL | Gateway URL (takes precedence over config) |
CAVALRY_TOKEN | API token, hashed at rest server-side |