Platform View

Documentation is adapted for macOS.

Shell commands, launchd paths, and Apple runtime guidance

CLI Version Context

Installed CLI: 1.1.0 (latest compatibility profile)

Support Bundle

Capture a complete diagnostics artifact for support triage.

macos
OUT=~/Desktop/opta-support-$(date +%Y%m%d-%H%M%S).txt; { echo "# Opta Support Bundle"; echo "# Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)"; echo; opta doctor; echo; opta daemon status; echo; opta daemon logs --lines 200; echo; opta config list; } > "$OUT" && echo "Saved $OUT"
Support FAQ

Learn About

Deep workflow guides aligned to this documentation section.

Browse all Opta Learn guides

Code Desktop

Opta Code Desktop is a native desktop application built with a Tauri v2 shell and a Vite + React UI, providing graphical control for daemon-connected coding workflows.

What is Code Desktop?

While the Opta CLI is a terminal-native experience, Code Desktop offers the same daemon interaction through a visual interface. It connects to the Opta daemon via WebSocket and HTTP, presenting session history as a timeline, tool calls as collapsible cards, and streaming model responses with live token counters.

Code Desktop is designed for developers who want a persistent, always-visible window showing what the daemon is doing. Keep it open alongside your editor to watch sessions unfold in real time, review past conversations, or export session data.

Architecture

Code Desktop runs as a native Tauri desktop app. The Rust shell handles native capabilities and secure storage; the React UI handles interaction and streaming presentation. In browser/dev mode, the same UI can run without the native shell.

Code Desktop Architecture
Code Desktop (Tauri v2 shell + React UI)
    |
    |  Tauri commands → bootstrap metadata, secure token storage
    |  HTTP REST      → session + operation control
    |  WebSocket      → real-time event streaming
    v
Opta Daemon  (bootstrapped host/port)
    |
    |  Proxied inference requests
    v
Opta LMX  lmx-host.local:1234

The app uses two client packages for daemon communication:

  • @opta/daemon-client -- HTTP client for REST operations (create sessions, list sessions, submit turns)
  • @opta/protocol-shared -- TypeScript types for the v3 protocol contract

These packages are referenced via TypeScript path aliases, not npm dependencies, allowing development without a separate build step.

Key Features

  • Workspace Rail -- a sidebar listing all daemon sessions with search and filtering
  • Timeline View -- chronological display of turns within a session, including user messages, model responses, and tool calls
  • Streaming Indicators -- live token counters and progress indicators during active inference
  • Turn Statistics -- token count, generation speed (tok/s), elapsed time, and tool call count for each completed turn
  • Tool Cards -- collapsible panels showing tool name, arguments, and results for each tool invocation
  • Session Export -- export conversations as JSON or Markdown for archival or sharing
  • Daemon Panel -- restart/stop daemon controls, status, uptime, and CLI ops handoff
  • Chat / Do Mode Toggle -- switch between interactive chat and autonomous do mode from the composer

Connection Model

Code Desktop resolves daemon connection details from runtime bootstrap metadata and stored connection settings, with 127.0.0.1:9999 as a safe fallback in browser/dev mode. For WebSocket connections, the daemon token is passed as a query parameter.

Token persistence
In native desktop runtime, daemon tokens are persisted via OS keyring-backed secure storage. In browser/dev mode, localStorage remains the compatibility fallback.

The WebSocket connection includes automatic reconnection with exponential backoff. If the daemon restarts, Code Desktop detects the disconnection and reconnects automatically, resuming event streaming from the last received sequence number.

Design System

Code Desktop uses the canonical Opta design tokens defined in opta.css. The visual system includes:

  • OLED-optimized dark theme (#09090b background)
  • Glass panels (.glass, .glass-subtle, .glass-strong) with purple gradient approach
  • Lucide React for all icons
  • Violet accent color (--opta-primary: #8b5cf6)
  • Framer Motion spring physics for animations