Skip to content

CLI Reference ​

The DCD CLI is the primary way to interact with DeviceCloud from your terminal or CI/CD pipeline. It is a drop-in replacement for maestro cloud — in most cases you can swap maestro cloud for dcd cloud.

The CLI is published as @devicecloud.dev/dcd on npm and as a standalone binary. The npm package also ships an MCP server (dcd-mcp) so AI agents can drive DeviceCloud directly. The standalone binary doesn't include the MCP server.

INFO

New in v5: browser-based dcd login (no more passing a key on every command), a standalone binary installer with dcd upgrade, interactive dcd live device sessions, and an MCP server. Existing API keys and dcd cloud usage continue to work unchanged.

Installation ​

The recommended install is the standalone binary — it has no dependencies and doesn't require Node.

bash
curl -fsSL https://get.devicecloud.dev/install.sh | sh

In CI, you can skip a separate install step and run the CLI directly with npx:

bash
npx --yes @devicecloud.dev/dcd@latest cloud <app-file> <flows-dir>

Upgrading ​

If you installed the standalone binary, update it in place:

bash
dcd upgrade

If you installed via npm, upgrade with npm instead:

bash
npm install -g @devicecloud.dev/dcd@latest

INFO

dcd upgrade is only for binary installs. Automatic upgrade is not yet supported on Windows — re-run the PowerShell installer to update.

Authentication ​

There are two ways to authenticate. See Authentication for full detail.

  • dcd login (recommended for local use) — authenticate once in your browser. The CLI stores a session, so you don't have to pass a key on every command, and it unlocks live test updates.
  • API key (recommended for CI/headless) — set the DEVICE_CLOUD_API_KEY environment variable, or pass --api-key <key> on any command.
bash
# Local: log in once
dcd login

# CI / headless: provide an API key
export DEVICE_CLOUD_API_KEY=your-api-key

When both are present, precedence is: --api-key flag → DEVICE_CLOUD_API_KEY env var → stored dcd login session.

Commands ​

CommandDescription
dcd cloudUpload an app and run Maestro flows on DeviceCloud
dcd uploadUpload an app binary and get a reusable binary ID
dcd statusCheck the status of a test upload
dcd listList recent uploads for your organisation
dcd artifactsDownload artifacts or reports for a completed run
dcd loginAuthenticate via your browser
dcd logoutClear the stored session
dcd whoamiShow the logged-in user and active organisation
dcd switch-orgSwitch the active organisation
dcd liveStart and interact with a live device session (beta)
dcd upgradeUpgrade the standalone binary in place

Environment Variables ​

VariableDescription
DEVICE_CLOUD_API_KEYAPI key to use when --api-key isn't passed. Takes precedence over a dcd login session
DCD_CONFIG_DIRDirectory for the dcd login session file (default $XDG_CONFIG_HOME/dcd, or ~/.dcd)
DCD_ENCRYPTdcd cloud, dcd upload and the MCP server encrypt the app binary, flows and --env values on your machine before upload by default. Set to 0 to turn this off, the same as passing --no-encrypt. A flag on the command line takes precedence
DCD_TELEMETRY_DISABLEDSet to 1 to turn off telemetry
DCD_API_URLMCP server only. The API base URL to use (CLI commands take --api-url instead)
DCD_MCP_READONLYMCP server only. Set to 1 for read-only mode

The standalone binary installers also read these:

VariableDescription
DCD_VERSIONInstall a specific version instead of the latest stable release, e.g. 5.5.0
DCD_BETASet to 1 to install the latest beta
DCD_INSTALL_DIRWhere to install the binary (default ~/.dcd/bin, or $env:USERPROFILE\.dcd\bin on Windows)
bash
curl -fsSL https://get.devicecloud.dev/install.sh | DCD_VERSION=5.5.0 sh

Telemetry ​

The CLI sends usage and error events to DeviceCloud to help us find and fix problems. Only commands that authenticate send anything — --help, --version and dcd whoami, for example, don't. Events include:

  • the command and its arguments, with the values of --api-key, --app-url and --env / -e redacted
  • how long the command took and its exit code
  • the error message and stack trace when a command fails
  • the names, durations and errors of MCP server tool calls
  • the CLI version, install method (binary or npm), Node version, operating system and architecture, a random ID for the invocation and, with dcd login, your email address and team ID

To opt out, set DCD_TELEMETRY_DISABLED=1.

Getting Help ​

bash
dcd --help
dcd cloud --help
dcd live --help