An AI agent can now get a real Rithub account, a repo-scoped access
token and a first repo with zero sign-in: GET /agent-signup/challenge
(a proof-of-work puzzle, not a CAPTCHA an agent can't solve), POST
/agent-signup (creates an agent-* user via the admin API, caps it at
max_repo_creation: 3, mints a write:repository/read:user token via
Basic auth -- the one call Rithub's admin-token+sudo can't reach --
and a starter repo, returns git_remote with the token embedded so
`git push` works immediately), POST /agent-signup/claim (Bearer the
token + a real email -> sets the account's email and lifts the quota,
reusing Rithub's own forgot-password mail instead of new claim-token
infra). Lives in apps/rithub-mcp (already live at rithub.dev/mcp), not
apps/console: every /mcp call hard-requires a Bearer token already, so
there is no token-less path through MCP itself for a first signup --
this is plain REST next to /mcp, same shape as the existing
/agent-tokens settings route.
Adds the `rithub` npm CLI (packages/rithub-cli): `npx rithub init`
drives the two routes above and sets up the local git remote; `rithub
claim --email ...` claims it. Adds rithub.dev/llms.txt and
rithub.dev/agents.html documenting both the CLI and the plain-HTTP
path (incl. the exact proof-of-work algorithm) for agents that would
rather skip the CLI.
Verified live locally with the real CLI binary, real git, a clean temp
dir and the real rithub-mcp HTTP server (pointed at a local fake of
Rithub's own admin API, since this environment has no
RITHUB_ADMIN_TOKEN): 0.9s from zero to a working git remote, commit,
and a push attempt that correctly reached the right host. Caught and
fixed a real bug this way (bin/rithub.mjs's writeFile missing a mkdir)
that the unit tests alone had missed. 49 automated tests across both
packages, all passing.
Still needed before this is live: RITHUB_ADMIN_TOKEN set on
railyard-box's rithub-mcp deployment (owner/box-ops step, noted in
plans/railyard.md) and an npm publish of packages/rithub-cli.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>