Command Reference
Every CloudCart CLI command, flag, and example in one place.
All commands support --help. Commands that output data support --json (raw JSON, no colors) and --compact-output (minified JSON — saves tokens when the consumer is an LLM).
Store queries
cloudcart app execute
Execute a GraphQL query or mutation against the Admin API.
# Inline query
cloudcart app execute --query '{ products(first: 5) { edges { node { id name pricing { from to } } } pageInfo { total } } }'
# From a file
cloudcart app execute --file query.graphql
# Piped via stdin
echo '{ generalSettings { siteName } }' | cloudcart app execute --compact-output
# With variables (inline JSON or a path to a JSON file)
cloudcart app execute \
--query 'mutation($input: CreateProductInput!) { createProduct(input: $input) { id name } }' \
--variables '{"input":{"name":"T-Shirt","price_from":29.99}}' \
--json| Flag | Description |
|---|---|
-q, --query | Inline GraphQL query string |
-f, --file | Path to a .graphql file (mutually exclusive with --query) |
--variables | JSON variables string, or a path to a JSON file |
-s, --store | Store URL to execute against |
--json | Raw JSON output (no colors, no status messages) |
--compact-output | Minified JSON (no whitespace) |
Input fields are snake_case
Output fields are camelCase-friendly, but input fields keep their original snake_case names (e.g. price_from). If a mutation fails on an unknown input field, check the input type with app schema --search <InputType>.
cloudcart app schema
Fetch the Admin API GraphQL schema via introspection — filtered, so you never have to page through the whole thing.
# Everything related to "discount", compact SDL optimized for LLMs
cloudcart app schema --search discount --compact
# Only mutations and their input types
cloudcart app schema --mutations
# Only queries
cloudcart app schema --queries
# Just the type names, grouped by kind
cloudcart app schema --types
# Save the full schema
cloudcart app schema --output schema.graphql| Flag | Description |
|---|---|
--search | Filter types/fields matching a term (case-insensitive) |
-c, --compact | Compact SDL format (optimized for LLMs) |
--mutations | Show only the Mutation type and its input types |
--queries | Show only the Query type and its return types |
--types | Only type names grouped by kind |
-o, --output | Write to a file instead of stdout |
-s, --store | Store URL to fetch schema from |
--json | Raw JSON introspection |
cloudcart app validate
Validate a query against the live schema without executing it. Perfect as a pre-flight check in scripts and AI workflows.
cloudcart app validate --query '{ products(first: 5) { edges { node { id name } } } }' --json
cloudcart app validate --file query.graphql| Flag | Description |
|---|---|
-q, --query | Inline query to validate |
-f, --file | Path to a .graphql file |
-s, --store | Store URL to validate against |
--json | Validation result as JSON |
Authentication
cloudcart auth login
cloudcart auth login # interactive
cloudcart auth login -s mystore.cloudcart.com -t cc_pat_xxx # non-interactivecloudcart auth status
cloudcart auth statuscloudcart auth logout
cloudcart auth logout --store mystore.cloudcart.comSee Authentication for details on tokens and keychain storage.
AI integration
cloudcart describe
Outputs a machine-readable description of every command, flag, and argument — this is how AI agents discover what the CLI can do without guessing.
cloudcart describe --jsoncloudcart llms-context
Prints ready-to-paste context that teaches an AI assistant the CLI's auth model, core workflow (schema → validate → execute), and common pitfalls.
cloudcart llms-context > CLOUDCART.mdSee Using with AI agents.
Nitrogen storefronts
The nitrogen namespace manages headless storefronts:
| Command | Description |
|---|---|
nitrogen init [name] | Create a new Nitrogen storefront project |
nitrogen dev | Start the local dev server |
nitrogen build | Production build |
nitrogen preview | Preview the production build locally |
nitrogen link | Link the local project to a storefront in your store |
nitrogen env pull / push / list | Sync environment variables with your store |
nitrogen generate route / routes | Scaffold routes from templates |
nitrogen deploy | Build and deploy to Nova, CloudCart's edge hosting |
Full reference: Nitrogen CLI.