dtc app commands of the PlatformDTC CLI turn a local folder into a PlatformDTC app. The folder’s
platformdtc.app.toml is the source of truth: the CLI reads it and calls the
same partner API the partner dashboard uses, so anything you do from the
CLI is visible in the dashboard and the other way round.
Install
One command, no Node.js or npm needed:dtc --version. Pinning a version, the install location, updating with
dtc upgrade and uninstalling are covered in the theme CLI guide.
The app you create is a Node.js project, so running it (dtc app dev) needs Node.js 22.13 or later —
the CLI itself does not. The starter has no npm dependencies: App Bridge loads from
https://cdn.platformdtc.com/app-bridge/v1/app-bridge.js (see Embedded apps).
dtc app dev also needs cloudflared to open a public HTTPS tunnel to your machine.
Sign in
write_apps scope (with the theme scopes read_themes, write_themes and publish_themes), which is
what the partner API requires. The result comes back on a local 127.0.0.1 callback; credentials are
stored the same way as for the theme CLI.
CI and headless machines: set DTC_AGENT_KEY to a static sq_agt_* key that holds write_apps.
A key without it, or a key minted for an installed app, is refused by the partner API with 403.
Commands
All partner API paths are under
https://api.platformdtc.com/api/v1/appstore. The options every
dtc command accepts (--api, DTC_API_URL, DTC_AGENT_KEY) are listed in the
theme CLI guide. Run dtc app <command> --help for every option of a command.
dtc app dev
1
Start your app
Runs
npm run dev in the app folder with PORT, PLATFORMDTC_API_KEY (your client_id) and
HOST (the tunnel URL) set.2
Open a tunnel
Starts
cloudflared tunnel --url http://localhost:<port> and reads the https://….trycloudflare.com
URL it prints. Pass --tunnel-url <https url> to use a tunnel you run yourself; cloudflared is then
not needed.3
Point the app at the tunnel
Updates the app’s
app_url, embedded_app_url, redirect_uris and webhook_endpoint_url to the
tunnel URL and pushes a draft version. http://localhost and 127.0.0.1 URLs are accepted only
here.4
Install on a development store
Uses
--store, the [build] dev_store in the toml, or asks you to pick (or create) a
development store, saves the choice to [build] dev_store, and opens
the install URL. A draft version installs only on your own development stores.cloudflared
dtc app dev exits with code 1 and prints the install command for your system when cloudflared is
not on your PATH (unless you pass --tunnel-url).
No Cloudflare account is needed:
dtc app dev uses a quick tunnel.
A typical session
1
Create the app
dtc app init before dtc login, link the folder now with dtc app config link.2
Develop
3
Ship