Skip to content

Providers command

Muhammet Şafak edited this page May 27, 2026 · 1 revision

commitbrief providers

Non-destructive operations on the provider/model configuration. The parent command does nothing on its own; use one of the three subcommands.

commitbrief providers list
commitbrief providers use <name> [--local]
commitbrief providers test <name>

providers list

Show every provider — registered in the binary plus any custom names present in the merged config — alphabetically. An asterisk marks the active provider; the model and API-key status (masked) are shown.

* anthropic   model=claude-opus-4-7              key=sk-ant-…abcd
  gemini      model=gemini-2.5-flash             key=AIza…wxyz
  ollama      model=qwen2.5-coder:14b            key=http://localhost:11434
  openai      model=gpt-4o-mini                  key=(not set)

For Ollama (which needs no API key) the right column shows the configured base_url instead. For all other providers the key is masked to first 7 chars + dots + last 4 chars (sk-ant-…abcd). Keys shorter than 12 characters are summarised as (configured) so low-entropy strings never leak.

list reads but does not write.

providers use <name>

Switch the active default provider. Takes one positional argument: the provider name (must be a registered provider — anthropic, openai, gemini, ollama, claude-cli, gemini-cli).

commitbrief providers use openai

If the chosen provider has no API key (and is not ollama), use emits a warning but proceeds. The active selection still updates; the next review will fail at the credentials check if you have not run setup for that provider.

Flag Notes
--local Write to <repo>/.commitbrief/config.yml instead of the user-level file.

use rewrites only the targeted file (user-level or repo-local) so merged state from one scope does not promote to the other.

providers test <name>

Ping a configured provider to verify the API key and reachability. Reports the round-trip latency on success.

$ commitbrief providers test gemini
gemini: OK (412ms)

Failure surfaces the provider error and exits non-zero. The state of config.provider is not changed.

test works for any registered provider — including ollama and the CLI-tool-backed providers, which probe their respective endpoints / binaries.

Provider names

The built-in registry includes:

  • anthropic
  • openai
  • gemini
  • ollama
  • claude-cli
  • gemini-cli
  • mock (test-only; registered but not user-relevant)

See Providers for what each one needs and supports.

Clone this wiki locally