kusty command reference
Every kusty command, global flag, environment variable, error code and exit code, plus the resource commands generated from the Kustomer API.
This page is the complete surface of the public kusty build. kusty can describe itself too: kusty schema dump prints every command, flag and example as JSON, and kusty <command> --help --json prints one command's manifest.
Commands
Global flags
These work on every command.
api flags
Resource commands accept --data, --field and --query too.
Field paths
--fields (what to keep) and --field (what to send) share one syntax:
Missing objects and arrays are created when writing. Wildcards and queries (*, ?, #, @, |) aren't supported.
Envelopes
{ "schema_version": "1", "data": {}, "meta": { "request_id": "…", "duration_ms": 0, "next_cursor": "…" }, "warnings": [] }{ "schema_version": "1", "error": { "code": "NOT_FOUND", "message": "…", "hint": "…", "retryable": false } }A successful response that isn't JSON (text or CSV) is returned as a string in data with a NON_JSON_BODY warning.
Exit codes
kusty api GET "/v1/customers/email=$EMAIL" --fields id > customer.json
case $? in
0) jq -r .data.id customer.json ;;
4) echo "no customer with that email" ;;
3) echo "run: kusty auth login" >&2; exit 1 ;;
*) jq -r .error.hint customer.json >&2; exit 1 ;;
esacError codes
New codes may be added; existing codes never change meaning.
Resource commands
Resource commands are generated from the public API reference: one subcommand per operation, with path and query parameters as flags. Parameter names keep their spelling (--pageSize, --evaluationId), brackets are dropped and dots become dashes (page.size becomes --page-size). A parameter that collides with a global flag gets a q- prefix: the fields query parameter is --q-fields, because --fields always means output projection.
kusty customers --help # list subcommands
kusty customers get-by-email --help --json # exact flags and body schema
kusty customers get-by-email --email sam@example.com
kusty evaluations runevaluation --evaluationId 6716c1d2c4e5f60012ab36ea --data '{"runsPerTestCase":3}'Destructive operations need --confirm --yes, the same as kusty api DELETE.