- • No-arg invocation → Ink REPL (src/repl.ts)
- • Args → one-shot, ANSI-free for pipes / CI / agents
- • Mode tracked in utils/runtime-mode.ts (isReplMode())
- • commands → services → api → backend (no skipped layers)
- • createServices() is the single composition root, built once per run
- • Sub-services shared so caches (FreetierService quota) survive across calls
- • OAuth Device Flow via auth/login-flow.ts
- • OS keychain storage with encrypted-file fallback (no native binding)
- • ensureAuthenticated() gates every API call before transport
- • Flat-parameter protocol: product + action constants in types/api-routes.ts
- • Wire-format adapters in api/adapters/ → domain types in types/
- • Format priority: --format → config → TTY (table | JSON); stable { error: { code, message, exit_code } }