Summary
Add a claudely setup subcommand that walks the user through configuring their provider, base URL, auth token, and default model via an interactive wizard. Values persist to a platform-native config file and load on every subsequent claudely invocation.
Design spec
See docs/superpowers/specs/2026-05-03-setup-wizard-design.md for the full design.
Key decisions
- Config location: XDG on Linux (
~/.config/claudely/config.json), ~/Library/Application Support/ on macOS, %APPDATA% on Windows
- Precedence: CLI flag > env var > config file > provider default
loadSettings decoupling: moves from compat.ts to new config.ts — all config I/O in one module, compat.ts keeps only business logic
- Re-run behavior: shows current saved values as editable defaults (no "overwrite?" prompt)
New files
src/config.ts — configDir(), configPath(), loadConfig(), saveConfig(), loadSettings() (moved from compat.ts)
src/setup.ts — runSetup() (interactive wizard flow)
src/config.test.ts — unit tests for config persistence
Changes to existing files
src/compat.ts — remove loadSettings() and fs import (pure business logic only)
src/cli.ts — subcommand dispatch for setup, import loadSettings from config.ts, thread config into resolution chain
Wizard flow
- Pick provider (select from registry)
- Base URL (pre-filled with provider default or saved value)
- Auth token (pre-filled)
- Test connection (
/v1/models with 5s timeout, non-blocking)
- Pick default model (from discovered models, or manual entry)
- Confirm & save
Acceptance
Summary
Add a
claudely setupsubcommand that walks the user through configuring their provider, base URL, auth token, and default model via an interactive wizard. Values persist to a platform-native config file and load on every subsequentclaudelyinvocation.Design spec
See
docs/superpowers/specs/2026-05-03-setup-wizard-design.mdfor the full design.Key decisions
~/.config/claudely/config.json),~/Library/Application Support/on macOS,%APPDATA%on WindowsloadSettingsdecoupling: moves fromcompat.tsto newconfig.ts— all config I/O in one module, compat.ts keeps only business logicNew files
src/config.ts—configDir(),configPath(),loadConfig(),saveConfig(),loadSettings()(moved from compat.ts)src/setup.ts—runSetup()(interactive wizard flow)src/config.test.ts— unit tests for config persistenceChanges to existing files
src/compat.ts— removeloadSettings()andfsimport (pure business logic only)src/cli.ts— subcommand dispatch forsetup, importloadSettingsfromconfig.ts, thread config into resolution chainWizard flow
/v1/modelswith 5s timeout, non-blocking)Acceptance
claudely setupwalks through all 6 wizard stepsclaudelyrunssetuppre-fills with saved valuesloadSettingsmoved from compat.ts to config.tssrc/config.test.tscovers round-trip, missing file, corrupt JSON, directory creation