# Quickstart

The dcd command line is intentionally designed to mimic the Maestro Cloud API. In most cases, you can just change `maestro cloud` to `dcd cloud`:

```bash
# maestro cloud --apiKey <apiKey> <appFile> <flowFile>

dcd cloud <appFile> <flowFile>
```

### 1. Install the CLI

The recommended install is the standalone binary — no Node required.

**macOS / Linux**
```bash
curl -fsSL https://get.devicecloud.dev/install.sh | sh
```

**Windows**
```powershell
irm https://get.devicecloud.dev/install.ps1 | iex
```

**npm**
Install [Node 22+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), then run:

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

### 2. Authenticate

Log in once in your browser — the CLI remembers your session, so you don't need to pass a key on every command:

```bash
dcd login
```

Running in CI or a headless environment? Use an API key instead. Find it in the [console settings](https://console.devicecloud.dev/settings) page and set it as an environment variable:

```bash
export DEVICE_CLOUD_API_KEY=your-api-key
```

See [Authentication](https://docs.devicecloud.dev/getting-started/authentication.md) for more detail.

### 3. Run your first flow

**iOS**

```bash
dcd cloud <appFile>.app <flowFile>
```

**Android**

```bash
dcd cloud <appFile>.apk <flowFile>
```

That's it! Questions? Issues? Head to our [Discord](https://discord.gg/gm3mJwcNw8).

---

### Upgrading the CLI

If you installed the standalone binary:

```bash
dcd upgrade
```

If you installed via npm:

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

**Prerelease versions** (not recommended): Occasionally, prerelease versions are available under the `beta` tag. See [available versions on NPM](https://www.npmjs.com/package/@devicecloud.dev/dcd?activeTab=versions).

```bash
npm install -g @devicecloud.dev/dcd@beta
```

For the standalone binary, set `DCD_BETA=1` when you run the installer:

```bash
curl -fsSL https://get.devicecloud.dev/install.sh | DCD_BETA=1 sh
```

```powershell
$env:DCD_BETA=1; irm https://get.devicecloud.dev/install.ps1 | iex
```

---

### Limits

Every flow has a 10-minute execution limit. A flow that is still running when it reaches the limit is stopped and marked as failed, with a "Test run timed out after 10 minutes" error.

A flow that needs longer can opt into [extended runtime](https://docs.devicecloud.dev/configuration/extended-runtime.md), which gives it up to 20 minutes and is charged at 2×.

---

### Next steps

- [Flows & Workspaces](https://docs.devicecloud.dev/getting-started/flows-and-workspaces.md) — organise and run multiple flows
- [Devices & OS Versions](https://docs.devicecloud.dev/getting-started/devices-and-os-versions.md) — choose Android API level or iOS version
- [App Management](https://docs.devicecloud.dev/configuration/app-management.md) — upload and reuse binaries
- [CI/CD Integration](https://docs.devicecloud.dev/ci-cd-integration/overview.md) — run tests in your pipeline
```
