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
d772c53
feat(e2e): run e2e tests on DeviceCloud devices with @devicecloud.dev…
finalerock44 Nov 23, 2026
46e0290
chore: merge production into dev after 5.15.0 (#345)
dcd-release-please[bot] Nov 23, 2026
64f0942
deps: bump the minor-and-patch group with 3 updates (#348)
dependabot[bot] Nov 23, 2026
92ce854
chore: bump eslint-plugin-unicorn from 79.0.0 to 80.0.0 (#349)
dependabot[bot] Nov 23, 2026
ca07b49
chore(deps): drop audit ignores that no longer match anything (#350)
finalerock44 Nov 23, 2026
b5706d8
chore: drop unused eslint disables (#351)
finalerock44 Nov 23, 2026
2e2377b
refactor: replace chalk with node:util styleText (#352)
finalerock44 Nov 23, 2026
bb273f0
fix: keep chalk's colour output in nested and multi-line text (#353)
finalerock44 Nov 23, 2026
9d9adc2
fix(artifacts): save into a folder given as the artifacts path, and d…
finalerock44 Nov 23, 2026
ba43df4
feat(e2e): set the device's locale from the e2e provider (#355)
finalerock44 Nov 23, 2026
c3e0fdf
fix(device): drop iOS 17 from the help text (#356)
finalerock44 Nov 24, 2026
03c01df
fix(download): show a manifest 400/403/404 instead of re-requesting t…
finalerock44 Nov 24, 2026
edf10a7
fix(upload): send resumable uploads to the configured Supabase URL (#…
riglar Nov 24, 2026
e03a78e
fix(upload): send Storage uploads with fetch in the standalone binary…
riglar Nov 24, 2026
00b2807
feat(upload): upload straight to the final storage path with a signed…
riglar Nov 24, 2026
161c428
fix(upload): refresh the upload token when Storage reports it expired…
riglar Nov 24, 2026
924181e
feat(e2e): link each test's video to its part of the session recordin…
finalerock44 Nov 25, 2026
a2c4f76
feat(encryption): always encrypt uploads; ignore --no-encrypt and DCD…
riglar Nov 27, 2026
422012a
feat(telemetry): honour DO_NOT_TRACK, and document what telemetry sen…
riglar Nov 27, 2026
c8c84ef
docs(e2e): Face ID on iOS devices (#365)
finalerock44 Nov 30, 2026
7252e0a
docs(e2e): Face ID on iOS 18 asks for permission first (#367)
finalerock44 Nov 30, 2026
4bf7cb6
chore: merge production into the 5.16.0 release
dcd-release-please[bot] Nov 30, 2026
392dac7
chore: release 5.16.0
dcd-release-please[bot] Nov 30, 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
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## [5.16.0](https://github.com/devicecloud-dev/dcd-cli/compare/v5.15.0...v5.16.0) (2026-11-30)


### Features

* **e2e:** link each test's video to its part of the session recording ([#362](https://github.com/devicecloud-dev/dcd-cli/issues/362)) ([924181e](https://github.com/devicecloud-dev/dcd-cli/commit/924181effca63f04bb7e16542988f862916560d6))
* **e2e:** run e2e tests on DeviceCloud devices with @devicecloud.dev/dcd/e2e ([#346](https://github.com/devicecloud-dev/dcd-cli/issues/346)) ([d772c53](https://github.com/devicecloud-dev/dcd-cli/commit/d772c533bf56165292e30420a0598f21469af86a))
* **e2e:** set the device's locale from the e2e provider ([#355](https://github.com/devicecloud-dev/dcd-cli/issues/355)) ([ba43df4](https://github.com/devicecloud-dev/dcd-cli/commit/ba43df49e655d54f3e78fab9d6ce853213c7d0e7))
* **encryption:** always encrypt uploads; ignore --no-encrypt and DCD_ENCRYPT=0 ([#363](https://github.com/devicecloud-dev/dcd-cli/issues/363)) ([a2c4f76](https://github.com/devicecloud-dev/dcd-cli/commit/a2c4f76c19f471f363636bd2e8a3fbdf85e7016a))
* **telemetry:** honour DO_NOT_TRACK, and document what telemetry sends ([#364](https://github.com/devicecloud-dev/dcd-cli/issues/364)) ([422012a](https://github.com/devicecloud-dev/dcd-cli/commit/422012a7c8ad73dbf1ffa1e7305e58e90c86668d))
* **upload:** upload straight to the final storage path with a signed token ([#360](https://github.com/devicecloud-dev/dcd-cli/issues/360)) ([00b2807](https://github.com/devicecloud-dev/dcd-cli/commit/00b2807f59138737fb00a112d088d4c96a884fe2))


### Bug Fixes

* keep chalk's colour output in nested and multi-line text ([#353](https://github.com/devicecloud-dev/dcd-cli/issues/353)) ([bb273f0](https://github.com/devicecloud-dev/dcd-cli/commit/bb273f0f88d5cc7bc9d123f5e7eda50103df1993))
* **artifacts:** save into a folder given as the artifacts path, and d… ([#354](https://github.com/devicecloud-dev/dcd-cli/issues/354)) ([9d9adc2](https://github.com/devicecloud-dev/dcd-cli/commit/9d9adc2065c9787399422651e5cfb57740b186b9))
* **device:** drop iOS 17 from the help text ([#356](https://github.com/devicecloud-dev/dcd-cli/issues/356)) ([c3e0fdf](https://github.com/devicecloud-dev/dcd-cli/commit/c3e0fdfc49ffb73a9ee49e041ef6d929968d1f86))
* **download:** show a manifest 400/403/404 instead of re-requesting the inline route ([#357](https://github.com/devicecloud-dev/dcd-cli/issues/357)) ([03c01df](https://github.com/devicecloud-dev/dcd-cli/commit/03c01dfc256081aede92d8250f1f2f398465250a))
* **upload:** refresh the upload token when Storage reports it expired ([#361](https://github.com/devicecloud-dev/dcd-cli/issues/361)) ([161c428](https://github.com/devicecloud-dev/dcd-cli/commit/161c4284af227d119439ffe92420c387f11b2e1d))
* **upload:** send resumable uploads to the configured Supabase URL ([#358](https://github.com/devicecloud-dev/dcd-cli/issues/358)) ([edf10a7](https://github.com/devicecloud-dev/dcd-cli/commit/edf10a7e9d46dcd50660188da8c4c02f00a8bfcf))
* **upload:** send Storage uploads with fetch in the standalone binary ([#359](https://github.com/devicecloud-dev/dcd-cli/issues/359)) ([e03a78e](https://github.com/devicecloud-dev/dcd-cli/commit/e03a78ed4cdf25eeeb074d667b3b418646715019))


### Dependencies

* bump the minor-and-patch group with 3 updates ([#348](https://github.com/devicecloud-dev/dcd-cli/issues/348)) ([64f0942](https://github.com/devicecloud-dev/dcd-cli/commit/64f0942ab1244656aabec30785ca3ef30d04969e))


### Code Refactoring

* replace chalk with node:util styleText ([#352](https://github.com/devicecloud-dev/dcd-cli/issues/352)) ([2e2377b](https://github.com/devicecloud-dev/dcd-cli/commit/2e2377bfd357bdebfd7a69beb7122d65e8af4818))

## [5.15.0](https://github.com/devicecloud-dev/dcd-cli/compare/v5.14.1...v5.15.0) (2026-11-19)


Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- `pnpm build` — clean, compile TypeScript to `dist/`, and `chmod +x dist/index.js dist/mcp/index.js` so both published binaries are directly executable.
- `pnpm build:binaries` — `scripts/build-binaries.mjs` produces the bun-compiled, self-contained `dcd-<platform>-<arch>` binaries published to GitHub Releases (the install `dcd upgrade` self-updates). The platform/arch keys must stay in sync with `ASSET_BY_PLATFORM` in `src/commands/upgrade.ts`.
- `pnpm lint` — ESLint over `src/` and `test/`.
- `pnpm typecheck` — `tsc --noEmit -p tsconfig.test.json` over `src/` and `test/` (strict mode; `pnpm build` only compiles `src/`). Requires Node `>=22`.
- `pnpm typecheck` — `tsc --noEmit -p tsconfig.test.json` over `src/` and `test/` (strict mode; `pnpm build` only compiles `src/`). Requires Node `>=22.8`.
- `pnpm test` — runs `scripts/test-runner.mjs`: builds the CLI, boots the mock API if one is available, then runs mocha. TypeScript is loaded by **tsx** (`.mocharc.json`'s `node-option: ["import=tsx"]`), *not* ts-node — Mocha 11 imports specs as ESM, which bypasses the `require: ts-node/register` hook. The runner isolates `DCD_CONFIG_DIR` to a temp dir so tests never touch your real `dcd login` session.
- `pnpm test:unit` — the same runner with `--unit`: unit specs only, no mock API. **This is what CI runs.**
- Tests split into `test/unit/*` (pure, no backend) and `test/integration/*` (drive the built CLI against a Prism mock of the dcd API on port 3001).
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is a one-time step. PRs cannot be merged until the CLA check is green.

## Getting started

You need **Node.js 22+** and **[pnpm](https://pnpm.io)** (`packageManager` pins
You need **Node.js 22.8+** and **[pnpm](https://pnpm.io)** (`packageManager` pins
the exact version; [Corepack](https://nodejs.org/api/corepack.html) will pick it
up automatically).

Expand Down
55 changes: 52 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ On Windows:
irm https://get.devicecloud.dev/install.ps1 | iex
```

Or via npm if you already have Node 22+:
Or via npm if you already have Node 22.8+:

```sh-session
$ npm install -g @devicecloud.dev/dcd
Expand Down Expand Up @@ -105,7 +105,7 @@ $ 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.
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.8 or newer on the app's PATH, and it checks npm each time it starts.

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` (https, or plain http to `localhost` only).

Expand Down Expand Up @@ -144,10 +144,59 @@ The npm package also ships `dcd-mcp`, an older server with the same `dcd_*` tool

`--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.

## e2e tests on DeviceCloud devices (early access)

`@devicecloud.dev/dcd/e2e` is a device provider for [e2e](https://github.com/e2e-inc/e2e). Each e2e worker gets its own DeviceCloud device session, and e2e drives the device directly. The session shows in the console, is recorded, and is billed like any other. Your organization needs this turned on by DeviceCloud first.

```ts
// e2e.config.ts
import type { E2EConfig } from 'e2e';
import { mobile } from '@e2e-dev/mobile';
import { deviceCloud } from '@devicecloud.dev/dcd/e2e';

const engine = mobile({ platform: 'android', device: deviceCloud() });

export default {
targets: [{ name: 'android', engine, app: { bundleId: 'com.example.app', appPath: './build/app.apk' } }],
// The first screen read after a launch can take a few seconds.
assertionTimeout: 20_000,
} satisfies E2EConfig;
```

Run `npx e2e run` with `DEVICE_CLOUD_API_KEY` set. The provider uploads `appPath` once per run and each session installs it, so e2e installs nothing itself. To use a build you already uploaded, pass `deviceCloud({ appBinaryId })`. It also takes `model`, `os`, `maxDurationMin`, and `locale` (such as `en_US`) for the device's language and region, set before your build is installed. Each session's console link is printed as the run starts, and the session is stopped when e2e is done with it.

With e2e's `video` option on (any setting but `'off'`), each test's video in e2e's report is a console link to that test's part of the session's recording. The session is recorded as one video, so the link plays the part from the test's start to its end; it works once the session has ended and its video has uploaded, for as long as the session's files are kept.

Face ID works on iOS devices. Enrol it with `device.enrollBiometrics('faceid', true)` before the step that opens the prompt. Then `device.setBiometrics('faceid', 'match')` or `'nonmatch'` answers the prompt that is open or opens next, so call it straight after that step: DeviceCloud waits up to 8 seconds for the prompt to open and answers once it can take the answer. On iOS 18, the first time your app asks for Face ID, iOS asks whether the app may use it and opens the prompt only once that is answered: accept it with `device.alert('accept')` before answering. After a match iOS plays a short success animation, and a tap in the second that follows can be lost, so wait for your app's own response before the next tap. A non-match leaves the prompt up showing "Face Not Recognised", as on a phone, and your app hears nothing until the test cancels it with `device.alert('dismiss')` or presses **Try Face ID Again** and answers again. Touch ID and Android fingerprints aren't available: every DeviceCloud iOS device has Face ID, and the Android devices have no screen lock or enrolled fingerprint. Passkey sheets ("Save a passkey?", "Sign In") are drawn by iOS outside your app, so screen reads don't list their buttons; an agent step can press them from the screenshot, or a test can tap their coordinates.


## Telemetry

The CLI sends a small amount of usage and error data to the DeviceCloud API. We use it only for debugging and development: to find and fix bugs, and to see which commands and options are used. It is not used for marketing, and it is not sold.

**What is sent**, for each command run:

- the command name and its arguments, with secrets removed (API keys, `--env` values, text typed into a device, and the query part of any URL, which is where signed links keep their credential)
- whether it succeeded, how long it took, and the error message if it failed (URLs redacted the same way)
- the CLI version, how it was installed, the Node.js version, the OS and CPU architecture
- how you signed in (API key or `dcd login`), your organization ID, and a random ID for this run
- whether the app, flows and env vars were encrypted

Nothing is sent until a command has signed in, so `--help`, `--version` and `dcd login` itself send nothing. Telemetry goes to the same API the command uses (`--api-url`, or the default). A failure to send it never affects the command.

**Turning it off.** Set either of these in your environment:

```sh-session
$ export DO_NOT_TRACK=1 # the cross-tool convention, see consoledonottrack.com
$ export DCD_TELEMETRY_DISABLED=1
```

`0`, `false` or an empty value leaves telemetry on. For the MCP server, add the variable to the `env` block of your MCP client's config.


## Development

Requires Node 22+ and [pnpm](https://pnpm.io). `pnpm install` builds the CLI and installs the git hooks automatically.
Requires Node 22.8+ and [pnpm](https://pnpm.io). `pnpm install` builds the CLI and installs the git hooks automatically.

```sh-session
$ pnpm install # install deps, build, set up git hooks
Expand Down
13 changes: 0 additions & 13 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
// This plugin ships as ESM with a `default` export under CJS interop.
const unicornPlugin =
require('eslint-plugin-unicorn').default ?? require('eslint-plugin-unicorn');

module.exports = tseslint.config(
{
Expand All @@ -21,16 +18,6 @@ module.exports = tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
// `unicorn` is only registered so legacy
// `// eslint-disable-next-line unicorn/...` comments scattered through
// the source resolve. We don't enable any rules from it.
// `eslint-plugin-import` used to be registered here for the same reason,
// but it was dropped: it dragged in minimatch@3 -> brace-expansion@1.x,
// which has an unpatched DoS advisory (GHSA-mh99-v99m-4gvg, no 1.x
// backport) and failed `pnpm audit`. No rules from it were ever enabled.
plugins: {
unicorn: unicornPlugin,
},
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
"dependencies": {
"@clack/prompts": "^1.6.0",
"@modelcontextprotocol/sdk": "^1.31.0",
"@supabase/supabase-js": "^2.108.2",
"bplist-parser": "^0.5.0",
"chalk": "^6.0.0",
"bplist-parser": "^0.6.0",
"citty": "^0.2.2",
"js-yaml": "^5.2.2",
"node-stream-zip": "^1.15.0",
Expand All @@ -29,7 +27,6 @@
"chai": "^6.2.2",
"eslint": "^10.15.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-unicorn": "^79.0.0",
"husky": "^9.1.7",
"mocha": "^12.0.0",
"prettier": "^3.8.4",
Expand All @@ -38,7 +35,7 @@
"typescript-eslint": "^8.73.0"
},
"engines": {
"node": ">=22.0.0"
"node": ">=22.8.0"
},
"files": [
"/dist"
Expand Down Expand Up @@ -66,7 +63,7 @@
"test:unit": "node scripts/test-runner.mjs --unit",
"typecheck": "tsc --noEmit -p tsconfig.test.json"
},
"version": "5.15.0",
"version": "5.16.0",
"bugs": {
"url": "https://discord.gg/gm3mJwcNw8"
},
Expand All @@ -79,18 +76,20 @@
"testing"
],
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js",
"./e2e": {
"types": "./dist/e2e/index.d.ts",
"default": "./dist/e2e/index.js"
},
"./package.json": "./package.json",
"./dist/*": "./dist/*"
},
"packageManager": "pnpm@10.17.1",
"pnpm": {
"overrides": {
"minimatch@>=10.0.0 <11.0.1": "11.0.1",
"glob@>=9.0.0 <14.0.2": "14.0.2"
},
"auditConfig": {
"ignoreGhsas": [
"GHSA-frvp-7c67-39w9",
"GHSA-vfj7-8cjw-p6xm",
"GHSA-fc5q-39xc-vjpf"
]
}
}
}
Loading
Loading