This feature is in Beta.
GitHub
orq-cli
Installation
~/.orq/bin/orq, verifies it against the release’s published checksum, and runs orq setup; pass --no-setup to the script to skip that step, --version <tag> to pin a release, or --install-dir <dir> to choose the location. After an npm install, run orq setup. Pre-built release binaries for each platform are available on the Releases page.
An Orq.ai account is required. Sign up at my.orq.ai. Bug reports and feature requests go to GitHub issues.
Quick start
Coding agents
orq setup signs in through the browser, creates a project-scoped API key, and wires the coding agents already on the machine to route their model calls through the AI Gateway. It writes the key to ~/.orq/env and offers to source that file from the shell profile, so later commands pick up ORQ_API_KEY. It can also add the Orq MCP server and Orq Skills. Supported agents: Claude Code, Codex, OpenCode, Kimi Code, Kilo, Pi, GitHub Copilot CLI, and Gemini CLI.
orq connect wires agents permanently, per agent and per capability (gateway, tracing, skills, mcp). It edits each agent’s own config and registers Orq.ai as an available model provider, never as the agent’s default. orq disconnect removes exactly what connect wrote. Claude Code has no provider config, so connect gives it skills and mcp only; Copilot and Gemini are launch-only. For those three, orq launch is how model calls route through the AI Gateway.
connect writes machine-wide by default (--global). --local writes mcp and skills into the current project instead, for the agents that read a project config: Claude Code, Codex, Kimi Code, OpenCode, and Kilo. gateway and tracing are machine-wide whatever the flag says. --api-key <key> uses a specific key for that run instead of the saved credential. orq setup takes the same --global / --local choice, plus --capability gateway|skills|mcp (repeatable) to wire a subset and --no-project to leave the session unscoped.
orq launch <agent> starts a coding agent routed through the AI Gateway for that session only. Nothing is left on disk after the session ends. Every call is traced with cost, tokens, and latency, and Budgets and rate limits apply.
--model, --models (extra model ids for OpenCode, Kilo, Kimi Code, and Pi), --base-url, --mcp (the default) and --no-mcp, --no-skills, --dry-run, and --no-fetch-models on every agent except Claude Code. One-shot prompts use -p/--prompt, which orq maps to each agent’s own syntax; Claude Code is the exception, where -p is Claude’s own flag forwarded untouched and --prompt is not accepted. Global flags such as --profile go before the agent name. Everything after -- goes to the agent untouched.
The same command works headless. Pass a prompt and the agent runs once and exits. In CI, put an API key in the environment instead of a browser login. Launch reads ORQ_API_KEY first, then the login session.
Without
ORQ_API_KEY, launch mints a fresh workspace token from the login session at start, and that token expires an hour later. It is handed to the agent as an environment variable, so it cannot be refreshed mid-session: an agent session that runs past the hour starts failing. The long-lived key orq setup mints is used by orq connect for permanent wiring, not by launch. For long or unattended sessions, export an API key.orq launch links them for the session and orq connect skills installs them permanently. orq skills is a different command: it manages Skills entities on the platform.
Authentication
The CLI supports two auth methods. Both respect--profile <name> to keep multiple identities (personal account, CI, self-hosted customer) side by side.
- OAuth device login
- API key
~/.orq/sessions/default.json, and picks an active workspace. Re-run orq auth login to refresh the session. Sign out with orq auth logout..env files in the working directory are not read. Set ORQ_DOTENV=1 to load ORQ_-prefixed variables from one for a single command; orq doctor then reports the file as the auth source.
orq auth sessions lists saved browser logins by host, with their workspace, project, user, and status.
Profiles
A profile is one complete identity: its own credential, its own session file at~/.orq/sessions/<name>.json, and its own API key entry in ~/.orq/credentials.json. The default profile is default.
Every command accepts --profile <name> (or the ORQ_PROFILE env var). The profile’s credential already carries its workspace and project, so --profile is all a command needs. Do not combine it with --workspace or --project; those flags are for pointing a single call at a different target than the active session, not for scoping a profile.
orq auth profile: add, list, use, current, clear. orq auth profile use <name> persists the active profile, so later commands need no flag.
--server sets the host to authenticate against, and is the only target flag orq setup and orq auth login need. It is stored in the session, so after login every command on that profile routes to the stored host. Override the host for a single call with --server <url> or ORQ_SERVER=<url> without changing the stored session.
Workspaces
Projects
orq agents list returns only that project’s Agents, and orq agents create lands there. --project <id|key|name> (env ORQ_PROJECT) does the same for a single call without changing the session. Switching workspaces clears the active project.
Diagnostics
doctor reports the CLI binary and runtime, active profile and session file path, resolved base URLs and their source (flag, session, env, default, derived), auth status, reachability probes against each endpoint, and the version of the installed Orq Skills bundle.
Update
ORQ_NO_UPDATE_CHECK suppresses both.
Output formats
Commands print a table at a terminal and TOON (Token-Oriented Object Notation), a compact format for agents, when piped. Switch the format per call or persist a new default.orq default-format [json|yaml|toon|table]; run it bare to show the current default. -o json output on stdout is the only stable machine contract; its shape follows the API response behind the command.
Add --raw to pipe a single field into another command: it prints a string or a list of scalars unquoted, one per line.
Global flags
Every command takes these, and each one has an environment variable so a shell or a CI job can set it once.
Boolean env vars (
ORQ_RAW, ORQ_NO_INPUT, ORQ_NO_COLOR, ORQ_VERBOSE) take 1, t, T, true, True, TRUE to turn the flag on and 0, f, F, false, False, FALSE to leave it off. Any other value, yes and on included, is treated as off without an error.
Request bodies
Commands that send a body expose every top-level body field as a typed flag, so simple requests need no JSON at all. Nested objects, arrays of objects, and polymorphic unions take a JSON string.--example on any of these commands prints a request body that command accepts, which is the fastest way to learn a shape. orq help-input documents the body syntax and orq help-config documents configuration resolution.
Scripting and CI
--no-input makes the CLI fail instead of prompting, so a stuck job errors out rather than hanging on a picker. Combine it with an API key and nothing needs a browser.
delete commands prompt at a terminal and refuse to run without one. --force skips the prompt.
Relative dates
Time filters accept relative values, so yesterday’s traces or the last week’s spend are one flag away.traces search, traces query-oql, traces aggregate, the logs queries, and reporting query) default to the last 7 days when neither --from nor --to is given. Every timestamp flag accepts a relative duration read as “ago” (24h, 7d, 2w, 30m), an anchored value (now, now-24h, now+1h), a date or date and time read as UTC (2026-08-31, 2026-08-31 14:00:00), or RFC 3339. A day is 24 hours and a week is 168 hours.
Reading a conversation
orq traces conversation <trace-id> [span-id], or orq traces conv, renders the conversation recorded in a Trace as readable text. Chat Completions, Responses, and OpenTelemetry GenAI payloads are normalized into one list of messages, tool calls, and reasoning.
--slice selects messages by index and --match is a case-insensitive regex. --spans shows each span with its turn count, why it was passed over, and the id to pass as the second argument to read a different one. Evaluator spans are skipped so a judge’s conversation is never returned in place of the one it judged. The xml render escapes framing, so it is the one to trust when a span’s own text may imitate the surrounding structure. -o table is refused.
Command reference
Verified against CLI 8.6.7, plus thetraces thread → traces conversation rename in the release after it. Run orq version to see the installed version and the Orq.ai API version it was built against.
Built-in commands
Resource commands
Command groups:
The table below covers the most used groups. Use
--help on any group for the full surface (inputs, body fields, examples):