mix harness.onboard (client_utils v0.1.31)

View Source

Take the working copy this runs in from checkout to ready.

mix harness.onboard [PATH] [--check] [--relay-model-turns]

Writes the settings an agent session needs — the harness id its MCP mount addresses with, and the test partition its databases are named after — sets the git config the copy needs, and then names the databases it still wants without creating any of them.

--relay-model-turns is opt-in, and defaults off

Passing --relay-model-turns also writes ANTHROPIC_BASE_URL, routing every model turn through the harness's Anthropic proxy instead of straight to Anthropic. That proxy only understands /v1/messages — no other route it forwards — so setting this on an interactive session silently makes anything else the Claude Code client needs unavailable, /remote-control included, with no error anywhere to say why. Leave it off unless something specific reads the recorded turns (an observability UI, a sprite).

Why this lives here

A generated application depends on client_utils and not on CodeMySpec, so this is the only place a single command can onboard both. CodeMySpec's own mix cms.harness.onboard calls the same code with its own filesystem adapter and adds what only it needs — minting an id against the server, and addressing the agent hooks.

What it will not do

It never creates, migrates or drops a database. It prints the exact commands and leaves them to you. The rule exists because the version that ran them shelled out to mix with an environment that had MIX_ENV scrubbed out of it, resolved to the shared development database, and a sibling truncate emptied it three times.

It does not create worktrees. Make one, then run this inside it.