Grok CLI Manual
Configuration
Most Grok configuration problems come from the file path, TOML nesting, or the model definition that is actually active.
Configuration paths
| Environment | Configuration file |
|---|---|
| Linux / macOS | ~/.grok/config.toml |
| Native Windows | %USERPROFILE%\.grok\config.toml |
| WSL2 | ~/.grok/config.toml inside WSL |
Show the configuration Grok actually reads:
grok inspectMain sections
| Section | Purpose |
|---|---|
[models] | Select the default model |
[endpoints] | Set the base address used for models and inference |
[model."<id>"] | Define model ID, key, backend, and context window |
[session] | Control session behavior and automatic compaction |
[ui] | Control the interface, tool approval, and compact mode |
Common session and UI settings
[session]
# The official default is 85; 80 compacts earlier
auto_compact_threshold_percent = 80
[ui]
max_thoughts_width = 120
yolo = true
compact_mode = false
permission_mode = "always-approve"yolo and always-approve reduce tool-confirmation prompts. Use them only with trusted projects in a local environment that you can roll back.
See the Grok CLI settings reference for all available fields.