--- name: verify-10x-cli description: Drive the real `10x` CLI (@przeprogramowani/10x-cli) end to end the way a learner does — login, list, get, sync, changelog, doctor — against a local fake delivery API with isolated config and project dirs, and capture stdout/stderr/exit codes, PTY screens and file-tree hashes as proof. Use after changing a command, the writer, conflict handling, auth or the API client, when unit tests pass but you need to see the shipped behaviour, or when asked to "verify", "run the CLI", "prove it works". --- # Verify 10x-cli The surface is a short-lived CLI (`10x `), not a server. Every run gets its own fake delivery API on an OS-assigned free port, its own `XDG_CONFIG_HOME`, and its own throwaway project dir — so several agents can verify in parallel on one machine and nothing touches production, real email, your `~/.config/10x-cli` or this checkout's `.claude/`. Everything goes through one helper (run from the repo root): ```bash V=.claude/skills/verify-10x-cli/scripts/verify.sh $V help ``` ## Launch ```bash bun install --frozen-lockfile # once per checkout $V up # prints run= api=http://127.0.0.1: pid= project= evidence= $V seed-auth # optional: logged-in state without driving the login flow ``` `up` is ready when it prints `run=…`: `scripts/fake-api.ts` only writes `api.json` after it is listening. It generates a fresh Ed25519 key; the CLI accepts it through `BUNDLE_PUBLIC_KEYSET`, which `src/lib/signing.ts` honours only when `API_BASE_URL` is `localhost`/`127.0.0.1`. The CLI runs from source (`bun run src/index.ts`); to prove the shipped Node bundle instead, `bun run build` and prefix commands with `VERIFY_ENTRY=dist`. Fixture served by the fake API (course `10xdevs3`, id `10xdevs-3`): | Lesson | Module state | Content | | --- | --- | --- | | `m1l1` | unlocked | skill `verify-fixture-skill`, prompt `verify-fixture-prompt`, rule, config `verify-fixture.json` | | `m1l2` | unlocked | skills `verify-m1l2-skill` and the six `core-skill-chain` members (`10x-frame` … `10x-impl-review`; `10x-plan` has two files) | | `m2l1` | locked (403) | — | `$V bump ` publishes a new upstream version (`v1` → `v2` in every file and a new catalog `contentHash`) — use it to prove `sync` and conflict handling. ## Doctor ```bash $V doctor # exit 0 = worth driving ``` Read-only. Checks: the fake API pid is alive **and** was started by this run, `/health` answers, the URL is loopback, config/project dirs are this run's, the checkout revision has not changed since `up` (rebuild/re-`up` if it did), and the CLI starts (`--version`). Run it first, and again whenever output looks wrong. Not the same as `10x doctor` (a feature, see the map). ## Drive Non-TTY (JSON envelope mode — the CLI implies `--json` when stdout is not a TTY): ```bash $V cli