Skip to content
CommerceGeek home

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.

A terminal printing a JSON document while progress messages flow into a separate stream beside it.
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 dev records sessions, preview status and JSONL logs to the filesystem, so agents can reuse a running dev session. It also supports streaming --json output.

  • SHOPIFY_SERVICE_ACCOUNT_TOKEN can 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 logs and app logs sources commands are removed. Shopify says to use log output from app dev for Shopify Functions instead.

  • The --poll flag is removed from theme 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 check and theme profile.

  • Shopify Functions commands, such as app function info, app function run and app function replay.

  • app config validate and app import channel-config.

  • store execute --json.

  • app subscription-migrations (list, status, schedule, unschedule and cancel).

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 logs or app 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_TOKEN or SHOPIFY_CLI_PARTNERS_TOKEN environment 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 the function object instead of root properties. function.targets is an array of records with target, inputQueryPath and export, so search by target instead of looking up the former targeting object.

  • theme check: read valid, a flat issues array, errorCount, warningCount and infoCount. File-grouped offenses are replaced by issues[].filePath. Positions use startRow, startColumn, endRow and endColumn, one-based, so remove any +1 conversion. The new report also applies to --output json.

  • app config validate: read issues[].filePath and issues[].fieldPath instead of file and path. fieldPath is an array of keys and indexes, or null, and code is null when unavailable.

  • Explicit --environment on the affected theme commands: you get one environments array in request order, even for a single environment. Each item has environment and either result or error. Handle every item.

{
  "environments": [
    {"environment": "staging", "result": {"themes": []}},
    {"environment": "production", "error": {"type": "abort", "message": "Authentication failed."}}
  ]
}
Environment batch, from the migration guideUnverified example.

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: false and issues, and exits nonzero.

  • Partially completed work returns the completed items and failure details, and exits nonzero. For example, theme push returns status: "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 are abort, bug and external. Replace checks for a Boolean error or a root status: "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 the handle from each Function extension's shopify.extension.toml. Each source is named extensions.<handle>.

  • --source extensions.<handle>: list matching files with ls .shopify/logs/*_extensions_<handle>_*.json, or filter with jq.

  • --status success or --status failure: filter on the top-level status field.

  • --json: print one JSON object per line with jq -c . .shopify/logs/*.json. Function run records use the same fields as the earlier app logs --json output.

jq -c 'select(.status == "failure")' .shopify/logs/*.json
Filter saved logs by status. This reads the files that exist when you run it; it does not stream new logs.Unverified example.

In network access records, payload now uses snake_case keys. Update payload.httpRequest lookups to payload.http_request.

Limits of app dev

  • app dev only 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 --store flags by running it against each store in turn. Logs from every store go to the same directory, and each record includes storeName.

  • 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 clean does 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-input
Unverified example.

The 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/cli dependency and commit the lockfile.

npm install -g @shopify/cli@5
shopify version
Global install for testingUnverified example.

Update your scripts

  • Pass --json explicitly when you need machine-readable output. Use --no-input separately 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-schema
Example schema checkUnverified example.
  • Run 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@4
Roll back a global installUnverified example.

Deadline 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-input or --json, they stop and print a verification link instead.

  • app security check gains 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_TOKEN or SHOPIFY_CLI_PARTNERS_TOKEN is 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

  1. 5.0.0 · Shopify · accessed 28 Oct 2026
  2. 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.