Shopify CLI 5.0.0: JSON output changes, app logs removed, new service account token
Shopify CLI 5.0.0 changes JSON output on several commands, removes app logs and theme dev --poll, and deprecates two token variables.

- Published
- 23 Nov 2026
- Affects
- Shopify CLI
What changed
Shopify CLI 5.0.0 is a major release. The release notes describe it as an agent-ready development tool. It adds a standardised JSON output format and an app dev command built for agentic workflows.
New in 5.0.0
JSON output is now supported in over 90% of Shopify CLI commands.
app devrecords sessions, preview status and JSONL logs to the filesystem, so agents can reuse a runningdevsession. It also supports streaming--jsonoutput.SHOPIFY_SERVICE_ACCOUNT_TOKENcan be used with Service Accounts to automate app releases and dev store management.
Breaking changes
Existing JSON output structures have changed on some commands.
The
app logsandapp logs sourcescommands are removed. Shopify says to use log output fromapp devfor Shopify Functions instead.The
--pollflag is removed fromtheme dev.
Deprecation
The SHOPIFY_APP_AUTOMATION_TOKEN and SHOPIFY_CLI_PARTNERS_TOKEN environment variables are deprecated in favour of SHOPIFY_SERVICE_ACCOUNT_TOKEN. The migration guide says the old variables remain supported for now.
Who is affected
You are affected if any script, CI workflow or integration reads the JSON output of these commands:
Theme commands, including
theme info,theme list,theme open,theme duplicate,theme push,theme preview,theme checkandtheme profile.Shopify Functions commands, such as
app function info,app function runandapp function replay.app config validateandapp import channel-config.store execute --json.app subscription-migrations(list,status,schedule,unscheduleandcancel).
The migration guide also notes that app function run and finite app function replay text output is now buffered until execution completes, so anything reading that text live is affected too.
You are also affected if you use any of the following:
app logsorapp logs sources, which now return an error and exit nonzero.theme dev --poll. The migration guide says the flag has been deprecated since 3.61.0 and has had no effect since 3.70.0, so removing it changes no behaviour.The
SHOPIFY_APP_AUTOMATION_TOKENorSHOPIFY_CLI_PARTNERS_TOKENenvironment variables. They remain supported but are deprecated.
JSON output changes with before and after
Finite commands now write one JSON document to stdout. Progress and diagnostics go to stderr as JSON events, so keep the two streams separate rather than parsing them combined. Pass --json explicitly when you need machine-readable output.
theme list
The root array becomes an object with a themes array. Theme IDs are now decimal strings, and the internal createdAtRuntime field is gone. An empty library returns {"themes": []}.
Before
[
{
"id": 123,
"name": "Example theme",
"role": "unpublished"
}
]After
{
"themes": [
{
"id": "123",
"name": "Example theme",
"role": "unpublished"
}
]
}store execute --json
Your query result now sits under data, with optional response metadata under extensions. Field names and aliases inside data do not change. A lookup of products.nodes becomes data.products.nodes. With --output-file, the file has the same wrapper, and a successful write prints nothing to stdout.
Before
{"products": {"nodes": []}}After
{"data": {"products": {"nodes": []}}}GraphQL failures return a fatal error document. Upstream errors are under error.details.errors, metadata under error.details.extensions, and partial data under error.details.data when available.
Other changes
app function info: read thefunctionobject instead of root properties.function.targetsis an array of records withtarget,inputQueryPathandexport, so search bytargetinstead of looking up the formertargetingobject.theme check: readvalid, a flatissuesarray,errorCount,warningCountandinfoCount. File-groupedoffensesare replaced byissues[].filePath. Positions usestartRow,startColumn,endRowandendColumn, one-based, so remove any+1conversion. The new report also applies to--output json.app config validate: readissues[].filePathandissues[].fieldPathinstead offileandpath.fieldPathis an array of keys and indexes, ornull, andcodeisnullwhen unavailable.Explicit
--environmenton the affected theme commands: you get oneenvironmentsarray in request order, even for a single environment. Each item hasenvironmentand eitherresultorerror. Handle every item.
{
"environments": [
{"environment": "staging", "result": {"themes": []}},
{"environment": "production", "error": {"type": "abort", "message": "Authentication failed."}}
]
}The guide also lists changes for theme info, theme open, theme duplicate, theme push, theme preview, theme profile, app import channel-config and app subscription-migrations. Check it for those field mappings.
Exit codes and errors
Check the exit code as well as the JSON. A nonzero exit can still come with useful data.
Validation that fails the blocking policy returns a completed report with
valid: falseand issues, and exits nonzero.Partially completed work returns the completed items and failure details, and exits nonzero. For example,
theme pushreturnsstatus: "partial".A failed single operation, setup, authentication or transport error returns one fatal error document, such as
{"error": {"type": "abort", "message": "Authentication failed."}}, and exits nonzero. Error types areabort,bugandexternal. Replace checks for a Booleanerroror a rootstatus: "failed"with checks for the error object.Success, no-op, skip or a declined confirmation exits zero.
Replacing app logs and other removals
Shopify CLI 5.0 removes app logs and app logs sources. Running either command now returns an error and exits nonzero. To see Function logs, run shopify app dev instead.
Reading Function logs with app dev
While app dev runs and your app has at least one Function extension, it streams Function run and network access logs from the dev store to your terminal. It also writes each log to a separate JSON file in .shopify/logs, named <timestamp>_<namespace>_<handle>_<id>.json. Timestamps are in UTC, so sorting the filenames sorts the logs by time. app function replay reads the same files.
The migration guide maps the old app logs usage to the following:
app logs sources: use thehandlefrom each Function extension'sshopify.extension.toml. Each source is namedextensions.<handle>.--source extensions.<handle>: list matching files withls .shopify/logs/*_extensions_<handle>_*.json, or filter withjq.--status successor--status failure: filter on the top-levelstatusfield.--json: print one JSON object per line withjq -c . .shopify/logs/*.json. Function run records use the same fields as the earlierapp logs --jsonoutput.
jq -c 'select(.status == "failure")' .shopify/logs/*.jsonIn network access records, payload now uses snake_case keys. Update payload.httpRequest lookups to payload.http_request.
Limits of app dev
app devonly shows logs from your developer preview. It cannot watch the released app version. For released Function runs, the guide points to Function run logs in the Dev Dashboard.It connects to one store per session, so replace multiple
--storeflags by running it against each store in turn. Logs from every store go to the same directory, and each record includesstoreName.It installs your local build on the store as the app's dev preview, replacing the installed app version or another developer's preview until you run
app dev clean. On a shared store, use your own dev store instead.app dev cleandoes not remove.shopify/logs, so saved files can include logs from earlier sessions.
Streaming and session files
app dev --json streams JSON Lines. Each record has timestamp, source and message, plus level when available. There is no final success result. For unattended runs, add --no-input and supply the configuration and store the session needs.
shopify app dev --json --no-inputThe CLI records each session's metadata and JSONL log under .shopify/dev/, with or without --json. A second invocation for the same project and app configuration exits with error.code: "dev_instance_already_running", so reuse the running session or stop it first. The session metadata holds the PID, URLs, logFile and details.preview status, which describes the CLI's state and is not an application health check. Run shopify app dev --json-schema to inspect the stream, error and session-file schemas.
theme dev --poll
Remove --poll from theme dev invocations in your scripts. No replacement is needed.
What to do
Work through these steps in order. Do not change production automation until your scripts pass against a test install.
Test before you upgrade
If you are on Shopify CLI 3.x, complete the 4.0 migration first.
Save representative output from your current version for the commands your scripts parse, including empty results and failures. You will compare against it later.
Install 5.0 in a test environment. The CLI does not upgrade automatically across major versions, so this is a manual step. For a project-local install, update the
@shopify/clidependency and commit the lockfile.
npm install -g @shopify/cli@5
shopify versionUpdate your scripts
Pass
--jsonexplicitly when you need machine-readable output. Use--no-inputseparately for commands that must not prompt, and supply the required input flags.Update parsers for the commands you use. Parse stdout as one JSON document for finite commands, and keep stderr separate, since progress and diagnostics are JSON events there.
Check the exit code as well as the result. A nonzero exit can still come with useful validation or partial-result data.
Inspect the schema of each affected command from the installed version, then match your parser to its result schema.
shopify theme list --json-schemaRun your scripts against the output you saved earlier. Check successful and empty results, cancellations, validation failures, partial work, environment batches and file output.
Rename the token variables
Rename SHOPIFY_APP_AUTOMATION_TOKEN or SHOPIFY_CLI_PARTNERS_TOKEN to SHOPIFY_SERVICE_ACCOUNT_TOKEN in scripts and CI configuration, keeping the same token value. The old variables still work but are deprecated. Unset both old variables before setting the new one: the CLI rejects an environment that sets the new variable alongside either old one.
Release and roll back
Once your scripts pass, update explicit CLI versions in CI workflows and release the script changes together with the CLI version change. 4.x output does not match the 5.0 contracts, so the two must move together.
If scripts fail after the upgrade, reinstall the latest 4.x release and restore your 4.x-compatible scripts while you finish the migration.
npm install -g @shopify/cli@4Deadline and other fixes
Deadline
The sources announce no calendar deadline. The release notes were published as the 5.0.0 release, which is an announcement date, not a cut-off. The migration guide says Shopify CLI does not upgrade automatically across major versions, so your scripts only meet the 5.0 contracts when you install 5.0 yourself. The old token variables are deprecated but, according to the migration guide, remain supported. No removal date is given for them.
Other additions
Theme commands now prompt for identity in the browser for security verification when needed. In CI, or with
--no-inputor--json, they stop and print a verification link instead.app security checkgains shared namespace metafield warnings in its agentic checks (SHARED_NAMESPACE_METAFIELD_RENDER). It also now accounts for theme app extension settings types when checking liquid rendering safety.
Notable patch fixes
Throttled API requests are retried with exponential backoff, respecting
Retry-After.Security hardening: webhook secrets are hidden in debug output, the GraphQL cache is partitioned by endpoint and token, and GraphiQL inline scripts are serialised safely.
The CLI now fails clearly when
SHOPIFY_APP_AUTOMATION_TOKENorSHOPIFY_CLI_PARTNERS_TOKENis set but empty, and reports process startup failures and signal termination instead of exit code 0.
Get the weekly digest
One email every Monday: what changed in Shopify, the deadlines coming up and what’s been announced, plus the week’s new guides. Free, and you can unsubscribe in one click.
Sources
- 5.0.0 · Shopify · accessed 28 Oct 2026
- Migrate to Shopify CLI 5.0 · Shopify.dev · accessed 28 Oct 2026
AI-assisted, reviewed by Scott. Every claim is checked against the sources above.