mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
docs: add CLI syntax highlighting theme customization (#7324)
This commit is contained in:
@@ -45,6 +45,8 @@ The following settings can be configured at the root level of your config.yaml f
|
||||
| `GOOSE_TOOLSHIM_OLLAMA_MODEL` | Model for tool interpretation | Model name (e.g., "llama3.2") | System default | No |
|
||||
| `GOOSE_CLI_MIN_PRIORITY` | Tool output verbosity | Float between 0.0 and 1.0 | 0.0 | No |
|
||||
| `GOOSE_CLI_THEME` | [Theme](/docs/guides/goose-cli-commands#themes) for CLI response markdown | "light", "dark", "ansi" | "dark" | No |
|
||||
| `GOOSE_CLI_LIGHT_THEME` | Custom syntax highlighting theme for light mode | [bat theme name](https://github.com/sharkdp/bat#adding-new-themes) | "GitHub" | No |
|
||||
| `GOOSE_CLI_DARK_THEME` | Custom syntax highlighting theme for dark mode | [bat theme name](https://github.com/sharkdp/bat#adding-new-themes) | "zenburn" | No |
|
||||
| `GOOSE_CLI_SHOW_COST` | Show estimated cost for token use in the CLI | true/false | false | No |
|
||||
| `GOOSE_ALLOWLIST` | URL for allowed extensions | Valid URL | None | No |
|
||||
| `GOOSE_RECIPE_GITHUB_REPO` | GitHub repository for recipes | Format: "org/repo" | None | No |
|
||||
|
||||
@@ -235,6 +235,8 @@ These variables control how goose manages conversation sessions and context.
|
||||
| `GOOSE_DISABLE_SESSION_NAMING` | Disables automatic AI-generated session naming; avoids the background model call and keeps the default "CLI Session" (goose CLI) or "New Chat" (goose Desktop) | "1", "true" (case-insensitive) to enable | false |
|
||||
| `GOOSE_PROMPT_EDITOR` | [External editor](/docs/guides/goose-cli-commands#external-editor-mode) to use for composing prompts instead of CLI input | Editor command (e.g., "vim", "code --wait") | Unset (uses CLI input) |
|
||||
| `GOOSE_CLI_THEME` | [Theme](/docs/guides/goose-cli-commands#themes) for CLI response markdown | "light", "dark", "ansi" | "dark" |
|
||||
| `GOOSE_CLI_LIGHT_THEME` | Custom [bat theme](https://github.com/sharkdp/bat#adding-new-themes) for syntax highlighting when using light mode | bat theme name (e.g., "Solarized (light)", "OneHalfLight") | "GitHub" |
|
||||
| `GOOSE_CLI_DARK_THEME` | Custom [bat theme](https://github.com/sharkdp/bat#adding-new-themes) for syntax highlighting when using dark mode | bat theme name (e.g., "Dracula", "Nord") | "zenburn" |
|
||||
| `GOOSE_CLI_NEWLINE_KEY` | Customize the keyboard shortcut for [inserting newlines in CLI input](/docs/guides/goose-cli-commands#keyboard-shortcuts) | Single character (e.g., "n", "m") | "j" (Ctrl+J) |
|
||||
| `GOOSE_RANDOM_THINKING_MESSAGES` | Controls whether to show amusing random messages during processing | "true", "false" | "true" |
|
||||
| `GOOSE_CLI_SHOW_COST` | Toggles display of model cost estimates in CLI output | "1", "true" (case-insensitive) to enable | false |
|
||||
@@ -277,6 +279,10 @@ export GOOSE_PROMPT_EDITOR=vim
|
||||
# Set the ANSI theme for the session
|
||||
export GOOSE_CLI_THEME=ansi
|
||||
|
||||
# Customize syntax highlighting themes (uses bat themes)
|
||||
export GOOSE_CLI_LIGHT_THEME="Solarized (light)"
|
||||
export GOOSE_CLI_DARK_THEME="Dracula"
|
||||
|
||||
# Use Ctrl+N instead of Ctrl+J for newline
|
||||
export GOOSE_CLI_NEWLINE_KEY=n
|
||||
|
||||
|
||||
@@ -714,6 +714,14 @@ The `/t` command controls the syntax highlighting theme for markdown content in
|
||||
- The theme setting is saved to the [configuration file](/docs/guides/config-files) as `GOOSE_CLI_THEME` and persists between sessions
|
||||
- The saved configuration can be overridden for the session using the `GOOSE_CLI_THEME` [environment variable](/docs/guides/environment-variables#session-management)
|
||||
|
||||
**Custom Syntax Highlighting:**
|
||||
|
||||
You can customize the underlying syntax highlighting theme used for code blocks by setting:
|
||||
- `GOOSE_CLI_LIGHT_THEME` - Theme used when in light mode (default: "GitHub")
|
||||
- `GOOSE_CLI_DARK_THEME` - Theme used when in dark mode (default: "zenburn")
|
||||
|
||||
These accept any [bat theme name](https://github.com/sharkdp/bat#adding-new-themes). Popular options include "Dracula", "Nord", "Solarized (light)", "Solarized (dark)", "OneHalfDark", and "Monokai Extended". Run `bat --list-themes` to see all available themes.
|
||||
|
||||
:::info
|
||||
Syntax highlighting styles only affect the font, not the overall terminal interface. The `light` and `dark` themes have subtle differences in font color and weight.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user