Connect your agent with Ori
Install Ori, sign in with your OpenRouter account, launch CLI agents, and route desktop apps like Codex or Claude Desktop through OpenRouter.
Ori is OpenRouter’s command-line tool. With Ori Harness, you keep using the agent CLI you know, such as Claude Code or Codex, but its requests go through OpenRouter. Your models, credits, and organization settings come with your login, so you don’t need a separate provider key for each agent.
Install it once. On macOS, Linux, or WSL:
curl -fsSL https://openrouter.ai/labs/ori/install.sh | bashOn Windows PowerShell:
irm https://openrouter.ai/labs/ori/install.ps1 | iexThen sign in. This opens your browser so you can sign in with your OpenRouter account. There’s no key to create or paste:
ori loginOption A: Terminal users (agent launchers)
If you work in a terminal, start your agent through Ori’s launcher:
ori claude
ori codex
ori opencode
ori piOri supports more agents than these. The Ori Harness docs have the current list. Each command starts the real agent CLI on your machine, offering to install it if it’s missing. To choose the model, pass any OpenRouter model slug, or openrouter/auto to let OpenRouter pick:
ori claude --model openrouter/autoCheck your understanding
You run ori claude in your terminal for the first time. What do you need to set up before it works?
Option B: Desktop users (ori harness setup)
If you use desktop applications like the Codex app, Claude Desktop, or Cursor instead of running agent commands inside a terminal, you don’t need to launch them through ori <agent> every time. Run ori harness setup once:
ori harness setup codex
ori harness setup claude
ori harness setup cursorori harness setup writes the OpenRouter settings into the agent’s own config, so its desktop app runs on OpenRouter, and so does its plain command for every agent except Cursor (setup leaves the cursor-agent CLI unchanged). Each setup uses your saved login from ori login:
- Codex: Sets up the Codex CLI and the Codex desktop app, which share one configuration.
- Claude: Sets up Claude Desktop on macOS, and Claude Code on macOS and Linux. On Windows, use
ori claudeinstead. - Cursor: Adds OpenRouter models to the Cursor desktop app. Cursor needs a saved API key (
ori login --with-key), and it sends your key and every request through Cursor’s servers before they reach OpenRouter.
Setup also covers a few other agents, such as Factory Droid and Pi. The Ori Harness docs list every one.
Whenever you want to revert a desktop app to its default vendor setup, run:
ori harness reset codexCheck your understanding
You prefer using the Codex desktop app instead of running commands in your terminal. How do you route it through OpenRouter?
Whether you invoke agents through terminal commands or desktop apps, every turn appears in your Activity and Logs.
Apply it
Your company’s OpenRouter organization only allows certain models. You run ori codex --model with a model that isn’t on the list. What do you expect?
The request is refused, the same as if you sent it to the API directly. Ori uses your OpenRouter login, so your organization’s rules still apply. Pick a model your organization allows, or ask an admin to change the setting.
Takeaway
Install Ori once and sign in with ori login. Terminal users can launch agents directly with ori <agent> (such as ori claude or ori codex), while desktop users can run ori harness setup <app> (like codex or claude) to route desktop apps through OpenRouter.