-
Notifications
You must be signed in to change notification settings - Fork 0
Setup command
Muhammet Şafak edited this page May 27, 2026
·
1 revision
Interactive provider + API key + model wizard.
commitbrief setup [--local]
setup is the one command users run before they have a repo
configured. It tolerates being invoked outside a git repo (when
--local is not passed) so a fresh machine can be set up before
cloning anything.
-
Pick a provider. Choose from the registered list. Built-in
options:
- Anthropic (Claude) — needs API key
- OpenAI (GPT) — needs API key
- Google Gemini — needs API key
- Ollama (local) — needs base URL, no API key
-
API key. For providers with
NeedsKey: true, the wizard prompts for the key with password masking (huh.EchoModePassword). A link to the provider's console (Anthropic / OpenAI / AI Studio) is shown in the help line. -
Base URL. For Ollama only, the wizard asks for the base URL,
defaulting to
http://localhost:11434. -
Model. For Anthropic / OpenAI / Gemini the wizard offers the
static model list (see each Provider page). For
Ollama it queries
<base-url>/api/tagsand lists the models you have pulled locally; if discovery fails (Ollama not running, wrong URL, etc.) it falls back to a free-text input. - Connection test. A fast ping against the chosen provider with the credentials entered. Test failure surfaces the provider error and aborts the wizard without persisting anything.
-
Write config. The resulting config is layered onto the
existing file at the target path (user-level or repo-local per
--local), preserving API keys for providers other than the one you just configured. First-time runs start fromconfig.Default().
| Flag | Notes |
|---|---|
--local |
Write to <repo-root>/.commitbrief/config.yml instead of ~/.commitbrief/config.yml. Requires being inside a git repo. The repo-local path is added to the repo's .gitignore on first write. |
Re-running setup to add a second provider (or update an existing
one) only touches that provider's entry. If you already have
providers.anthropic.api_key set and run setup for OpenAI, the
Anthropic key stays intact. The active provider field is updated
to whatever you picked this round.
# First-time setup; writes ~/.commitbrief/config.yml.
commitbrief setup
# Per-repo override; writes <repo>/.commitbrief/config.yml and adds
# the path to .gitignore.
commitbrief setup --local- Config command — read / write individual config fields without the interactive wizard.
- Providers command — switch / test / list providers after setup is done.
- Doctor command — verify the new configuration end-to-end.