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

OptionTypeDefaultDescription
formatstring"cade:%s> "Prompt format string with placeholders
show_playerbooltrueShow active player in the prompt
show_watched_countboolfalseShow count of watched variables
show_variable_countboolfalseShow count of set variables
prefixstring""Custom prompt prefix
suffixstring""Custom prompt suffix

History

OptionTypeDefaultDescription
enabledbooltrueEnable persistent command history
file_pathstring~/.cade/debug_historyPath to the history file
max_entriesint1000Maximum number of history entries
save_on_exitbooltrueSave history when the console exits
ignore_duplicatesbooltrueDo not store consecutive duplicate commands
ignore_spacebooltrueDo not store commands starting with a space
case_sensitive_searchboolfalseCase-sensitive Ctrl+R history search

Display

OptionTypeDefaultDescription
show_welcomebooltrueShow welcome message on startup
show_goodbyebooltrueShow goodbye message on exit
output_formatstring"normal"Output verbosity: compact, normal, verbose
show_timestampsboolfalseShow timestamps in output
timestamp_formatstring"15:04:05"Time format string for timestamps
clear_on_startupboolfalseClear the screen when the console starts

Score Format

OptionTypeDefaultDescription
stylestring"commas"Format style: raw, commas, abbreviated, custom
use_thousand_separatorbooltrueInsert separators in large numbers
thousand_separatorstring","Separator character
abbreviateboolfalseAbbreviate large numbers (e.g., 1.2M)
custom_formatstring""Custom format string when style is custom

Colors

OptionTypeDefaultDescription
enabledbooltrueEnable color output
schemestring"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

OptionTypeDefaultDescription
auto_saveboolfalseAutomatically save session state
auto_save_intervalint300Auto-save interval in seconds
auto_restoreboolfalseRestore previous session on startup
session_dirstring~/.cade/debug-sessions/Directory for session files
save_outputboolfalseInclude console output in saved sessions
max_output_linesint1000Maximum output lines to save

TUI Configuration

The TUI has its own configuration that controls visual and performance behavior:

OptionTypeDefaultDescription
update_intervalduration100msHow often the TUI refreshes panels
max_log_linesint1000Maximum log lines kept in memory
max_history_sizeint100Maximum command history entries in the TUI
enable_mouse_eventsbooltrueEnable mouse interaction (click, scroll, select)
themestring"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:

cade:debug> history 5

Hot Reload

When hot reload is enabled, the console watches your configuration files and reapplies changes without requiring a restart.