config command group manages Forge configuration settings including default model, provider, and other preferences.
Usage
Subcommands
set
Set a configuration value.Configuration field to set. Available fields:
model- The active modelprovider- The active provider
Value to set for the configuration field.
get
Get a configuration value.Configuration field to get. Available fields:
model- The active modelprovider- The active provider
Output in machine-readable format.
list
List all configuration values.Output in machine-readable format.
Examples
Set Default Model
Set Default Provider
Get Current Model
List All Configuration
Machine-Readable Output
Get configuration in JSON format:Alternative Commands
You can also use thelist command:
Configuration Fields
model
The default AI model to use for conversations. Format:provider/model-name
provider
The default API provider to use.Runtime Overrides
Configuration values can be overridden for a single session:Configuration File
Configuration is stored in:- User config:
~/.config/forge/config.toml - Local config:
./.forge/config.toml
Related Commands
forge info- View current configuration and environmentforge list model- List available modelsforge list provider- List available providersforge --model <MODEL>- Override model for a sessionforge --provider <PROVIDER>- Override provider for a session
Notes
- Configuration changes take effect immediately
- Use runtime overrides (
--model,--provider) for temporary changes - Configuration is stored per-user and can be project-specific