CLI Reference
The Opta CLI is your primary interface to the Opta Local stack. It provides interactive AI chat, autonomous task execution, model management, session control, and daemon lifecycle commands -- all from your terminal.
Overview
Opta CLI connects to the local daemon which orchestrates sessions, manages permissions, and proxies requests to LMX for inference on Apple Silicon. You can use it for quick questions, deep coding sessions, or fully autonomous multi-step tasks.
opta --helpUsage: opta [command] [options] Commands: chat Start interactive AI conversation do Run autonomous agent task daemon Manage the Opta daemon config View and edit configuration models Manage LMX models sessions List and manage sessions status Show stack health doctor Diagnose and fix issues
Core Commands
| Command | Description |
|---|---|
| opta chat | Start an interactive AI conversation with streaming output |
| opta do "task" | Run an autonomous agent loop that completes a task |
| opta daemon | Start, stop, restart, or install the background daemon |
| opta config | View and modify CLI configuration settings |
| opta models | Load, swap, browse, and inspect LMX models |
| opta sessions | List, view, export, and delete conversation sessions |
| opta status | Display health of daemon, LMX, and connected services |
| opta doctor | Diagnose common issues and optionally apply fixes |
Two Modes
The CLI operates in two fundamental modes that serve different workflows. Understanding when to use each is key to getting the most from Opta.
Interactive Chat
opta chat opens a persistent, conversational session. You type messages, the model streams back responses in real time, and you can ask follow-up questions within the same context. Tool calls (file reads, writes, commands) require your explicit approval before executing.
opta chatAutonomous Do
opta do takes a natural-language task description and runs an agentic loop to completion. It auto-approves safe tool calls (file reads, searches) while still prompting for destructive operations (file writes, command execution). This mode is ideal for tasks like refactoring a module, writing tests, or generating documentation.
opta do "Add unit tests for the auth module"chat when you want to explore, iterate, and steer the conversation. Use do when you have a well-defined task and want the AI to execute it with minimal interruption.Platform Support
Platform Compatibility
| Feature | Status |
|---|---|
| macOS (Apple Silicon) | Complete |
| macOS (Intel) | Complete |
| Linux (x86_64) | Complete |
| Windows (WSL2) | Partial |
| Windows (native) | Planned |
Global Flags
| Flag | Description |
|---|---|
| --verbose, -v | Enable verbose output and debug logging |
| --json | Output responses as JSON (useful for scripting) |
| --host <addr> | Override the daemon host address |
| --version | Print CLI version and exit |