# CLI Themes

The CLI supports 4 built-in color themes configured via `cli.theme` in `config.yaml`.

| Theme | Description |
|-------|-------------|
| `midnight` | Default dark theme |
| `dawn` | Warm light theme |
| `high-contrast` | Maximum readability |
| `accessible` | CVD-safe blue/orange (IBM palette) |

```yaml
cli:
  theme: "accessible"
```

Every color in the renderer and REPL is routed through a `CliTheme` frozen dataclass with semantic color slots. The `NO_COLOR` environment variable is respected — when set, the renderer emits structural characters (gutters, separators) but suppresses all ANSI color codes.

## Semantic color slots

`CliTheme` defines the complete palette used by the CLI. The slots below were added in [#1370](https://github.com/troylar/anteroom/issues/1370) specifically for the visual-hierarchy helpers (`render_user_message`, `render_assistant_prose`, `render_tool_call_*`, `render_system_message`, `render_turn_separator`, `_code_block_container`):

| Slot | Purpose |
|------|---------|
| `user_gutter` | Left gutter color for user messages |
| `assistant_gutter` | Left gutter color for AI prose |
| `tool_gutter` | Left gutter color for tool call/result lanes |
| `system_gutter` | Left gutter color for system/info/warning/error messages |
| `code_bg` | Code-block background frame color |
| `code_label` | Code-block language label color (shown above fenced blocks when `cli.hierarchy.code_block_language_label: true`) |
| `turn_separator` | Thin horizontal separator drawn between turns |
| `timestamp` | Subtle right-aligned timestamp color (shown when `cli.hierarchy.show_timestamps: true`) |

The other 22 slots (accents, text, status colors, backgrounds, diff highlights, MCP indicator, toolbar, logo accent, inline code) are documented inline in `src/anteroom/cli/themes.py`.

## Visual hierarchy (`cli.hierarchy`)

Three knobs under `cli.hierarchy` control how strongly the container helpers frame each message type. All three defaults preserve existing observable behavior; opt in to the louder variants when you want more scan-ability.

| Field | Type | Default | Description |
|---|---|---|---|
| `show_timestamps` | boolean | `false` | Right-align a subtle timestamp on each user/assistant turn. Env: `AI_CHAT_CLI_HIERARCHY_SHOW_TIMESTAMPS` |
| `turn_separator_char` | string | `"─"` | Box-drawing character used by `render_turn_separator()`. Env: `AI_CHAT_CLI_HIERARCHY_TURN_SEPARATOR_CHAR` |
| `code_block_language_label` | boolean | `true` | Emit a small language label above fenced code blocks (e.g. `python` above a syntax-highlighted snippet). Env: `AI_CHAT_CLI_HIERARCHY_CODE_BLOCK_LANGUAGE_LABEL` |

Example — a pack-authored config that overrides two hierarchy slots and tweaks the visual knobs:

```yaml
# my-pack/anteroom.yaml
cli:
  theme: "midnight"
  hierarchy:
    show_timestamps: true
    turn_separator_char: "="
    code_block_language_label: false
```

A pack-authored theme can override specific slots by shipping a YAML fragment with just the changed keys. Anything not overridden falls back to the built-in midnight palette.

## See also

- [Web UI Themes](../web-ui/themes.md) — browser-side theme switching
- [`config.yaml` schema](../configuration/config-file.md#cli) — full `cli.*` field reference
- [Environment Variables](../configuration/environment-variables.md) — `AI_CHAT_CLI_HIERARCHY_*` overrides
