Skip to content

archon setup wizard does not offer Pi as an AI provider option (follow-up to #1494) #1607

@Wirasm

Description

@Wirasm

Problem

  • What problem are you trying to solve? Issue Setup overhaul: binary install primary, dead-simple wizard, archon doctor, embedded skill (v0.3.11) #1494 ("Setup overhaul…") spec'd "Step 1: AI provider (Claude / Codex / Pi) — validate binary path before save" as the first wizard step. PR feat(cli): setup overhaul + archon doctor + complete bundled skill #1566 landed the setup overhaul but the AI provider multiselect at packages/cli/src/commands/setup.ts:668-671 only offers Claude and Codex. Users wanting Pi as their default provider have to hand-edit ~/.archon/.env and/or ~/.archon/config.yaml after running setup, even though Pi is a registered community provider (@archon/providers, community/pi).
  • Who experiences it? Anyone whose primary coding agent is Pi, or who wants to evaluate Pi as their default. Pi supports ~20 LLM backends via <provider>/<model> refs, so this is a meaningful slice of users.
  • How often does it come up? Once per fresh install, but the friction is high — the user is told the wizard configures their AI provider and then has to discover that Pi is missing and configure it manually.

Proposed Solution

Add Pi to the multiselect in collectAIConfig. Drive the option list from getRegisteredProviders() rather than a hardcoded [claude, codex] array, so future community providers register cleanly. For Pi specifically:

  • Auth model: API keys for the chosen LLM backend(s). The wizard should ask which backend the user wants as Pi's default (Anthropic, OpenRouter, OpenAI, etc.) and prompt for the corresponding API key, writing it to the standard env var (ANTHROPIC_API_KEY, OPENROUTER_API_KEY, …).
  • Default model ref: persist a sensible default like anthropic/claude-haiku-4-5 to assistants.pi.model in ~/.archon/config.yaml (or the equivalent env var if Pi resolves model via env).
  • Binary check: equivalent to the Claude binary spawn-test in Setup overhaul: binary install primary, dead-simple wizard, archon doctor, embedded skill (v0.3.11) #1494 — verify pi (or whatever the entry binary is named) resolves and runs.

Defer to existing Pi provider docs (packages/docs-web/src/content/docs/getting-started/ai-assistants.md) for the exact list of backends and their env var names.

User Flow

Before (current)

$ archon setup
…
? Which built-in AI assistant(s) will you use?
  [ ] Claude (Recommended)
  [ ] Codex
  [!] Pi user has to ctrl-c, edit ~/.archon/.env by hand, set DEFAULT_AI_ASSISTANT=pi

After (proposed)

$ archon setup
…
? Which AI assistant(s) will you use?
  [ ] Claude (Recommended)
  [ ] Codex
  [+] Pi (community — ~20 LLM backends)

? Pi backend?
  [+] anthropic / claude-haiku-4-5
  [+] openrouter / qwen/qwen3-coder
  [+] openai / gpt-5.3
  …

? Enter ANTHROPIC_API_KEY: ********
✓ Pi binary spawn check passed

Alternatives Considered

Alternative Pros Cons Why not chosen
Document the manual env edit Zero code change Friction stays; users miss Pi exists Defeats #1494's "dead-simple wizard" goal
Add Pi as a separate "community providers" wizard step Keeps built-in step clean Two wizards for one decision; inconsistent with #1494 spec which lists Pi alongside Claude/Codex More UX, less discoverability
Ship a Pi-specific archon setup --provider pi flag Keeps default wizard tight Hides the option; users have to know to ask for it Same discoverability problem

Scope

  • Package(s) likely affected: cli (commands/setup.ts), maybe providers (if Pi config helper is needed)
  • Breaking change? No
  • Database changes needed? No
  • New external dependencies? No (Pi already a registered community provider)

Security Considerations

  • New permissions/capabilities? No
  • New external network calls? Pi backends already make calls; setup just stores the keys.
  • Secrets/tokens handling? Yes — backend API keys, written via the same writeScopedEnv path used today for Claude/Codex (0o600, backup-on-rewrite). No new mechanism needed.

Definition of Done

  • Pi appears in the AI provider multiselect.
  • User can select Pi alone (default = pi) or alongside Claude/Codex.
  • Wizard prompts for the chosen backend's API key and stores it under the canonical env var.
  • Wizard performs an equivalent binary spawn-test for Pi (parity with the Claude binary check from Setup overhaul: binary install primary, dead-simple wizard, archon doctor, embedded skill (v0.3.11) #1494).
  • archon doctor adds a Pi check parallel to the Claude binary check (only when Pi is configured — skip otherwise, same pattern as gh auth).
  • Tests cover Pi-only setup, mixed Claude+Pi setup, and Pi binary missing.
  • Docs updated: packages/docs-web/src/content/docs/getting-started/ai-assistants.md references the wizard path.

Tracking

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cliCLI commands and interfacefeature-requestNew functionality (external suggestion, needs review)uxUser experience improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions