hoziron-cli config
Configuration management — view, edit, get/set values, manage API keys.
Synopsis
hoziron-cli config <subcommand> [options]
Subcommands
| Subcommand | Description |
|---|---|
show | Show the current configuration |
edit | Open config file in your editor |
get <key> | Get a config value by dotted key path |
set <key> <value> | Set a config value |
unset <key> | Remove a config key |
reload | Reload config from disk (live, no restart) |
set-key <provider> | Save an API key to .env |
delete-key <provider> | Remove an API key from .env |
test-key <provider> | Test provider connectivity |
hoziron-cli config show
Display the full configuration file.
$ hoziron-cli config show
[default_model]
provider = "anthropic"
model_id = "claude-sonnet-4-20250514"
[providers.anthropic]
api_key_env = "ANTHROPIC_API_KEY"
enabled = true
[providers.groq]
api_key_env = "GROQ_API_KEY"
enabled = true
[surfaces.api]
enabled = true
listen = "127.0.0.1:4200"
[health]
enabled = true
check_interval_secs = 30
failure_threshold = 5
recovery_cooldown_secs = 60
hoziron-cli config edit
Open config.toml in your $EDITOR.
$ hoziron-cli config edit
# Opens ~/.hoziron/config.toml in vim/nano/code
hoziron-cli config get
Get a value by dotted key path.
hoziron-cli config get <key>
Supported Key Paths
$ hoziron-cli config get default_model.provider
anthropic
$ hoziron-cli config get default_model.model_id
claude-sonnet-4-20250514
$ hoziron-cli config get providers.anthropic.api_key_env
ANTHROPIC_API_KEY
$ hoziron-cli config get surfaces.api.listen
127.0.0.1:4200
$ hoziron-cli config get health.check_interval_secs
30
$ hoziron-cli config get routing.simple_threshold
100
hoziron-cli config set
Set a value by dotted key path. Creates intermediate tables as needed.
hoziron-cli config set <key> <value>
Value Parsing
true/false→ boolean- Integer strings → integer
- Everything else → string
Examples
# Change default model
$ hoziron-cli config set default_model.provider openai
✓ Set default_model.provider = "openai"
$ hoziron-cli config set default_model.model_id gpt-4o
✓ Set default_model.model_id = "gpt-4o"
# Change listen address (raw TOML write only — hoziron-server's own
# surface-topology and hardening validation runs at boot, not here; see
# "Validation" below)
$ hoziron-cli config set surfaces.api.listen "0.0.0.0:4200"
✓ Set surfaces.api.listen = "0.0.0.0:4200"
# Enable/disable health monitoring
$ hoziron-cli config set health.enabled false
✓ Set health.enabled = false
# Add a new provider
$ hoziron-cli config set providers.ollama.base_url "http://localhost:11434"
✓ Set providers.ollama.base_url = "http://localhost:11434"
$ hoziron-cli config set providers.ollama.enabled true
✓ Set providers.ollama.enabled = true
# Configure complexity routing
$ hoziron-cli config set routing.simple_model "groq/llama-3.1-8b-instant"
$ hoziron-cli config set routing.complex_model "anthropic/claude-sonnet-4-20250514"
$ hoziron-cli config set routing.simple_threshold 100
$ hoziron-cli config set routing.complex_threshold 500
Validation
The config is validated after every set — but only against PlatformConfig's fields (provider inventory, [health], [server.cors], [auth], [catalog], [audit], etc.). [surfaces.*] (listen, mount, tls, allowed_ips, limits) belongs to hoziron-server's own config struct and is not validated by config set/get/unset — a bad surfaces.api.listen value or an invalid mount/hardening combination will write successfully here and only surface as an error the next time hoziron-server boots.
$ hoziron-cli config set health.check_interval_secs 1
✗ ValidationError: health.check_interval_secs must be in range 5..=300, got 1
$ hoziron-cli config set surfaces.api.listen "not a valid address"
✓ Set surfaces.api.listen = "not a valid address"
# ... but hoziron-server will refuse to boot with this value
hoziron-cli config unset
Remove a key from config.
$ hoziron-cli config unset routing
✓ Removed key: routing
$ hoziron-cli config unset providers.groq
✓ Removed key: providers.groq
hoziron-cli config reload
Apply config changes without restarting the daemon.
$ hoziron-cli config reload
✓ Configuration reloaded
Note: [surfaces.*] changes (listen, mount, tls, allowed_ips, limits) require a full restart to take effect — they're only read once, at hoziron-server boot. Reload handles:
- Provider additions/removals
- Health monitoring settings
- Model defaults
- Routing configuration
hoziron-cli config set-key
Interactively save an API key to ~/.hoziron/.env.
hoziron-cli config set-key <provider>
Examples
$ hoziron-cli config set-key anthropic
? Enter your Anthropic API key: ********
✓ Saved ANTHROPIC_API_KEY to ~/.hoziron/.env
$ hoziron-cli config set-key groq
? Enter your Groq API key: ********
✓ Saved GROQ_API_KEY to ~/.hoziron/.env
$ hoziron-cli config set-key openai
? Enter your OpenAI API key: ********
✓ Saved OPENAI_API_KEY to ~/.hoziron/.env
hoziron-cli config delete-key
Remove an API key from .env.
$ hoziron-cli config delete-key groq
✓ Removed GROQ_API_KEY from ~/.hoziron/.env
hoziron-cli config test-key
Test provider connectivity with the stored API key.
$ hoziron-cli config test-key anthropic
Testing anthropic... ✓ connected (245ms)
Models available: 5
$ hoziron-cli config test-key groq
Testing groq... ✗ authentication failed
Check GROQ_API_KEY in ~/.hoziron/.env
Config File Location
Resolution order:
--config <path>CLI flag$HOZIRON_HOME/config.toml~/.hoziron/config.toml
See Also
- ../config/config-toml.md — Full configuration reference
- context.md — Multi-instance configuration
- models.md — Model and provider management