Expand description
rpi auth subcommand — persistent credential management. Mirrors the
Rust-relevant slice of the TS packages/coding-agent/src/cli/auth-command.ts
main.ts:runAuthCommand+core/auth-check.ts.
v1 ships three actions:
rpi auth login— prompt (no echo, viarpassword) for an Anthropic API key and persist it to~/.rpi/auth.json(atomic write + 0o600 on Unix). Mirrors the upstream/loginTUI’stype:"secret"prompt +modify.rpi auth check— local-only probe ofauth.json+ theANTHROPIC_*env vars; reportsready/not_ready(no network call — the upstream--no-refreshequivalent).--jsonemits a structured result.rpi auth logout— drop theanthropicentry fromauth.json(env vars are left untouched, matching upstream/logoutsemantics).
§Not ported (deferred — see docs/m6-cli-open-questions.md)
OAuth device-code login (Claude Pro/Max subscriptions), the full TUI
--provider picker, and auth print-api-key/print-bearer-token. Only
the anthropic provider id is handled.
Functions§
- run
rpi auth <sub> [args]entry.argsis the slice afterauth(i.e. the subcommand + its flags). Returns the process exit code. Async to match theapp::runshape, though v1 does no async work here.