Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
55fb4a1
feat: drop iPhone 16 Pro Max and gpu1 from help text (removed 9 Nov 2…
finalerock44 Nov 7, 2026
c745066
chore: merge production into dev after 5.12.0 (#301)
dcd-release-please[bot] Nov 9, 2026
9fafa2f
feat(auth): say when a dcd login session has expired (#303)
finalerock44 Nov 9, 2026
6bebbef
ci: Replace release-please with a custom version that handles our dev…
finalerock44 Nov 9, 2026
dab495b
feat(mcp): set up Codex with dcd mcp install, and document every host…
finalerock44 Nov 9, 2026
02d99b9
ci: lint PR titles on pull_request instead of pull_request_target (#308)
finalerock44 Nov 9, 2026
9a54e3a
fix(mcp): say why a tool is missing in read-only mode (#307)
finalerock44 Nov 9, 2026
882e877
docs(mcp): dcd mcp for cloud tests and headless use (#309)
finalerock44 Nov 10, 2026
18efa4f
fix(mcp): find code and claude .cmd shims on Windows (#286)
riglar Nov 10, 2026
12f4da5
feat(device): tap, type, swipe and press-key subcommands (#310)
finalerock44 Nov 11, 2026
9f16ca2
fix(device): keep a missing --text on `type` inside the --json envelo…
finalerock44 Nov 11, 2026
f5db0b0
deps: bump @supabase/supabase-js from 2.118.0 to 2.119.0 in the minor…
dependabot[bot] Nov 12, 2026
14ae83d
refactor(auth): stop calling Supabase directly for logout, login chec…
riglar Nov 12, 2026
25d09ca
fix: treat dev-api.devicecloud.dev as the dev environment (#314)
riglar Nov 12, 2026
f415730
chore: merge production into the 5.13.0 release
riglar Nov 13, 2026
e4d3f07
chore: release 5.13.0
riglar Nov 13, 2026
84dd842
deps: raise the hono override to 4.13.16 for new moderate advisories …
riglar Nov 13, 2026
07df107
fix(device): make --maestro a no-op now that device sessions have one…
finalerock44 Nov 13, 2026
adc2769
ci: resolve version-file conflicts in the back-merge to production's …
riglar Nov 13, 2026
68a8250
chore: merge production into dev after 5.12.1 (#319)
riglar Nov 13, 2026
5df10c8
chore: merge production into the 5.13.0 release
finalerock44 Nov 13, 2026
6ad06a3
chore: release 5.13.0
finalerock44 Nov 13, 2026
535f485
chore: rebuild the 5.13.0 release on dev 68a8250 and production 5.12.1
finalerock44 Nov 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,34 @@ jobs:
git checkout -b "$BRANCH"

# A merge, so the PR's diff is exactly what `production` changed.
#
# The version files can conflict: the last back-merge was squashed,
# so git still sees dev's and production's version lines as two
# separate edits (5.12.1 hit this). `production` holds what was just
# released, so its side is right for those three files. Any other
# conflict still stops the job for a human.
if ! git merge --no-ff origin/production -m "chore: merge production into dev after ${VERSION}"; then
echo "Back-merge of production into dev conflicts — resolve it by hand." >&2
git merge --abort || true
exit 1
conflicts=$(git diff --name-only --diff-filter=U)
others=$(grep -vxE 'package\.json|server\.json|CHANGELOG\.md' <<<"$conflicts" || true)
if [ -n "$others" ]; then
echo "::error::Back-merge of production into dev conflicts in $(paste -sd, - <<<"$others"). Resolve it by hand."
git merge --abort || true
exit 1
fi
# Hunk by hunk, not `checkout --theirs`: that would take production's
# whole file and drop anything else dev changed in it, such as a
# dependency bump in package.json.
# merge-file needs real files; it can't read process substitutions.
tmp=$(mktemp -d)
for f in $conflicts; do
git show ":1:$f" > "$tmp/base"
git show ":2:$f" > "$tmp/ours"
git show ":3:$f" > "$tmp/theirs"
git merge-file -p --theirs "$tmp/ours" "$tmp/base" "$tmp/theirs" > "$f"
done
echo "::notice::Took production's side of the conflicting lines in: $(paste -sd, - <<<"$conflicts")"
git add -- $conflicts
git commit --no-edit
fi

if git diff --quiet "origin/dev..HEAD"; then
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Changelog

## [5.13.0](https://github.com/devicecloud-dev/dcd-cli/compare/v5.12.1...v5.13.0) (2026-11-13)


### Features

* drop iPhone 16 Pro Max and gpu1 from help text (removed 9 Nov 2026) ([#302](https://github.com/devicecloud-dev/dcd-cli/issues/302)) ([55fb4a1](https://github.com/devicecloud-dev/dcd-cli/commit/55fb4a196a086c4346f554e1c28633b70113e396))
* **auth:** say when a dcd login session has expired ([#303](https://github.com/devicecloud-dev/dcd-cli/issues/303)) ([9fafa2f](https://github.com/devicecloud-dev/dcd-cli/commit/9fafa2f62347dd77debd46874d59bd599abc358b))
* **device:** tap, type, swipe and press-key subcommands ([#310](https://github.com/devicecloud-dev/dcd-cli/issues/310)) ([12f4da5](https://github.com/devicecloud-dev/dcd-cli/commit/12f4da5dc1d2b742239f2a6c0ae4d669c978d9f3))
* **mcp:** set up Codex with dcd mcp install, and document every hosted client ([#306](https://github.com/devicecloud-dev/dcd-cli/issues/306)) ([dab495b](https://github.com/devicecloud-dev/dcd-cli/commit/dab495bf501059b2866ead21603b3693ae14dcbc))


### Bug Fixes

* **device:** keep a missing --text on `type` inside the --json envelope ([#311](https://github.com/devicecloud-dev/dcd-cli/issues/311)) ([9f16ca2](https://github.com/devicecloud-dev/dcd-cli/commit/9f16ca2dfc3159b827c1447c3e9287933eff2de8))
* **device:** make --maestro a no-op now that device sessions have one engine ([#317](https://github.com/devicecloud-dev/dcd-cli/issues/317)) ([07df107](https://github.com/devicecloud-dev/dcd-cli/commit/07df10717c556b212caf7e233a0850142d20d92a))
* **mcp:** find code and claude .cmd shims on Windows ([#286](https://github.com/devicecloud-dev/dcd-cli/issues/286)) ([18efa4f](https://github.com/devicecloud-dev/dcd-cli/commit/18efa4f3309d8a7d2719720c10e3195bc708ad2d))
* **mcp:** say why a tool is missing in read-only mode ([#307](https://github.com/devicecloud-dev/dcd-cli/issues/307)) ([9a54e3a](https://github.com/devicecloud-dev/dcd-cli/commit/9a54e3a21b3175fd67158dc68be071099b7c8cb7))


### Dependencies

* bump @supabase/supabase-js from 2.118.0 to 2.119.0 in the minor-and-patch group across 1 directory ([#304](https://github.com/devicecloud-dev/dcd-cli/issues/304)) ([f5db0b0](https://github.com/devicecloud-dev/dcd-cli/commit/f5db0b0376ba1b07f15ba6d5dfb5b3065cfbd0f7))


### Code Refactoring

* **auth:** stop calling Supabase directly for logout, login checks and live status ([#312](https://github.com/devicecloud-dev/dcd-cli/issues/312)) ([14ae83d](https://github.com/devicecloud-dev/dcd-cli/commit/14ae83dc50018ac70a1a5d7ed4c75fd854e3e0c6))

## [5.12.1](https://github.com/devicecloud-dev/dcd-cli/compare/v5.12.0...v5.12.1) (2026-11-13)


Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Full guide in `CONTRIBUTING.md`; the operationally important parts (the ones tha
| **stable** | every push to `dev` runs **Promote to stable** (`promote.yml`), which keeps one release PR into `production` current; merging it tags, publishes and uploads binaries | `X.Y.Z` | `latest` |
| **beta** | run **Release beta** (`release-beta.yml`) by hand from `dev` | `X.Y.Z-beta.N` | `beta` |

**Cutting a stable release.** You don't start one: you merge the open `chore: release X.Y.Z` PR from `promote/cli-next` into `production`. Use a **merge commit**, the only method `production` allows. That push runs `release-please.yml`. It finds an untagged version on `production`, tags it, and creates the GitHub Release from the changelog section. It then **chains** into `npm-publish.yml` and `release-binaries.yml` as `needs:` jobs, because a `GITHUB_TOKEN`-created release won't fire `release: published`. Last, it opens a **back-merge PR** into `dev`. `get.devicecloud.dev` serves the binaries by reading the GitHub Releases API at runtime, so there's no separate manifest to deploy. To hold a release, just don't merge the PR. Closing it doesn't pause releases, because the next push to `dev` opens a new one.
**Cutting a stable release.** You don't start one: you merge the open `chore: release X.Y.Z` PR from `promote/cli-next` into `production`. Use a **merge commit**, the only method `production` allows. That push runs `release-please.yml`. It finds an untagged version on `production`, tags it, and creates the GitHub Release from the changelog section. It then **chains** into `npm-publish.yml` and `release-binaries.yml` as `needs:` jobs, because a `GITHUB_TOKEN`-created release won't fire `release: published`. Last, it opens a **back-merge PR** into `dev`. If that merge conflicts only in `package.json`, `server.json` or `CHANGELOG.md`, it takes `production`'s side, which holds the version just released. A conflict in any other file stops the job, and you build the back-merge by hand. `get.devicecloud.dev` serves the binaries by reading the GitHub Releases API at runtime, so there's no separate manifest to deploy. To hold a release, just don't merge the PR. Closing it doesn't pause releases, because the next push to `dev` opens a new one.

**How the release PR is kept current.** `promote.yml` runs on every push to `dev`. It rebuilds `promote/cli-next` from `origin/dev`, with `origin/production` merged in, plus one `chore: release X.Y.Z` commit that sets the version in `package.json` and `server.json` and adds the `CHANGELOG.md` section. Then it force-pushes the branch and opens the PR, or updates the open one's title and body. So the PR always carries all of `dev`, and its version moves up as `feat`s land. A push with nothing releasable since the last release, such as a docs change or the back-merge, does nothing. If `production` moved during the run because a release just merged, the run pushes nothing, and the back-merge's push into `dev` rebuilds the PR. If an open PR into `production` came from another branch, push runs warn and leave it alone. The workflow can also be run by hand (`gh workflow run promote.yml --ref dev`, or the Actions tab) to set the `version`. `dry_run: true` shows the version and changelog in the run summary and pushes nothing. The `CHANGELOG.md` date is the day the PR was last rebuilt.

Expand Down
79 changes: 39 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,32 @@ See full documentation: [Docs](https://docs.devicecloud.dev)

## MCP server

devicecloud.dev has an [MCP](https://modelcontextprotocol.io) server, so AI agents (Claude, Cursor, VS Code) can run cloud tests and drive cloud devices. You don't run it yourself. You add it to your MCP client's config, and the client starts it.
`dcd mcp` is an [MCP](https://modelcontextprotocol.io) server, so AI agents (Claude, Codex, Cursor, VS Code) can run cloud tests and read their results. You don't run it yourself. You add it to your MCP client's config, and the client starts it. It works the same on your machine and headless, such as in CI.

There are three ways to connect:
### Set it up with `dcd mcp install`

| | Install | Tools | Use it when |
| --- | --- | --- | --- |
| **`dcd mcp`** (recommended) | the CLI | device tools + `dcd_*` cloud-test tools | you want everything, including installing a local build or running local flow files |
| **Hosted** `https://api.devicecloud.dev/mcp` | nothing | device tools | the agent only drives devices, with apps and flows that are already uploaded or at a URL |
| **`dcd-mcp`** | the CLI | `dcd_*` cloud-test tools | you only run cloud tests (the older server; `dcd mcp` covers it) |
Install the CLI (see the top of this page), sign in, then add the server to your AI tool:

### `dcd mcp`
```sh-session
$ dcd login
$ dcd mcp install cursor # or claude-code, claude-desktop, codex, vscode
```

Leave out the client name to pick from a list. Add `--read-only` for a server that only offers tools that change nothing, or `--print` to see what would be added without changing anything. For Claude Code, Codex and VS Code it runs `claude mcp add`, `codex mcp add` and `code --add-mcp`. For Claude Desktop and Cursor it adds an entry to their JSON config file and keeps everything else in it. Restart the app afterwards.

`dcd mcp` connects to the hosted server and passes its device tools through. It adds what only a local process can do: `install_app` takes `app_path` (a build on your machine, uploaded first) and `run` takes `path` (a flow file, or a directory uploaded as a bundle). It also serves the `dcd_*` tools below.
### Headless, with an API key

**Set it up with `dcd mcp install`.** Install the CLI (see the top of this page), sign in, then add the server to your AI tool:
For an agent that runs without you, such as in CI or a script, sign in with an API key instead of `dcd login`. Create one in the console under Settings → API Keys, and give it to the server as `DEVICE_CLOUD_API_KEY` in its environment. For example, for Claude Code in CI:

```sh-session
$ dcd login
$ dcd mcp install cursor # or claude-code, claude-desktop, vscode
$ claude mcp add --scope user devicecloud -e DEVICE_CLOUD_API_KEY="$DEVICE_CLOUD_API_KEY" -- dcd mcp
```

Leave out the client name to pick from a list. Add `--read-only` for a server that only offers tools that change nothing, or `--print` to see what would be added without changing anything. For Claude Code and VS Code it runs `claude mcp add` and `code --add-mcp`. For Claude Desktop and Cursor it adds an entry to their JSON config file and keeps everything else in it. Restart the app afterwards.
In a JSON config, put it in the server's `env`: `"env": { "DEVICE_CLOUD_API_KEY": "<your-api-key>" }`. Store the key as a secret in your CI provider, never in the repository.

### Setting it up by hand

**Setting it up by hand.** Start dcd by its **full path**. Desktop apps such as Claude Desktop and Cursor are usually opened from the Dock or Start menu, so they don't see the PATH your shell sets up, and a bare `dcd` gives "command not found". The installer prints the path at the end; it's `~/.dcd/bin/dcd` by default, written out in full because config files don't expand `~`.
Start dcd by its **full path**. Desktop apps such as Claude Desktop and Cursor are usually opened from the Dock or Start menu, so they don't see the PATH your shell sets up, and a bare `dcd` gives "command not found". The installer prints the path at the end; it's `~/.dcd/bin/dcd` by default, written out in full because config files don't expand `~`.

Claude Desktop (`claude_desktop_config.json`) and Cursor (`~/.cursor/mcp.json`):

Expand Down Expand Up @@ -88,29 +90,42 @@ VS Code (`.vscode/mcp.json`, or the user `mcp.json`) uses `servers` and a `type`
}
```

Claude Code, run from a terminal, does see your PATH:
Codex (`~/.codex/config.toml`, shared by the Codex CLI, IDE extension and desktop app):

```toml
[mcp_servers.devicecloud]
command = "/Users/you/.dcd/bin/dcd"
args = ["mcp"]
```

Claude Code and the Codex CLI, run from a terminal, do see your PATH:

```sh-session
$ claude mcp add --scope user devicecloud -- dcd mcp
$ codex mcp add devicecloud -- dcd mcp
```

If you use the npm package instead of the standalone binary, the command is `npx` with `"args": ["-y", "@devicecloud.dev/dcd", "mcp"]`. That needs Node 22 or newer on the app's PATH, and it checks npm each time it starts.

It signs in the same way as the CLI: run `dcd login` once, or set `DEVICE_CLOUD_API_KEY` in `env`. Add `--read-only` to the args (or set `DCD_MCP_READONLY=1`) to serve only the tools that change nothing. If the hosted server can't be reached, it serves the `dcd_*` tools only and says why on stderr.
It signs in the same way as the CLI: with your `dcd login` session, which it renews as it runs, or with `DEVICE_CLOUD_API_KEY`. Point it at a non-prod environment with `DCD_API_URL`.

**Device tools:** `list_devices`, `start_device`, `get_device_status`, `install_app`, `launch_app`, `inspect_screen`, `take_screenshot`, `run`, `get_command_status`, `get_logs`, `request_human`, `get_human_status`, `stop_device`, and `cheat_sheet` (Maestro syntax for the agent).
### Tools

### Hosted
| Tool | What it does |
| --- | --- |
| `dcd_list_devices` | Discover available devices, OS versions, and Maestro versions |
| `dcd_list_runs` | List recent test runs (filter by name/date, paginated) |
| `dcd_get_status` | Get the status + per-test results of a run |
| `dcd_download_artifacts` | Download a run's artifacts/report to disk |
| `dcd_run_cloud_test` | Submit a flow to run on the cloud (**billable**) |

Point an HTTP-capable client at the URL. It signs you in through the browser (OAuth), and you can disconnect it later under Settings → Connected apps.
By default `dcd_run_cloud_test` is async: it returns an `uploadId` immediately, which you poll with `dcd_get_status`. Pass `wait: true` (bounded by `waitTimeoutSeconds`) to block until completion, or `dryRun: true` to preview the flows without submitting.

```sh-session
$ claude mcp add --transport http devicecloud https://api.devicecloud.dev/mcp
```
**Read-only mode.** `dcd_run_cloud_test` consumes test minutes, so it is annotated as non-read-only/destructive (clients can prompt before calling it). To hide it entirely, which is recommended for autonomous or untrusted agents, add `--read-only` after `mcp` in the args (or pass it to `dcd mcp install`), or set `DCD_MCP_READONLY=1` in `env`.

### `dcd-mcp`

The older server, with the `dcd_*` tools only. Add it to your MCP client config:
The npm package also ships `dcd-mcp`, an older server with the same `dcd_*` tools. `dcd mcp` covers it, so you only need it for a setup that already uses it:

```jsonc
{
Expand All @@ -124,23 +139,7 @@ The older server, with the `dcd_*` tools only. Add it to your MCP client config:
}
```

`--package` matters: the package's default bin is `dcd`, so `npx @devicecloud.dev/dcd dcd-mcp` would run `dcd dcd-mcp` (an unknown command) instead of the server.

Auth is inherited from the CLI: set `DEVICE_CLOUD_API_KEY` as above, or run `dcd login` once and the server picks up the stored session. Point it at a non-prod environment with `DCD_API_URL`.

**`dcd_*` tools** (served by both `dcd mcp` and `dcd-mcp`)

| Tool | What it does |
| --- | --- |
| `dcd_list_devices` | Discover available devices, OS versions, and Maestro versions |
| `dcd_list_runs` | List recent test runs (filter by name/date, paginated) |
| `dcd_get_status` | Get the status + per-test results of a run |
| `dcd_download_artifacts` | Download a run's artifacts/report to disk |
| `dcd_run_cloud_test` | Submit a flow to run on the cloud (**billable**) |

**Read-only mode.** `dcd_run_cloud_test` consumes test minutes, so it is annotated as non-read-only/destructive (clients can prompt before calling it). To hide it entirely — recommended for autonomous or untrusted agents — pass `--read-only` at the end of `args` (`["-y", "--package=@devicecloud.dev/dcd", "dcd-mcp", "--read-only"]`), or set `DCD_MCP_READONLY=1` in `env`.

By default `dcd_run_cloud_test` is async: it returns an `uploadId` immediately, which you poll with `dcd_get_status`. Pass `wait: true` (bounded by `waitTimeoutSeconds`) to block until completion, or `dryRun: true` to preview the flows without submitting.
`--package` matters: the package's default bin is `dcd`, so `npx @devicecloud.dev/dcd dcd-mcp` would run `dcd dcd-mcp` (an unknown command) instead of the server. It signs in like `dcd mcp`, and takes `--read-only` and `DCD_MCP_READONLY=1` the same way.


## Development
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"test:unit": "node scripts/test-runner.mjs --unit",
"typecheck": "tsc --noEmit -p tsconfig.test.json"
},
"version": "5.12.1",
"version": "5.13.0",
"bugs": {
"url": "https://discord.gg/gm3mJwcNw8"
},
Expand Down
Loading
Loading