Command-line access to Chift
The Chift CLI gives developers and AI agents a terminal-first way to discover Chift API operations, inspect required inputs, and call Unified API endpoints with structured output. Chift’s API is organized around consumers, connections, integrations, and Unified APIs such as accounting, POS, ecommerce, invoicing, banking, payment, and PMS. The CLI keeps those concepts close to the terminal: most API commands follow the same grouped structure as the API reference and use theconsumer_id as the route context when an endpoint acts on a specific consumer.
Agent-friendly execution
Return structured JSON or YAML and keep responses focused for smaller AI context.
Open source
View the source, report issues, or contribute on GitHub.
Installation
Configure authentication
Save your Chift account ID, client ID, and client secret once. The CLI validates the credentials by fetching an access token. Missing values open an interactive terminal form.You can also pass credentials directly for non-interactive use:
Agent skill
The CLI ships with an agent skill that teaches coding agents how to drive it. Install the skill with theskills CLI:
Discovering and calling endpoints
Inspecting endpoint inputs
Use--schema or --next to see the merged input schema before calling an endpoint. Unknown parameters are rejected before any request is sent.
Passing inputs
consumer_id is route context. Set it once via environment variable or pass it as the first positional argument:
KEY=VALUE positional values or with --param:
Posting data
ForPOST and PATCH operations, pass a JSON body with --json or use KEY=VALUE pairs. Mutating operations require --force.
Output and filtering
API commands return JSON by default. Use--output yaml for YAML, or --debug to write debug logs to stderr.
--fields keeps only selected fields from the response. --filter filters list responses client-side. For paginated responses both are applied to the items array. Pagination uses the API’s own page and size query parameters.
Environment variables
Environment variables are loaded at startup via a.env file or shell exports.
| Variable | Description | Default |
|---|---|---|
CHIFT_CONSUMER_ID | Default consumer, avoids passing consumer_id on every command | — |
CHIFT_ALLOWED_OPERATIONS | Comma-separated list of allowed operation classes: read, write, dangerous, all | all |
CHIFT_SHOW_PLATFORM_ENDPOINTS | Show consumers, integrations, and connections endpoint groups | false |
CHIFT_SHOW_INTERNAL_ENDPOINTS | Show general, datastores, syncs, issues, m-c-p, and webhooks endpoint groups | false |
Restricting operations
SetCHIFT_ALLOWED_OPERATIONS to limit which operation classes the CLI executes for business vertical endpoints. This is particularly useful for AI agents that should only read data.
GET/HEAD/OPTIONS are read, POST/PATCH are write, and DELETE is dangerous. Platform and internal endpoint groups keep their full command set regardless of this setting.
Schema cache
The command tree is generated from the OpenAPI schema. The CLI fetches and caches the schema automatically on first use. Refresh it manually when needed:Why it helps AI workflows
AI coding tools work best when they can discover capabilities, inspect schemas, and receive compact structured output. The Chift CLI supports that workflow by:- Discovering available Chift API operations from the terminal
- Guiding agents step-by-step with
--nextat any command level - Inspecting the inputs required by an endpoint before sending a request
- Returning JSON by default, with YAML available when needed
- Reducing large responses with
--fieldsand--filter - Restricting operations with
CHIFT_ALLOWED_OPERATIONSso agents only perform safe actions - Requiring
--forcefor mutating operations such asPOST,PATCH,PUT, andDELETE