Global flags
These flags are available on all Shoplazza CLI commands.
| Flag | Type | Default | Description |
|---|---|---|---|
--format <format> | string | auto | Output format: json, pretty, table, ndjson, or csv. Defaults to pretty at an interactive terminal and to json when stdout is piped or redirected, in CI, or with --no-input; SHOPLAZZA_CLI_FORMAT pins the default |
--profile <name> | string | — | Profile to use for this invocation (overrides SHOPLAZZA_CLI_PROFILE and the current profile) |
--no-input | boolean | false | Never prompt; fail fast on missing input (same as SHOPLAZZA_CLI_NO_INTERACTIVE=1) |
--help / -h | boolean | — | Show help for the command |
--version / -v is available on the root command only (shoplazza --version).
Command flags
These flags are not global: each exists only on the commands listed.
| Flag | Type | Default | Available on | Description |
|---|---|---|---|---|
--jq <expression> | string | — | API commands, shortcuts, api rest, schema | Filter JSON output using a jq expression. Needs JSON output, so add --format json at an interactive terminal |
-q <expression> | string | — | Same as --jq | Shorthand alias for --jq |
--dry-run | boolean | false | API commands, shortcuts, api rest, themes push / pull / share, checkout-extension deploy / list / preview / undeploy / versions | Preview the request without executing it |
--params <json> | string | — | API commands, api rest | JSON for path and query parameters |
--data <json> | string | — | API commands with a request body, api rest | JSON request body (inline, @file, or - for stdin) |
--fields <fields> | string | — | products +search | Comma-separated product fields for the API to return |
Examples
shell
# Table output
shoplazza products list --format table
# Pretty print
shoplazza orders +search --format pretty
# Filter with jq
shoplazza products list --format json --jq '.data.products[] | {id, title, price_min}'
# Dry run
shoplazza products create --data '{"product": {"title": "Test"}}' --dry-run
# Field projection (products +search)
shoplazza products +search --fields "id,title,price_min" --format table
# Use another profile for one command
shoplazza products list --profile prod-us