Dev

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
FlagDescription
-q, --queryInline GraphQL query string
-f, --filePath to a .graphql file (mutually exclusive with --query)
--variablesJSON variables string, or a path to a JSON file
-s, --storeStore URL to execute against
--jsonRaw JSON output (no colors, no status messages)
--compact-outputMinified 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
FlagDescription
--searchFilter types/fields matching a term (case-insensitive)
-c, --compactCompact SDL format (optimized for LLMs)
--mutationsShow only the Mutation type and its input types
--queriesShow only the Query type and its return types
--typesOnly type names grouped by kind
-o, --outputWrite to a file instead of stdout
-s, --storeStore URL to fetch schema from
--jsonRaw 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
FlagDescription
-q, --queryInline query to validate
-f, --filePath to a .graphql file
-s, --storeStore URL to validate against
--jsonValidation result as JSON

Authentication

cloudcart auth login

cloudcart auth login                                          # interactive
cloudcart auth login -s mystore.cloudcart.com -t cc_pat_xxx   # non-interactive

cloudcart auth status

cloudcart auth status

cloudcart auth logout

cloudcart auth logout --store mystore.cloudcart.com

See 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 --json

cloudcart 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.md

See Using with AI agents.

Nitrogen storefronts

The nitrogen namespace manages headless storefronts:

CommandDescription
nitrogen init [name]Create a new Nitrogen storefront project
nitrogen devStart the local dev server
nitrogen buildProduction build
nitrogen previewPreview the production build locally
nitrogen linkLink the local project to a storefront in your store
nitrogen env pull / push / listSync environment variables with your store
nitrogen generate route / routesScaffold routes from templates
nitrogen deployBuild and deploy to Nova, CloudCart's edge hosting

Full reference: Nitrogen CLI.

On this page