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.
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.
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.
Config 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.
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
Modify settings for a different environment
Save the new config as another profile
Switch between profiles
Key Settings Reference
| Key | Default | Description |
|---|---|---|
| connection.host | lmx-host.local | 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 |