Command reference

September 8, 2026 · View on GitHub

This reference describes the qmax-code v1.22 command-line and interactive surfaces. Run qmax-code --help for the flags compiled into your installed version and /help for its REPL commands.

Command-line usage

qmax-code [flags]
qmax-code [flags] "prompt"
qmax-code gate [--base REF]
qmax-code login [--api-key KEY]
qmax-code config [show|set|unset|reset]
qmax-code receipt [list|show|verify] [id|latest]
qmax-code cc connect
qmax-code codex connect
qmax-code serve --mcp

Main flags

FlagMeaning
--localRun standalone: skip QualityMax login and expose only local workspace tools.
--project-id IDSet the active QualityMax project for this run.
--model MODELSelect a direct Anthropic model or known model shorthand.
--anthropic-api-key KEYSupply an Anthropic key for this process. Prefer an environment variable or interactive keychain storage over shell history.
--cloud-url URLOverride the QualityMax cloud URL. Normal users should use qmax-code login.
-p "PROMPT"Run one prompt and exit.
--resume IDResume a saved qmax-code session; use last for the newest.
--list-sessionsList recent saved sessions and exit.
--save-sessionSave this run even when automatic saving is disabled. Applies to interactive and one-shot sessions on every backend, including shared context and CLI resume checkpoints.
--verboseShow tool calls and raw responses.
--professionalDisable the cat personality for this run.
-qReserved for a future quiet/CI output mode; currently has no effect.
--backend NAMEOverride the saved backend with api, cc, codex, agy, cerebras, or opencode.
--versionPrint the version and exit.

Non-interactive stdin must include either -p or a positional prompt. This prevents setup or credential prompts from blocking on a pipe:

qmax-code -p "run the project test suite"
qmax-code "review the current diff"
qmax-code --local --backend codex -p "review the current diff"

In standalone mode, --project-id, --cloud-url, cloud sessions, and QualityMax-backed tools do not apply. The selected model or CLI backend may still require its own provider authentication.

Local PR quality gate

qmax-code gate --base origin/main

The gate compares the complete local candidate—committed, staged, unstaged, and untracked files—with the merge base of the requested ref, runs read-only deterministic repository checks, and prints the changed-file scope plus bounded, redacted failure evidence. The MVP supports Go repositories and runs git diff --check, go test ./..., and go vet ./.... It runs before login or backend setup and does not require QualityMax cloud or an inference provider.

Exit status is 0 for PASS, 1 for FAIL, and 2 when the gate is INCOMPLETE because its ref, repository, or required tooling could not be resolved.

Authentication commands

QualityMax login

qmax-code login
qmax-code login --api-key qm-YOUR-API-KEY

The first command opens the one-time browser flow. The second uses a QualityMax API key.

Attach coding-agent accounts

qmax-code cc connect
qmax-code codex connect

These attach the active local Claude Code or a fresh Codex login to the currently authenticated QualityMax user. They are separate from selecting a backend with /cc, /codex, or /agy.

Configuration subcommand

qmax-code config
qmax-code config show
qmax-code config set KEY VALUE
qmax-code config unset KEY
qmax-code config reset

Supported keys:

KeyValues or purpose
default_frameworkplaywright, pytest, go_test, rust_cargo, or empty
default_projectNumeric project ID
default_modelauto, sonnet, opus, haiku, or a recognized full Claude model ID
professionalBoolean
local_onlyBoolean; make standalone local-only startup persistent
auto_saveBoolean
output_verboseBoolean; compact vs. detailed CLI-backend answers
max_token_budgetInteger token budget
plan_window_hoursInteger; subscription coding-plan rolling window length (0 or unset = 5-hour default)
ollama_urlHTTP(S) Ollama endpoint
ollama_modelOllama chat/full-agent model
ollama_agent_modelOptional heavier Ollama agent model
backendapi, cc, codex, cerebras, opencode, or empty
cerebras_keyStored in the OS keychain; never in config JSON
cerebras_modelCerebras model ID or supported alias such as gemma
cerebras_base_urlCerebras-compatible API base URL
cerebras_reasoning_effortnone, low, medium, or high
themehistoric, ocean, neon, ember, aurora, paper, sky, sparkling, radiance, or goldenhour
cloud_syncBoolean or unset
live_feedBoolean

Configuration is stored with owner-only permissions in ~/.qmax-code/config.json. Secret keys handled by qmax-code are excluded from that JSON and stored in the OS keychain.

Exposure Receipt commands

qmax-code receipt list
qmax-code receipt show latest
qmax-code receipt show RUN_ID
qmax-code receipt verify latest
qmax-code receipt verify RUN_ID

list shows receipt IDs, run kinds, request counts, and destinations. show prints the selected local manifest. verify checks its signature offline.

REPL commands

Backend and model selection

CommandAction
/orchOpen the unified backend/model/effort picker.
/apiSwitch to the direct Anthropic API.
/ccSwitch to the Claude Code CLI backend.
/codexSwitch to the Codex CLI backend.
/agySwitch to the Antigravity CLI backend (Google OAuth).
/opencodeSwitch to the OpenCode CLI backend.
/gemma [none|low|medium|high]Activate Gemma 4 on Cerebras with the chosen reasoning level.
/gemma offReturn to the direct Anthropic API.
/ollamaToggle the configured Ollama backend.
/providersShow opt-in OpenCode providers.
/providers enable IDPrompt for a key if needed and enable a provider.
/providers disable IDHide a provider; retain its key in the keychain.
/reconnectRestore the active Claude Code or Codex MCP transport.

See Orchestration mode for detailed backend and permission behavior.

QualityMax context

CommandAction
/connectLog in to QualityMax through the browser.
/disconnectLog out and remove saved QualityMax credentials.
/project IDChange the active project.
/contextShow current session context.
/statusShow connection, session, usage, and model information.
/costShow token usage and estimated model cost.
/updateCheck for a newer qmax-code release and install it when found.
/planShow the subscription coding-plan usage window: elapsed, turns, and time until the rolling 5-hour limit resets (cc/codex/agy/opencode backends).

In standalone mode, /connect and /project explain how to return to connected mode. /status, /context, and /config identify the active standalone boundary.

Sessions and queue

CommandAction
/sessionsOpen a picker with recent saved sessions.
/resume [ID]Resume a session; no ID means the latest.
/saveSave the current session.
/clearClear conversation history and the OpenCode session when active.
/queueShow pending prompts.
/queue PROMPTAdd a prompt to the queue.
/queue clearRemove all queued prompts.

Typing while an agent turn is running also queues that input and processes it after the current turn.

Skills and configuration

CommandAction
/skillsList all qmax QA skills and their install status by CLI backend.
/skills installRefresh skills for Claude Code, Codex, OpenCode, and Antigravity.
/configShow selected session configuration.
/set KEY VALUEChange a supported setting from the REPL.
/keysOpen the interactive API-key menu.
/themePreview and select a terminal theme.
/cloudsyncToggle cloud session sync.

Common /set keys and aliases:

/set model sonnet
/set project 42
/set local_only true
/set professional true
/set autosave false
/set output_verbose true
/set budget 100000
/set cloud_sync true
/set live_feed true
/set backend codex
/set cerebras_model gemma
/set cerebras_reasoning_effort high
/set theme ocean

/set local_only changes the persisted default and takes effect after restart; it does not replace the active tool catalog in the current process.

Browser feed and media

CommandAction
/liveShow live-feed state.
/live onRun eligible tests/crawls in the QualityMax Cloud Sandbox and stream them.
/live offDisable sandbox live streaming.
/feedOpen the most recent live browser feed.
/browserfeed URLOpen a compatible QualityMax Cloud Sandbox noVNC URL as terminal ASCII.
/screenshotCapture a screenshot for analysis.
/pasteAttach clipboard text or an image.

Image attachments are currently supported by built-in multimodal backends, not the Claude Code, Codex, or OpenCode subprocess paths.

/cloudsync, /live, /feed, and /browserfeed are unavailable in standalone local-only mode because they depend on QualityMax services.

General

CommandAction
/gate [base]Run the local PR quality gate; defaults to origin/main.
/helpPrint in-app help.
/quit, /exit, /qSave when configured and exit.

Keyboard shortcuts

ShortcutAction
Ctrl+CCancel the active operation; press twice within one second to exit.
Ctrl+OToggle compact and verbose CLI-agent output.
Ctrl+X three timesClear the input line.
Ctrl+Left / Ctrl+RightMove the cursor by word (Option+arrow in terminals that map it that way).
Arrow keys in / menuNavigate slash-command suggestions.

MCP server mode

qmax-code serve --mcp

This starts the stdio MCP server used by Claude Code, Codex, and OpenCode integrations. It is normally launched by the agent's MCP configuration rather than by a person. Stdout is reserved for JSON-RPC; diagnostics go to stderr. When local_only is enabled or QMAX_LOCAL_ONLY=1 is present, it advertises only read_file, run_command, edit_file, and write_file.