The PlatformDTC CLI, dtc, gives you — and any coding agent working in your editor — a PlatformDTC theme as a local folder. It talks to the same Agent Gateway /themes endpoints as the remote MCP server, and runs the same theme check locally.

Install

One command, no Node.js or npm needed. The installer downloads the dtc binary for your computer, verifies its SHA-256 checksum, installs it to ~/.platformdtc/bin (%USERPROFILE%\.platformdtcin on Windows) and adds that folder to your PATH. It never asks for sudo or administrator rights.
Open a new terminal and check it works:
Builds exist for macOS (Apple silicon and Intel), Linux x64 and arm64 (including Alpine and other musl distributions, which need apk add libstdc++ libgcc), and Windows x64, which also runs on Windows on Arm. Installer options — set them before the command:
Update with dtc upgrade. It downloads the latest release, verifies its checksum, checks that the new binary runs, and only then replaces the old one. dtc upgrade --check only reports whether a newer version exists, and dtc upgrade 0.1.0 installs an exact version. When a newer version is out, dtc mentions it once at the end of a command; set DTC_NO_UPDATE_CHECK=1 to turn that off (it is always off in CI). Uninstall by deleting ~/.platformdtc and the # PlatformDTC CLI line and the PATH line below it that the installer added to your shell profile. On Windows, delete %USERPROFILE%\.platformdtc and remove its bin folder from your user PATH (Settings → System → About → Advanced system settings → Environment Variables). Every release, with its checksums, is listed at cdn.platformdtc.com/cli/latest.json.

Sign in

Your browser opens PlatformDTC. Sign in, choose the store, choose the permissions to grant, and approve. The CLI receives the result on a local 127.0.0.1 callback — nothing to copy and paste. Credentials are kept in your operating system’s keychain (macOS Keychain, or libsecret on Linux), or otherwise in ~/.config/platformdtc/credentials.json, readable only by you. Access tokens last one hour and are refreshed automatically. CI and headless machines: set DTC_AGENT_KEY to a static sq_agt_* key with the theme scopes the job needs. When it is set, the CLI uses it and does not use stored credentials.

Commands

Options every command accepts: --theme defaults to the theme the folder was initialized from. --only takes comma-separated globs (*, **, ?, {a,b}) and can be repeated. Run dtc theme <command> --help for every option of a command.

A typical session

1

Set up the folder

init links the folder to a theme and writes AGENTS.md and CLAUDE.md so Claude Code, Codex and Cursor know the rules of a PlatformDTC theme. Those files, .dtcignore, and editor folders such as .cursor/ and .claude/ stay local and are never pushed.
2

Develop

Works against a development theme, never your live theme. Edit templates/*.json or add a section under theme/custom/sections/ — yourself or with your agent — and open the preview.
3

Check

Fix every error. TypeScript errors are warnings here and errors on publish, so fix those too.
4

Share

Uploads the folder to a new development theme and prints a temporary preview link for a colleague or client.
5

Publish

Runs theme check locally in publish mode, then publishes; the server runs the same check again and refuses the publish with CHECK_FAILED if anything is wrong. If your store requires approval, the command reports that the publish is waiting — approve it in Agents → Approvals.

How push keeps other people’s changes safe

The CLI remembers the checksum of every file it last pulled or pushed (in .platformdtc/state.json, which is git-ignored). When you push a file, it sends that checksum as checksum_before. If someone changed the file on PlatformDTC in the meantime — the merchant in the theme editor, or another agent — the server refuses that file with CONFLICT instead of overwriting their work. Pull, merge, and push again. Push also follows the ownership rules: platform-owned files are refused with PLATFORM_OWNED, and node_modules/, .next/, out/, .git/ and data/ are never uploaded. theme/custom/index.ts is generated by the platform and is never uploaded either. Add your own exclusions to .dtcignore, one glob per line. Large pushes are split automatically into batches of at most 50 files and 2 MiB (a single file may be at most 2 MiB). Each batch is saved as one version. Every write carries an Idempotency-Key, so a request retried after a network error is applied once.

Versions and rollback

Every successful write — from the CLI, an agent or the editor — is recorded as a theme version.
Rolling back a development theme does not change your live store; publish it to put it live.

Checks for your agent

An agent working in a pulled folder can run dtc theme check itself, the same check publish runs. For section settings and a server-side check, connect it to the theme MCP server and use get_section_schemas and check_theme.