Configuration
Configuration
The Cade Console is configured through HCL configuration blocks. Settings control the prompt, history, display, colors, completion, and session behavior.
Configuration Example
prompt {
format = "cade:%s> "
show_player = true
show_watched_count = false
show_variable_count = false
prefix = ""
suffix = ""
}
history {
enabled = true
file_path = "~/.cade/debug_history"
max_entries = 1000
save_on_exit = true
ignore_duplicates = true
ignore_space = true
case_sensitive_search = false
}
display {
show_welcome = true
show_goodbye = true
output_format = "normal"
show_timestamps = false
timestamp_format = "15:04:05"
clear_on_startup = false
score_format {
style = "commas"
use_thousand_separator = true
thousand_separator = ","
abbreviate = false
}
}
colors {
enabled = true
scheme = "default"
}
completion {
enabled = true
max_results = 20
show_descriptions = true
}
session {
auto_save = false
auto_save_interval = 300
auto_restore = false
session_dir = "~/.cade/debug-sessions/"
save_output = false
max_output_lines = 1000
}
debug {
log_level = "info"
}
Options Reference
Prompt
| Option | Type | Default | Description |
|---|
format | string | "cade:%s> " | Prompt format string with placeholders |
show_player | bool | true | Show active player in the prompt |
show_watched_count | bool | false | Show count of watched variables |
show_variable_count | bool | false | Show count of set variables |
prefix | string | "" | Custom prompt prefix |
suffix | string | "" | Custom prompt suffix |
History
| Option | Type | Default | Description |
|---|
enabled | bool | true | Enable persistent command history |
file_path | string | ~/.cade/debug_history | Path to the history file |
max_entries | int | 1000 | Maximum number of history entries |
save_on_exit | bool | true | Save history when the console exits |
ignore_duplicates | bool | true | Do not store consecutive duplicate commands |
ignore_space | bool | true | Do not store commands starting with a space |
case_sensitive_search | bool | false | Case-sensitive Ctrl+R history search |
Display
| Option | Type | Default | Description |
|---|
show_welcome | bool | true | Show welcome message on startup |
show_goodbye | bool | true | Show goodbye message on exit |
output_format | string | "normal" | Output verbosity: compact, normal, verbose |
show_timestamps | bool | false | Show timestamps in output |
timestamp_format | string | "15:04:05" | Time format string for timestamps |
clear_on_startup | bool | false | Clear the screen when the console starts |
| Option | Type | Default | Description |
|---|
style | string | "commas" | Format style: raw, commas, abbreviated, custom |
use_thousand_separator | bool | true | Insert separators in large numbers |
thousand_separator | string | "," | Separator character |
abbreviate | bool | false | Abbreviate large numbers (e.g., 1.2M) |
custom_format | string | "" | Custom format string when style is custom |
Colors
| Option | Type | Default | Description |
|---|
enabled | bool | true | Enable color output |
scheme | string | "default" | Color scheme: default, solarized, monokai, custom |
When scheme is set to custom, individual color values can be overridden in a nested custom block for: command, keyword, string, number, variable, operator, error, success, warning, info, prompt, player.
Session
| Option | Type | Default | Description |
|---|
auto_save | bool | false | Automatically save session state |
auto_save_interval | int | 300 | Auto-save interval in seconds |
auto_restore | bool | false | Restore previous session on startup |
session_dir | string | ~/.cade/debug-sessions/ | Directory for session files |
save_output | bool | false | Include console output in saved sessions |
max_output_lines | int | 1000 | Maximum output lines to save |
TUI Configuration
The TUI has its own configuration that controls visual and performance behavior:
| Option | Type | Default | Description |
|---|
update_interval | duration | 100ms | How often the TUI refreshes panels |
max_log_lines | int | 1000 | Maximum log lines kept in memory |
max_history_size | int | 100 | Maximum command history entries in the TUI |
enable_mouse_events | bool | true | Enable mouse interaction (click, scroll, select) |
theme | string | "default" | Visual theme name |
Command History
Command history is stored at the path specified by history.file_path (default ~/.cade/debug_history). History is loaded on startup and saved on exit when save_on_exit is enabled. Duplicate consecutive commands and commands starting with a space can be excluded.
Use Ctrl+R to search history backwards and Ctrl+S to search forwards. The history command displays recent commands:
Hot Reload
When hot reload is enabled, the console watches your configuration files and reapplies changes without requiring a restart.
- File changes on disk are detected automatically.
- A short debounce (default 500ms) coalesces rapid saves into a single reload.
- Player state, watched variables, and history are preserved across reloads.
- Reload success and failure are reported in the console output pane.