onyx command first, then authenticate with browser or device login.
For the Windows via WSL2 preview (Onyx 0.1.20+) and Linux setup requirements, see
Windows via WSL2.
Install the CLI
Run the installer:onyx in ~/.local/bin by default. If your shell does not
already include that directory on PATH, the installer offers to add it for
you.
Verify the command:
onyx telemetry status,
onyx telemetry enable, or onyx telemetry disable. See
CLI analytics and privacy for the exact data contract
and environment-level opt-out controls.
The installer starts automatic login during setup (device authorization in WSL).
Press Esc while it is waiting if you need to authenticate later or use a global API key instead.
For non-interactive installs:
Log In Later
onyx login --browser or onyx login --device.
If your account belongs to one team, Onyx selects it silently. With multiple
teams, choose from the terminal prompt or pass --team <team-id-or-unique-name>.
The resulting session refreshes silently; active sessions can last up to one
year, with reauthentication after 90 days of inactivity.
Profile Basics
onyx login again to
create a new session. Headless device logins are completed through Onyx,
which starts the device authorization and finishes the token exchange while
you approve in a browser; tokens are handed to the CLI once and never stored
by Onyx. When you point the CLI at a custom --api-url (anything
other than production or localhost), it prints the API URL, OAuth issuer, and
client ID and asks for confirmation; pass --trust-api-url in non-interactive
shells.
Upgrading from an older CLI: the first successful onyx login migrates your
config to the current format and writes a sanitized backup next to it (team
names and worker defaults only, no keys or tokens). A cancelled or failed login
leaves the old config exactly as it was. Until then,
other commands explain the migration instead of reporting a missing profile.
Automation and CI
Interactive login never creates or stores an API key. For scripts or CI, create a manual key in Settings → API Keys and use explicit environment overrides:Local Development Against Another API
Only use this when developing Onyx itself.--local is shorthand for
--api-url http://localhost:3000:
onyx profile use <name>. onyx status prints the active
profile and API target.
Developer Mode
When developing the Onyx agent package, keep the installedonyx command in
place and switch it to a source checkout:
onyx login --local as described above.
Next Step
Quickstart
Link a repository and start auto research with
/onyx.