Documentation
¶
Overview ¶
Package config stores a few user defaults so power users stop retyping the same flags. It is a small JSON file (config.json) under cct's config dir; it holds only non-secret preferences (which agent to act on, where the homes are, a default app port) and never anything sensitive. Every value it provides is just a default: an explicit flag always wins, so the file can be absent.
Index ¶
Constants ¶
const FileName = "config.json"
FileName is the config file's name within the config dir.
Variables ¶
var Keys = []string{"tool", "codex-home", "claude-home", "port"}
Keys lists the settable keys in a stable, display order.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Tool string `json:"tool,omitempty"` // codex | claude
CodexHome string `json:"codex_home,omitempty"` // default --codex-home
ClaudeHome string `json:"claude_home,omitempty"` // default --claude-home
Port int `json:"port,omitempty"` // default app port
}
Config is the set of user defaults. Empty fields mean "no default set".
func Load ¶
Load reads the config from dir. A missing file is not an error: it yields a zero Config so callers can treat "no config" and "empty config" alike.
func (Config) Entries ¶
Entries returns the configured key/value pairs in Keys order, omitting unset keys, for display by `cct config list`.