Skip to main content
Use the official command-line interface to interact with the Orq.ai API from a terminal, CI, or scripts. Works against Orq.ai SaaS out of the box and against self-hosted deployments with a single flag.

GitHub

orq-cli

Installation

The npm package requires Node.js 14 or newer and downloads the matching native binary automatically. The curl script installs a raw binary to ~/.orq/bin/orq. Pre-built release binaries for each platform are available on the Releases page.

Authentication

The CLI supports two auth methods. Both respect --profile <name> to keep multiple identities (personal account, CI, self-hosted customer) side by side.
Walks through a browser-based device-authorization flow, writes credentials to ~/.orq/sessions/default.json, and picks an active workspace. Re-run orq auth login to refresh the session. Sign out with orq auth logout.
ORQ_API_KEY takes priority over an active OAuth session. If it is set in the terminal environment, every command uses that key instead of the credentials from orq auth login, which can apply the key’s own project restrictions instead of the expected workspace access. Unset it to fall back to the OAuth session:

Profiles

Every command accepts --profile <name> (or the ORQ_PROFILE env var). Each profile has its own session file at ~/.orq/sessions/<name>.json and its own API key credentials in ~/.orq/credentials.json. The default profile is default.
--api-base-url sets the host to authenticate against for a self-hosted profile at login time; it is stored in the session. After login, every command on that profile automatically routes to the stored host. Override the host for a single call with --server <url> or ORQ_SERVER=<url> without changing the stored session.

Quick start

With the CLI installed and authenticated, run a resource command to confirm everything works:

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, and reachability probes against each endpoint.

Output formats

TOON (Token-Oriented Object Notation) is the default renderer: a compact, human-readable table format. Switch it per call or persist a new default.
Persist a new default with orq default-format <json|yaml|toon>.

Workspaces

Command reference

Built-in commands

Resource commands

Use --help on any group for the full surface (inputs, body fields, examples):