Configuration
Configure the Opta CLI with persistent settings, environment profiles, and a TUI settings menu. All configuration is stored in a single JSON file and can be managed via commands or edited directly.
Overview
The Opta CLI stores its configuration in a JSON file at ~/.config/opta/config.json. Settings control connection parameters, default model selection, provider fallback behavior, UI preferences, and more. You can manage configuration through three interfaces: CLI commands, the TUI settings menu, or direct file editing.
Config Commands
Listing Config
opta config list displays all current configuration values in a readable format. Settings are grouped by category.
opta config listconnection.host 192.168.188.11 connection.port 1234 model.default qwen3-30b-a3b provider.fallback true ui.theme dark ui.streaming true
Get and Set
Use opta config get to read a single setting and opta config set to update one. Settings use dot notation for nested keys.
opta config get connection.host192.168.188.11
opta config set connection.host 192.168.1.100connection.host = 192.168.1.100
opta config set model.default deepseek-r1model.default = deepseek-r1
TUI Settings Menu
opta config menu opens an interactive terminal UI for browsing and modifying settings. This is the easiest way to explore available options and understand what each setting does.
opta config menuOpta Settings
━━━━━━━━━━━━━
> Connection
Host: 192.168.188.11
Port: 1234
Model
Default: qwen3-30b-a3b
Fallback: Anthropic (enabled)
UI
Theme: dark
Streaming: enabled
[Enter] Edit [Tab] Next section [q] Save & QuitConfig File Location
The configuration file lives at ~/.config/opta/config.json and follows the XDG Base Directory specification. On Linux, it respects $XDG_CONFIG_HOME if set.
{
"connection": {
"host": "192.168.188.11",
"port": 1234
},
"model": {
"default": "qwen3-30b-a3b",
"aliases": {
"qwen": "mlx-community/Qwen3-30B-A3B-MLX-4bit",
"deepseek": "mlx-community/DeepSeek-R1-0528-MLX-4bit"
}
},
"provider": {
"fallback": true,
"anthropicKey": null
},
"ui": {
"theme": "dark",
"streaming": true
}
}Environment Profiles
Environment profiles let you save and switch between named configuration snapshots. This is useful when you work with different LMX servers, switch between local and cloud inference, or maintain separate configs for different projects.
Save the current config as a profile
opta env save homeProfile 'home' saved.
Modify settings for a different environment
opta config set connection.host 10.0.0.50Save the new config as another profile
opta env save officeProfile 'office' saved.
Switch between profiles
opta env use homeSwitched to profile 'home'.\nconnection.host = 192.168.188.11
opta env listProfiles:
* home (active)
office~/.config/opta/profiles/. Switching profiles overwrites the active config, so always save your current settings before switching.Key Settings Reference
| Key | Default | Description |
|---|---|---|
| connection.host | 192.168.188.11 | LMX server IP address |
| connection.port | 1234 | LMX server port |
| model.default | qwen3-30b-a3b | Model loaded at daemon startup |
| provider.fallback | true | Fall back to Anthropic if LMX fails |
| provider.anthropicKey | null | Anthropic API key for cloud fallback |
| ui.theme | dark | CLI color theme |
| ui.streaming | true | Enable token-by-token streaming output |