provider command group manages authentication with AI API providers like OpenAI, Anthropic, and others.
Usage
Subcommands
login
Authenticate with an API provider. Shows an interactive menu when no provider name is specified.Provider name to authenticate with. If omitted, shows an interactive selection menu.
logout
Remove provider credentials. Shows an interactive menu when no provider name is specified.Provider name to log out from. If omitted, shows an interactive selection menu.
list
List all available API providers.Filter providers by type (e.g.,
llm, context_engine). Can be specified multiple times.Alias: -tOutput in machine-readable format.
Examples
Interactive Login
Start interactive provider selection:Login to Specific Provider
Authenticate with OpenAI:List All Providers
Filter by Provider Type
List only LLM providers:Machine-Readable Output
Logout from Provider
Alternative Command
You can also use thelist command:
Provider Types
Available provider types:llm- Large Language Model providers (OpenAI, Anthropic, etc.)context_engine- Embedding and semantic search providers (Voyage AI, Cohere, etc.)
Credential Storage
Credentials are stored securely:- macOS: Keychain
- Linux: Secret Service API (gnome-keyring, kwallet, etc.)
- Windows: Windows Credential Manager
Related Commands
forge config set provider <ID>- Set the default providerforge --provider <ID>- Override provider for a sessionforge list model- List available models for configured providers
Notes
- Some providers require additional setup (e.g., Azure OpenAI requires endpoint configuration)
- API keys are never displayed in plain text after initial entry
- Use
--porcelainflag for scripting and automation