CloudCart CLI
AI-first command-line tool for managing CloudCart stores via the GraphQL Admin API.
The CloudCart CLI (cloudcart) lets you query, explore, and manage your store directly from the terminal. It is built AI-first: every command supports structured output (--json, --compact-output), and built-in commands like describe and llms-context give AI assistants everything they need to operate your store autonomously.
# Ask your store anything
cloudcart app execute --query '{ generalSettings { siteName } }' --jsonWhat you can do
| Area | Commands | What it does |
|---|---|---|
| GraphQL execution | app execute | Run queries and mutations inline, from files, or piped via stdin |
| Schema exploration | app schema | Search types and fields without loading the full schema |
| Query validation | app validate | Catch typos and invalid fields before executing |
| Authentication | auth login / logout / status | PAT and JWT auth with secure keychain storage |
| Headless storefronts | nitrogen * | Scaffold, develop, and deploy Nitrogen storefronts |
| AI integration | describe, llms-context | Self-describing commands and built-in LLM context |
Install
brew tap cloudcart/tap
brew install cloudcartnpm install -g @cloudcart/cli@latestpnpm add -g @cloudcart/cli@latestyarn global add @cloudcart/cli@latestbun add -g @cloudcart/cli@latestRequires Node.js 20+ for the npm-based installs. Verify the installation:
cloudcart --versionQuickstart
1. Create a Personal Access Token
In your store admin, open Settings → PAT Tokens and click Create Token. Choose Read Only to start — you can create a Full Access token later when you need mutations.
Follow the step-by-step PAT guide if this is your first time.
2. Authenticate
# Option A: environment variables (recommended for CI and AI agents)
export CLOUDCART_CLI_TOKEN=cc_pat_your_token
export CLOUDCART_CLI_STORE=mystore.cloudcart.com
# Option B: interactive login (stores the token in your OS keychain)
cloudcart auth login3. Run your first query
cloudcart app execute --query '{ products(first: 5) { edges { node { id name pricing { from to } } } pageInfo { total } } }'4. Explore the schema
# Find everything related to orders — without downloading the full schema
cloudcart app schema --search order --compact5. Validate before you execute
cloudcart app validate --query '{ products(first: 5) { edges { node { id nmae } } } }'
# ✗ Cannot query field "nmae" on type "Product". Did you mean "name"?Working with an AI assistant?
Run cloudcart llms-context and paste the output into your AI tool — or better, connect the CloudCart Dev MCP server so your assistant can search and validate against the live schema automatically. See Using the CLI with AI agents.
Next steps
- Authentication — PATs, JWT, keychain storage, multiple stores
- Command reference — every command and flag
- Using with AI agents —
--json,describe,llms-context - Nitrogen storefronts — headless commerce with Git-based deploys