Slash Commands

Slash commands are special in-session commands that start with /. They let you control the session, switch models, trigger workflows, and access tools without leaving your active conversation.

Overview

While in an opta chat session, type a slash command instead of a regular message. Slash commands are processed locally by the CLI and do not consume model tokens. They provide quick access to model switching, code review, research mode, session management, and debugging tools.

Type /help during a chat session
/help
Available commands:
  /help          Show this help message
  /model         Switch active model
  /plan          Enter plan-only mode
  /review        Code review current changes
  /research      Deep research mode
  ...

Command Reference

General

CommandDescription
/helpShow available slash commands and usage
/whoamiDisplay current user, session ID, and connection info
/memoryShow stored memory entries for context persistence

Model Control

CommandDescription
/model <name>Switch the active model mid-session. Accepts model names or aliases. The new model picks up the existing conversation context.
Switch model during a session
/model deepseek-r1
Switching to deepseek-r1...\nModel active: deepseek-r1-0528 (42.8 GB)

Session & Workflow

CommandDescription
/planEnter plan mode -- the model analyzes and proposes changes without executing them
/exportExport the current session to a JSON file
/checkpointCreate a named checkpoint in the session for easy rollback
/undoRevert the last file change made by the model

Code Tools

CommandDescription
/reviewRun a code review on the current git diff or staged changes. Produces structured feedback.
/commitGenerate a conventional commit message from staged changes and optionally commit

Analyzes the current git diff and provides structured feedback on code quality, potential bugs, and suggestions for improvement.

/review
Reviewing 3 changed files...

src/auth/validate.ts
  Line 24: Consider adding null check before accessing user.role
  Line 41: JWT expiry should use >=, not > (off-by-one)

src/api/routes.ts
  Line 12: Missing error handler for async route

Overall: 2 issues, 1 suggestion

Research & Debug

CommandDescription
/researchEnter deep research mode -- the model explores code, reads documentation, and produces a comprehensive analysis
/debugShow debug information including daemon connection, model status, token counts, and latency metrics

LMX Commands

LMX slash commands let you check and manage the inference server connection without leaving your chat session.

CommandDescription
/lmx statusShow LMX server health, loaded model, VRAM usage, and uptime
/lmx reconnectForce reconnect to the LMX server (useful after network changes)
Check LMX server status in-session
/lmx status
LMX Server: 192.168.188.11:1234
Status: healthy
Model: qwen3-30b-a3b (4-bit)
VRAM: 18.2 / 192.0 GB
Uptime: 6h 42m
Throughput: 38.7 tok/s (avg)

Browser Commands

Browser slash commands control the Playwright-based browser automation system. These commands let you open pages, navigate, and capture screenshots from within your chat session.

CommandDescription
/browser open <url>Open a URL in the managed browser instance
/browser navigate <url>Navigate the current tab to a new URL
/browser screenshotCapture a screenshot of the current browser state
Browser automation
Browser commands require Playwright to be installed. The browser session persists across commands within the same chat session. See the Browser Automation section for full details on available tools and recording.

Usage Tips

  • Slash commands are processed entirely by the CLI -- they do not consume model tokens or affect the conversation context.
  • You can use /model to switch models mid-conversation without losing context. The new model receives the full chat history.
  • Combine /plan with /review for a plan-then-review workflow: first ask the model to plan changes, review them, then switch to do mode to execute.
  • Use /checkpoint before risky operations. If something goes wrong, /undo reverts the last file change.
  • /debug is invaluable for diagnosing slow responses -- it shows per-turn latency and token counts.
Autocomplete
Slash commands support tab completion. Type / and press Tab to see all available commands. Start typing a command name and press Tab to autocomplete.