This document provides a comprehensive guide to using the Matrixx CLI tools.
Matrixx provides CLI tools accessible via the bunx opencode-matrixx command (or bunx matrixx once installed locally — the binary is named matrixx, but the npm package is opencode-matrixx). The CLI supports various features including plugin installation, environment diagnostics, and session execution.
# Basic execution (displays help)
bunx opencode-matrixx
# Or run with npx
npx opencode-matrixx| Command | Description |
|---|---|
install |
Interactive Setup Wizard |
doctor |
Environment diagnostics and health checks |
run |
OpenCode session runner |
auth |
Google Antigravity authentication management |
version |
Display version information |
An interactive installation tool for initial Matrixx setup. Provides a beautiful TUI (Text User Interface) based on @clack/prompts.
bunx opencode-matrixx install- Provider Selection: Choose your AI provider from Claude, ChatGPT, or Gemini.
- API Key Input: Enter the API key for your selected provider.
- Configuration File Creation: Generates
opencode.jsonormatrixx.jsonfiles. - Plugin Registration: Automatically registers the matrixx plugin in OpenCode settings.
| Option | Description |
|---|---|
--no-tui |
Run in non-interactive mode without TUI (for CI/CD environments) |
--verbose |
Display detailed logs |
Diagnoses your environment to ensure Matrixx is functioning correctly. Performs 17+ health checks.
bunx opencode-matrixx doctor| Category | Check Items |
|---|---|
| Installation | OpenCode version (>= 1.0.150), plugin registration status |
| Configuration | Configuration file validity, JSONC parsing |
| Authentication | Anthropic, OpenAI, Google API key validity |
| Dependencies | Bun, Node.js, Git installation status |
| Tools | LSP server status, MCP server status |
| Updates | Latest version check |
| Option | Description |
|---|---|
--category <name> |
Check specific category only (e.g., --category authentication) |
--json |
Output results in JSON format |
--verbose |
Include detailed information |
matrixx doctor
┌──────────────────────────────────────────────────┐
│ Matrixx Doctor │
└──────────────────────────────────────────────────┘
Installation
✓ OpenCode version: 1.0.155 (>= 1.0.150)
✓ Plugin registered in opencode.json
Configuration
✓ matrixx.json is valid
⚠ categories.visual-engineering: using default model
Authentication
✓ Anthropic API key configured
✓ OpenAI API key configured
✗ Google API key not found
Dependencies
✓ Bun 1.2.5 installed
✓ Node.js 22.0.0 installed
✓ Git 2.45.0 installed
Summary: 10 passed, 1 warning, 1 failed
Executes OpenCode sessions and monitors task completion.
bunx opencode-matrixx run [prompt]| Option | Description |
|---|---|
--enforce-completion |
Keep session active until all TODOs are completed |
--timeout <seconds> |
Set maximum execution time |
Manages Google Antigravity OAuth authentication. Required for using Gemini models.
# Login
bunx opencode-matrixx auth login
# Logout
bunx opencode-matrixx auth logout
# Check current status
bunx opencode-matrixx auth statusThese are slash commands used within OpenCode sessions during active conversations.
Deactivates ultrawork mode and returns to default Matrixx behavior for the current session.
Usage: /end-ultrawork
Effect: Disables ultrawork mode, stops parallel background agent execution,
reverts to standard single-threaded processing
This is useful when ultrawork mode was activated (via ulw keyword or auto-detection) and you want to continue the session in normal mode without starting over.
Creates a structured context handoff with YAML frontmatter for continuing work in a new session.
Usage: /handoff
Effect: Creates .matrixx/handoff.md with structured metadata including:
- topics, goal, work_completed
- current_state, pending_tasks
- key_files, important_decisions
- explicit_constraints, context_for_continuation
Use this when you need to preserve session state for continuation later. The handoff file can be consumed in a fresh session using /pickup.
Loads handoff context from a previous session.
Usage: /pickup
Effect: Reads .matrixx/handoff.md and injects the stored context
into the current session, including pending tasks, key files,
and important decisions
This enables seamless session-to-session continuity without losing context.
The CLI searches for configuration files in the following locations (in priority order):
- Project Level:
.opencode/matrixx.json - User Level:
~/.config/opencode/matrixx.json
Configuration files support JSONC (JSON with Comments) format. You can use comments and trailing commas.
# Update OpenCode
npm install -g opencode@latest
# or
bun install -g opencode@latest# Reinstall plugin
bunx opencode-matrixx install# Diagnose with detailed information
bunx opencode-matrixx doctor --verbose
# Check specific category only
bunx opencode-matrixx doctor --category authenticationUse the --no-tui option for CI/CD environments.
# Run doctor in CI environment
bunx opencode-matrixx doctor --no-tui --json
# Save results to file
bunx opencode-matrixx doctor --json > doctor-report.jsonsrc/cli/
├── index.ts # Commander.js-based main entry
├── install.ts # @clack/prompts-based TUI installer
├── config-manager.ts # JSONC parsing, multi-source config management
├── doctor/ # Health check system
│ ├── index.ts # Doctor command entry
│ └── checks/ # 17+ individual check modules
├── run/ # Session runner
└── commands/auth.ts # Authentication management
- Create
src/cli/doctor/checks/my-check.ts:
import type { DoctorCheck } from "../types"
export const myCheck: DoctorCheck = {
name: "my-check",
category: "environment",
check: async () => {
// Check logic
const isOk = await someValidation()
return {
status: isOk ? "pass" : "fail",
message: isOk ? "Everything looks good" : "Something is wrong",
}
},
}- Register in
src/cli/doctor/checks/index.ts:
export { myCheck } from "./my-check"
{ // Agent configuration "morpheus_agent": { "disabled": false, "planner_enabled": true, }, /* Category customization */ "categories": { "visual-engineering": { "model": "google/gemini-3-pro", }, }, }