Commands and verbs
Every command used to build, run, test and inspect Seed Exact: the bun exact.mjs verbs, the app's own server verb, package.json scripts, the root pnpm mobile scripts and the VS Code tasks.

All work on the mobile app goes through one launcher, bun exact.mjs <verb>, run from frontend/apps/mobile-exact. exact.mjs is a generated file that forwards to scripts/app-cli.mjs in the Exact checkout. bun exact.mjs help lists the verbs, bun exact.mjs <verb> --help prints one verb's flags, and --help all adds the rarer ones. The help texts live in Exact's scripts/help.mjs.

Exact verbs

Verb

What it does

Flags this project uses

web

The web dev loop: serves the app and reloads on every save. Foreground until Ctrl-C

--port <n> (default 8765, else the first free port up to 8864), --lan

web-build

Builds the web app once into target/web-dist

--out dist for a release build

serve

Serves a built site as a static host would

<dir>, --port <n> (default PORT, else 8765)

ios

Builds for an iOS simulator and installs it

--run, --sim <udid|name>, --prebuild, --release, --device, --archive <out.ipa>, --unsigned

test

Runs *.test.contract (or the files named) on a host, web by default. Each test launches the app fresh with its own store

test web, test ios, a file name, --sim, --size <w>x<h>

agent

Drives the app by hand with the driver operations, each one quoted argument

agent web|ios, --storage <name>, --sim, --scale 3, --touch platform, --json

verify

Builds if stale, runs all tests, checks each screen light and dark and at the largest text size, relaunches once. On iOS also measures scrolling

verify, verify ios, --shots <dir>, --sim

share

Builds for iPhone and prints an AppDrop link that installs it

--new-link, --force

contract

The Contract compiler

build app.contract --json --errors-only, fmt <file>, vocab <name>…, types app.contract -o app.contract.d.ts

tamber

The design in app.tamber

check ., eval ., fmt . --check

docs <heading words>

Prints a section of Exact's guides by heading


pattern [<name>]

Lists or writes a starter app. Not used after the first scaffold


update

After the Exact checkout moves: rewrites exact.mjs, patches, toolchain paths and the generated block of AGENTS.md

--without <platform>

lock

Refreshes the generated Cargo lock against the checkout


feedback

The authoring diary. feedback note "<text>" records friction and is required by the app's AGENTS.md

note, status

test, agent and verify compile, build and serve their own copy. They need no contract build first and no dev server. On iOS they rebuild only when the native build is missing or older than its sources. Details of the drive operations are in Simulators and devices, and of the test steps in Contract UI tests and Verify and visual checks.

The app's own verb

app.json declares one command and one server setting:

"commands": { "server": ["bun", "tools/test-server/index.ts"] }, "server": { "database": false }

bun exact.mjs server starts the combined local test server on 127.0.0.1:4790, which also starts the agents mock. Exact runs one server per app during test, verify and agent, and sends a test's request steps to the first loopback origin in app.ts (index.ts L1-L6). "database": false tells Exact the server keeps no database. See The local test server.

package.json scripts

Script

Runs

Purpose

bun run test

bun test src tools/test-server

The Bun unit tests, see Bun unit tests

bun run build

bun exact.mjs web-build --out dist

A release web build

bun run start

bun exact.mjs serve dist

Serve that build

The real vault suite has no script. Run it as REAL_VAULT=1 bun test ./.tests/real-vault/real-vault.test.ts, see Real vault compatibility suite.

Root scripts

The Seed repository's root package.json wraps the launcher so the app can be run from the root with pnpm:

Script

Runs

pnpm mobile:install

scripts/mobile install

pnpm mobile and pnpm mobile:ios

scripts/mobile exact.mjs ios --run

pnpm mobile:web

scripts/mobile exact.mjs web

pnpm mobile:test

scripts/mobile run test

pnpm mobile:typecheck

scripts/mobile exact.mjs contract build app.contract --errors-only

scripts/mobile changes into the app directory, puts rustup's proxy directory on PATH ("Exact selects the Rust toolchain with cargo +<version>"), reads the pinned Bun version from the app's packageManager field with node -p, and then runs mise exec bun@1.4.2 -- bun "$@". With install as the first argument it performs the machine setup described in Setting up a machine. The pinned Bun is separate from the Bun 1.3.10 that the vault server uses in CI, see GitHub Actions workflow.

VS Code tasks

.vscode/tasks.json defines six tasks, all using the $exact-contract problem matcher:

Task label

Command

contract: build this file

bun exact.mjs contract build "${file}"

contract: format this file

bun exact.mjs contract fmt "${file}"

app: web dev loop

bun exact.mjs web

app: test on web (default test task)

bun exact.mjs test web

app: run on macOS

bun exact.mjs mac --run

app: run on an iOS simulator

bun exact.mjs ios --run

The macOS task is a leftover of the scaffold: app.json declares only the web and ios hosts, and a native verb adds its platform to app.json the first time it runs (AGENTS.md L15-L17). Do not run it unless adding macOS is intended.

Delivery commands

Building for TestFlight uses scripts in tools/, not a launcher verb: tools/testflight.sh, tools/testflight-verify.mjs, tools/install-clipper-ci.sh. They are covered in Building and uploading to TestFlight and The Clipper delivery worker.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Comments