Skip to content

feat(cli/web): archon setup --init-repo — skill + .archon/ only, skip config wizard #1196

@133Felix

Description

@133Felix

Problem

  • What problem are you trying to solve? Adding Archon to a new repo when global config (~/.archon/config.yaml, ~/.archon/.env) is already set up forces the user through the full wizard (database → AI providers → platforms → credentials → bot display name) even though none of that needs to change. Users have to click through ~6 prompts and the "Update config" path just to get to the last step where the skill install is actually offered.
  • Who experiences it? Anyone onboarding an existing Archon install to a second/third/Nth repo — via CLI and Web UI.
  • How often does it come up? Every time a user adds Archon to a new project. For people using Archon across many repos, this is frequent friction.

Proposed Solution

Add a lightweight "init repo" mode that only does two things and nothing else:

  1. Copy the bundled Archon skill into <target>/.claude/skills/archon/ (exactly what copyArchonSkill() already does at packages/cli/src/commands/setup.ts:1183).
  2. Scaffold the .archon/ directory structure (commands/, workflows/) in the target repo, as documented in .claude/skills/archon/references/repo-init.md.

Expose it in two places:

  • CLI: archon setup --init-repo [--path <dir>] (or dedicated archon init). Skips the entire config wizard. No database prompt, no AI provider prompt, no platform prompts, no bot name prompt.
  • Web UI: add an "Initialize repo (skill + .archon/ only)" option to the setup flow — a single path picker + confirm, no services, no credentials.

Both should be idempotent (re-running overwrites skill files to latest version, does not clobber user-written .archon/commands/* or .archon/workflows/*) and should not touch global config, .env files, database, or credentials.

User Flow

Before (current)

```
$ archon setup
┌ Archon Setup Wizard
◇ Existing Configuration Found: SQLite, Claude configured, Platforms: None
◆ What would you like to do?
│ [!] Add platforms / Update config / Start fresh ← user must pick one
│ [!] Database prompt
│ [!] AI provider prompt
│ [!] Platform selection prompt
│ [!] Bot display name prompt
◇ Install the Archon skill in your project? (recommended) ← finally!
◇ Project path to install the skill: /path/to/repo
└ Done
```

Current workaround (undocumented as the fast path): cp -r Archon/.claude/skills/archon <repo>/.claude/skills/ && mkdir -p <repo>/.archon/{commands,workflows}.

After (proposed)

```
$ archon setup --init-repo --path ~/projects/new-repo
[+] Installing Archon skill → ~/projects/new-repo/.claude/skills/archon
[+] Scaffolding .archon/{commands,workflows} → ~/projects/new-repo/.archon
└ Done (global config untouched)
```

Web UI equivalent: new "Init repo only" button that prompts for path and runs the same two-step flow.

Alternatives Considered

Alternative Pros Cons Why not chosen
Document the cp -r manual workaround more prominently Zero code change Still manual, users miss updates to skill files, no .archon/ scaffold Hides functionality that already exists in the code (copyArchonSkill) behind shell commands
Re-order the wizard so skill install comes first, then offer "skip the rest" Minimal refactor Still a wizard; discoverability ("can I skip?") poor; Web UI still linear Doesn't solve the Web UI case; still feels like a wizard
Add archon init as a new top-level command Cleaner UX, memorable Two entrypoints (setup and init) need to stay in sync Reasonable alternative — could be done in addition to the --init-repo flag
Always auto-offer skill install when Archon detects a non-initialized repo on first archon workflow call Zero-friction Surprising side effect; bad UX for CI/ephemeral contexts Implicit behavior violates least-astonishment

Scope

  • Package(s) likely affected: cli, server (for Web UI endpoint), web (for UI button)
  • Breaking change? No
  • Database changes needed? No
  • New external dependencies? No

Security Considerations

  • New permissions/capabilities? No — writes only under user-specified target path (same scope as existing copyArchonSkill)
  • New external network calls? No
  • Secrets/tokens handling? No — explicitly does not read or write .env, credentials, or global config
  • If any Yes, describe: n/a

Definition of Done

  • archon setup --init-repo [--path <dir>] implemented; defaults --path to CWD
  • Running --init-repo exits after skill copy + .archon/ scaffold, with no config/DB/platform/AI prompts
  • Idempotent: re-running overwrites skill files, preserves existing user files in .archon/commands/ and .archon/workflows/
  • Web UI exposes an equivalent "Initialize repo only" action (path picker + confirm, no service prompts)
  • Unit tests covering the new CLI flag path (spawned wizard is not entered) and the Web UI endpoint
  • README "Getting Started" and docs "Using With Claude Code (Skill)" updated to reference the new fast path
  • `archon setup --help` output documents the flag

Notes for Implementers

The building blocks already exist:

  • `copyArchonSkill(targetPath)` — `packages/cli/src/commands/setup.ts:1183`
  • `BUNDLED_SKILL_FILES` constant — `packages/cli/src/bundled-skill.ts:41`
  • Manual repo-init recipe — `.claude/skills/archon/references/repo-init.md`

The change is mostly wiring: a new branch in `setupCommand()` that early-returns after skill + `.archon/` scaffolding when `--init-repo` is set, plus a parallel Web UI endpoint + button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority - Backlog, when time permitsarea: cliCLI commands and interfaceeffort/lowSingle file or function, one responsibility, isolated changefeature-requestNew functionality (external suggestion, needs review)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions