Orion Docs
Everything you need to install Orion, connect your own model, and make the agent work the way you want.
Introduction
Orion is an open-source AI coding agent that runs in your terminal and uses a model you choose, paid for with your own API key.
You describe a task in plain language, for example “add a dark mode toggle to the navbar”. Orion sends the request to your model together with a set of tools. The model decides which tools to call: it lists folders, reads files, searches the code, edits files and runs commands such as your tests. Orion runs each tool on your computer, sends the result back, and repeats until the task is done.
How it differs from hosted tools
- Your key, your bill. Orion never sells model access. Requests go straight from your computer to the provider you configured.
- Any provider. Anthropic, OpenAI, OpenRouter, Google Gemini, Groq, DeepSeek, xAI, local models through Ollama or LM Studio, and any server with an OpenAI-compatible API.
- Agents you write yourself. An agent is a Markdown file with its own model, tools and instructions.
- You approve changes. By default Orion asks before it writes a file or runs a command, and it cannot touch files outside your project folder.
Installation
Orion runs on macOS, Windows and Linux. Pick whichever install method you already use; they all give you the same orion command.
Two kinds of install
- Standalone program (install script). One self-contained file. Nothing else to install, not even Node.js.
- npm package (npm, pnpm, yarn, bun). Small download, but needs Node.js 18 or newer. Check with
node -v.
Either way you also need an API key from at least one provider, or a local model server such as Ollama.
macOS and Linux
curl -fsSL https://orionrh.xyz/install.sh | sh
If curl isn’t installed, use wget -qO- https://orionrh.xyz/install.sh | sh. The script:
- Detects your system and CPU: Intel or Apple Silicon Macs, x86-64 or ARM64 Linux, and glibc or musl (Alpine) distributions.
- Downloads the matching build from orionrh.xyz and checks its SHA-256 checksum.
- Installs
orioninto~/.orion/binwithoutsudo, and adds that folder to your PATH in.bashrc,.zshrc,.profileand fish.
It works on Ubuntu, Debian, Kali Linux, Parrot OS, Fedora, Rocky Linux, Arch Linux, openSUSE, Alpine and macOS, and on distributions built on them such as Linux Mint, Pop!_OS and Manjaro.
Windows
In PowerShell:
irm https://orionrh.xyz/install.ps1 | iex
Installs orion.exe into %USERPROFILE%\.orion\bin and adds it to your user PATH. No administrator rights needed. Windows on ARM runs the x64 build through Windows’ built-in emulation. Open a new terminal afterwards so the new PATH is picked up.
Package managers
| Manager | Systems | Command |
|---|---|---|
| npm | All, with Node.js | npm install -g orionrh |
| pnpm | All, with Node.js | pnpm add -g orionrh |
| Yarn 1 | All, with Node.js | yarn global add orionrh |
| Yarn 2+ | All, with Node.js | yarn dlx orionrh (runs without installing) |
| Bun | All, with Node.js | bun add -g orionrh |
| npx | All, with Node.js | npx orionrh (runs without installing) |
EACCES, your global npm folder is owned by root. Install Node with a version manager such as nvm, or use the install script instead. Avoid running npm with sudo.Manual download
Every release has these files. Unpack one and put orion (or orion.exe) anywhere on your PATH.
| File | For |
|---|---|
orion-darwin-arm64.tar.gz | Macs with Apple Silicon (M1 and newer) |
orion-darwin-x64.tar.gz | Intel Macs |
orion-linux-x64.tar.gz | 64-bit Linux on Intel/AMD (glibc) |
orion-linux-arm64.tar.gz | 64-bit ARM Linux, e.g. Raspberry Pi 4/5, AWS Graviton |
orion-linux-x64-musl.tar.gz | Alpine and other musl distributions, Intel/AMD |
orion-linux-arm64-musl.tar.gz | Alpine and other musl distributions, ARM |
orion-windows-x64.zip | Windows 10 and 11 |
SHA256SUMS | Checksums for verifying the downloads |
32-bit systems are not supported by the standalone builds; use the npm package there.
Install script options
| Variable | Effect |
|---|---|
ORION_VERSION | Install a specific version, e.g. 0.1.0. Default: latest. |
ORION_INSTALL_DIR | Install somewhere other than ~/.orion/bin. |
ORION_NO_MODIFY_PATH | Set to 1 to leave your shell profiles unchanged (macOS/Linux). |
curl -fsSL https://orionrh.xyz/install.sh | ORION_VERSION=0.1.0 sh
Check it works
orion --version
This should print 0.1.0. If the command isn’t found, open a new terminal.
Update
Run the same install command again, or use your package manager: npm update -g orionrh.
Uninstall
| Installed with | Remove with |
|---|---|
| Install script (macOS/Linux) | rm ~/.orion/bin/orion, then remove the Orion line from your shell profile |
| Install script (Windows) | Delete %USERPROFILE%\.orion\bin and remove it from your user PATH |
| npm / pnpm / yarn / bun | npm uninstall -g orionrh, pnpm remove -g orionrh, yarn global remove orionrh, bun remove -g orionrh |
Uninstalling leaves your settings and keys in ~/.orion. Delete that folder to remove them too.
Quickstart
From install to your first change in about a minute.
- Connect a provider. Run the setup and follow the prompts.
shell
orion login
- Open a project. Orion works in the folder you start it from.
shell
cd ~/projects/my-app
- Start a session.
shell
orion
- Describe the task. Type what you want and press Enter. Approve each edit or command when asked.
A typical session looks like this:
agent build · model anthropic/claude-opus-5-5 · ~/projects/my-app › add a dark mode toggle to the navbar ● read_file src/components/Navbar.tsx ● read_file src/styles/theme.css ? Edit src/components/Navbar.tsx - <nav className="navbar"> + <nav className="navbar" data-theme={theme}> Allow? [y]es / [n]o / [a]lways this session: y ● run_command npm test Added the toggle and saved the choice in localStorage. All tests pass.
Connecting a provider
Run orion login once for each provider you want to use.
What orion login does
- Shows the list of built-in providers, plus custom for any other OpenAI-compatible API. Type the number and press Enter.
- Asks for your API key. Input is hidden while you type. Leave it empty to use the provider’s environment variable instead.
- Tests the connection by fetching the provider’s model list. If that fails, it shows the error and asks whether to save anyway.
- Shows up to 25 models and asks for a default. Press Enter to accept the suggestion in brackets.
- Saves everything to
~/.orion/config.json.
Built-in providers
| Name | Provider | Key variable | API address |
|---|---|---|---|
anthropic | Anthropic (Claude) | ANTHROPIC_API_KEY | Anthropic API |
openai | OpenAI | OPENAI_API_KEY | https://api.openai.com/v1 |
openrouter | OpenRouter | OPENROUTER_API_KEY | https://openrouter.ai/api/v1 |
google | Google Gemini | GEMINI_API_KEY | https://generativelanguage.googleapis.com/v1beta/openai/ |
groq | Groq | GROQ_API_KEY | https://api.groq.com/openai/v1 |
deepseek | DeepSeek | DEEPSEEK_API_KEY | https://api.deepseek.com/v1 |
xai | xAI (Grok) | XAI_API_KEY | https://api.x.ai/v1 |
ollama | Ollama, local | not needed | http://localhost:11434/v1 |
lmstudio | LM Studio, local | not needed | http://localhost:1234/v1 |
For Anthropic, the suggested default model is claude-opus-5-5.
Using environment variables instead
If the variable for a built-in provider is set, Orion uses it whenever no key is saved for that provider. You don’t need to run orion login at all, but you do need a default model:
# macOS / Linux export ANTHROPIC_API_KEY="sk-ant-..." orion use anthropic/claude-opus-5-5 # Windows PowerShell $env:ANTHROPIC_API_KEY = "sk-ant-..." orion use anthropic/claude-opus-5-5
A key saved with orion login takes priority over the environment variable.
Removing a provider
orion logout openai
This deletes the saved entry. If your default model used that provider, the default is cleared and you’ll need to pick a new one with orion use.
Local models
Run models on your own computer for free, without sending code to a cloud provider.
Ollama
- Install Ollama from ollama.com and start it. It listens on port 11434.
- Download a model that supports tool calling (function calling). Check the model’s page to confirm.
shell
ollama pull <model-name>
- Run
orion login, choose ollama and pick the model. No key is asked for.
LM Studio
- Download a model in LM Studio.
- Open the Developer tab and start the local server. It listens on port 1234.
- Run
orion loginand choose lmstudio.
Custom providers
Any API that follows the OpenAI chat completions format works, including Together, Fireworks, Mistral, a company proxy or your own server.
With orion login
Choose custom, then enter a short name (letters, numbers, - and _), the base URL and, if the server needs one, an API key.
By editing the config
{
"model": "together/meta-llama/Llama-3.3-70B-Instruct-Turbo",
"providers": {
"together": {
"type": "openai",
"baseURL": "https://api.together.xyz/v1",
"apiKey": "..."
}
}
}| Field | Meaning |
|---|---|
type | "openai" for any OpenAI-compatible API, or "anthropic" for the Anthropic API or a proxy in front of it. |
baseURL | The address of the API, usually ending in /v1. |
apiKey | Optional for custom providers. Leave it out for servers that don’t check keys. |
headers | Optional object of extra HTTP headers sent with every request. OpenAI-compatible providers only. |
You can also override a built-in provider this way, for example to send openai requests through a proxy by giving it a different baseURL.
Choosing a model
Models are always written as provider/model-id.
Orion splits at the first slash, so model IDs that contain slashes work as expected: in openrouter/anthropic/claude-sonnet-5-5 the provider is openrouter and the model is anthropic/claude-sonnet-5-5.
See what you can use
orion models # every configured provider orion models openrouter # one provider
Your current default is marked with ●.
Ways to pick a model
| How | Scope |
|---|---|
orion use provider/model | Saves a new default for every session. |
orion -m provider/model | Only this run. |
/model provider/model | Inside a session. Starts a new conversation with that model. |
model: in an agent file | Whenever that agent is used. |
Which one wins
When more than one is set, Orion uses the first of these that exists:
- The
-mflag, or a model chosen with/modelduring the session. - The
modelin the active agent’s file. - The
modelin your configuration.
Thinking effort for Claude models
For the anthropic provider you can set how much effort the model spends on each step. Lower is faster and cheaper; higher is more thorough.
{ "effort": "high" }Accepted values are low, medium, high, xhigh and max. Leave it out to use the model’s default. Other providers ignore this setting.
claude-fable-5-1, claude-opus-5-5, claude-opus-5 or claude-sonnet-5-5 directly through Anthropic, Orion turns on Anthropic’s server-side fallback. If the model declines a request, Anthropic retries it on a suitable fallback model for you.Sessions and one-off tasks
Use an interactive session for back-and-forth work, or orion run for a single task.
Interactive session
orion
Orion shows the active agent, model and folder, then waits at the › prompt. The conversation keeps its history until you clear it, switch model or agent, or exit. Exit with /exit, Ctrl+D or Ctrl+C.
One-off task
orion run "rename the getUser function to fetchUser everywhere"Orion does the task, prints the result and exits. The exit code is 1 if the model request failed, so it can be used in scripts. If nothing can answer the permission prompts (for example in CI, where there is no terminal), writes and commands set to ask are refused. Use --yolo or set permissions to allow for unattended runs.
Options
| Option | Effect |
|---|---|
-m, --model <provider/model> | Model for this run. |
-a, --agent <name> | Agent for this run. |
--yolo | Allow all file writes and commands without asking. |
-h, --help | Show help. |
-v, --version | Show the version. |
Long tasks
A single request can take up to 60 tool steps. If a task needs more, Orion stops and tells you. Type continue to carry on from where it stopped.
Session commands
Type these at the › prompt during an interactive session.
| Command | What it does |
|---|---|
/help | Show the help text. |
/model | Show the current agent, model and folder. |
/model <provider/model> | Switch model. Starts a new conversation. |
/models | List models available from the current provider. |
/agent | Show the current agent. |
/agent <name> | Switch agent. Starts a new conversation. |
/agents | List built-in and custom agents. |
/clear | Start a new conversation with the same agent and model. |
/yolo | Toggle asking before writes and commands. |
/usage | Show input and output tokens used in this conversation. |
/exit, /quit | Leave Orion. |
Tools
These are the actions the model can take. Paths are always relative to the folder you started Orion in.
| Tool | Inputs | Behavior |
|---|---|---|
list_dir | path | Lists files and folders. Folders end in /. |
read_file | path, offset, limit | Returns numbered lines, 2,000 by default. offset is the first line to read. |
find_files | pattern | Finds files by glob, such as src/**/*.ts. Up to 500 results. |
search | pattern, path | Searches file contents with a JavaScript regular expression. Returns file:line: text, up to 200 matches. Binary files are skipped. |
write_file | path, content | Creates or overwrites a file, creating folders as needed. Asks first. |
edit_file | path, old_string, new_string | Replaces one exact piece of text. Fails if the text appears zero times or more than once. Shows a diff and asks first. |
run_command | command | Runs a shell command in the project folder and returns its output and exit code. Stops after 2 minutes. Asks first. |
Details
- Ignored folders.
list_dir,find_filesandsearchskip.git,node_modules,dist,build,.next,.venv,venv,__pycache__,.cacheandcoverage. - Long output from any tool is cut at 20,000 characters, with a note saying how much was left out.
- Shell. Commands run in
cmd.exeon Windows and/bin/shon macOS and Linux, with your normal environment variables. - Commands that wait for input, such as a dev server or an interactive prompt, will run until the 2-minute limit. Ask the model to use non-interactive flags, or start long-running servers yourself.
Permissions and safety
Orion separates actions into two kinds you can control: write (write_file, edit_file) and bash (run_command). Reading and searching never ask.
Answering a prompt
| Answer | Result |
|---|---|
y or yes | Allow this one action. |
| n or anything else | Refuse it. The model is told you said no and can try something else. |
| a | Allow this action and every action of the same kind for the rest of the session. |
Setting defaults
{
"permission": { "write": "ask", "bash": "ask" }
}Each can be ask (the default), allow or deny. For example, {"write": "allow", "bash": "ask"} lets Orion edit freely but still checks every command.
Skipping prompts
--yolo sets both kinds to allow for that run. In a session, /yolo turns it on or off.
What Orion will not do
- File tools refuse any path outside the project folder, including
..and absolute paths. - The
planagent and any custom agent without write tools cannot change files, whatever your permission settings.
--yolo only in projects you can restore, such as a clean git checkout.Agents
An agent is a model plus a set of tools plus instructions. Orion ships with two.
| Agent | Tools | Use it for |
|---|---|---|
build | All seven | Doing the work: writing features, fixing bugs, running tests. This is the default. |
plan | list_dir, read_file, find_files, search | Exploring a codebase and getting a step-by-step plan before anything changes. |
Switching agents
orion -a plan # start with an agent orion agents # list every agent and where it comes from
Inside a session, use /agent plan. To change the default agent, set "agent": "plan" in your configuration.
A good pattern for larger changes: ask plan for a plan, read it, then switch to build and ask it to carry the plan out.
Writing a custom agent
Create a Markdown file. The file name is the agent’s name.
Where to put it
| Location | Available in |
|---|---|
~/.orion/agents/<name>.md | Every project. |
.orion/agents/<name>.md | This project only. Commit it so your team gets it too. |
If both exist with the same name, the project one is used. A file named build.md or plan.md replaces the built-in agent.
File format
--- description: Reviews code for bugs and security problems model: openrouter/your-model tools: read_file, search, find_files, list_dir --- You are a senior engineer reviewing this project. Point out bugs, security problems and unclear code, with file and line. Do not modify any files. End with a short summary of the most important issues.
| Header field | Required | Meaning |
|---|---|---|
description | No | Shown in orion agents and when you switch to the agent. |
model | No | Model this agent uses. Without it, the agent uses your default. |
tools | No | Comma-separated list of tool names. Without it, the agent gets all seven tools. |
The header block between the --- lines is optional. Everything after it is added to Orion’s instructions for that agent.
More examples
--- description: Writes and fixes tests tools: list_dir, read_file, find_files, search, write_file, edit_file, run_command --- Write tests for the code the user names. Match the existing test style and framework. Run the test command after every change and fix failures. Never change application code, only test files.
--- description: Writes and updates documentation tools: list_dir, read_file, find_files, search, write_file, edit_file --- Keep README files and code comments accurate and short. Read the code before describing it. Never run commands.
Project instructions
Tell Orion about your project once, instead of repeating it in every request.
Create ORION.md in the folder where you run Orion. Its contents are added to the instructions of every agent in every session. If there is no ORION.md, Orion reads AGENTS.md instead, so a file you already keep for other tools works too.
# My App Next.js 15 with TypeScript, Tailwind and Prisma. ## Commands - Install: npm install - Test: npm test - Lint: npm run lint ## Rules - Use server components unless a component needs state. - Put shared types in src/types. - Never edit files in src/generated.
Good things to include: the stack, the commands to build, test and lint, folder conventions, and anything the agent must never touch. Keep it short; it is sent with every request.
Configuration file
Orion keeps its settings in ~/.orion/config.json. Most people never edit it by hand.
Full example
{
"model": "anthropic/claude-opus-5-5",
"agent": "build",
"effort": "high",
"permission": { "write": "ask", "bash": "ask" },
"providers": {
"anthropic": { "apiKey": "sk-ant-..." },
"ollama": {},
"together": { "type": "openai", "baseURL": "https://api.together.xyz/v1", "apiKey": "..." }
}
}| Key | Default | Meaning |
|---|---|---|
model | none | Default model, as provider/model-id. |
agent | "build" | Agent used when you don’t pass -a. |
effort | none | Anthropic only: low, medium, high, xhigh or max. |
permission.write | "ask" | ask, allow or deny for file writes and edits. |
permission.bash | "ask" | ask, allow or deny for shell commands. |
providers | {} | Saved keys and custom providers. See Custom providers. |
Per-project settings
A project can override settings in .orion/config.json inside the project folder. Top-level keys replace the global ones; permission and providers are merged key by key.
{
"model": "ollama/your-local-model",
"permission": { "bash": "deny" }
}Viewing your settings
orion config
Prints the file’s location and the combined settings for the current folder, with keys shortened so they are safe to share. On macOS and Linux the file is created readable only by your user.
CLI reference
| Command | Description |
|---|---|
orion | Start an interactive session in the current folder. |
orion run "<task>" | Do one task and exit. |
orion login | Add or update a provider and choose a default model. |
orion logout <provider> | Remove a saved provider. |
orion models [provider] | List models your keys can use. |
orion use <provider/model> | Set the default model. |
orion agents | List built-in and custom agents. |
orion config | Show the settings in effect, with keys hidden. |
orion --help | Show help. |
orion --version | Show the version. |
Options -m, -a and --yolo work with orion and orion run, before or after the task. An unknown command is an error, so a typo such as orion lgoin never gets sent to the model as a task.
Environment variables
| Variable | Effect |
|---|---|
ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY | Key for that provider when none is saved. |
ORION_HOME | Use a different folder instead of ~/.orion for settings and global agents. |
NO_COLOR | Turn off colored output. |
Troubleshooting
No model set yet. Run "orion login"
No default model is saved and none was passed with -m. Run orion login, or orion use provider/model if your key is already set.
No API key for "openai"
That provider has no saved key and its environment variable is empty. Run orion login and choose it, or set the variable in the same terminal before starting Orion.
401 Unauthorized — the API key was rejected
The key is wrong, expired or revoked, or belongs to a different provider. Create a new key in the provider’s dashboard and run orion login again. Also check that the account has billing set up; some providers reject keys on accounts without credit.
Could not connect (127.0.0.1:11434)
The local server isn’t running. Start Ollama or the LM Studio server, then try again. For a custom provider, check the baseURL.
Unknown provider "x"
The part of the model name before the first slash doesn’t match any built-in or saved provider. Check spelling with orion config.
The model answers but never edits files
The model probably doesn’t support tool calling, or you are using the plan agent. Check with /agent, and pick a model whose provider lists tool or function calling support.
old_string found 0 times
The model tried to edit text that isn’t in the file, usually because the file changed. This is normal; the model sees the error, reads the file again and retries.
Stopped after 60 steps
The task hit the step limit for one request. Type continue, or split the task into smaller requests.
Response was cut off mid tool call
The model tried to write a very large file in one go and hit its output limit. Ask it to make the change in smaller parts.
The model declined this request
The provider’s safety system refused the request. Rephrase it with more context about what you are building.
FAQ
Does Orion see or store my API key anywhere else?
No. The key is stored in ~/.orion/config.json on your computer, or read from your environment, and sent only to the provider you configured. There is no Orion server.
What does it cost?
Orion is free and open source. You pay your model provider for the tokens you use, at their normal rates, or nothing at all with a local model. Check token use with /usage.
Where does my code go?
The files the model reads and the output of commands are sent to your model provider as part of the conversation. With Ollama or LM Studio, nothing leaves your computer.
Which model should I use?
For real coding work, a strong model with good tool calling gives the best results. Use a cheaper or local model for small edits, reviews and questions; agents can each have their own model, so you can mix them.
Can I use it without internet?
Yes, with a local model through Ollama or LM Studio.
Does it work on Windows?
Yes. Commands run in cmd.exe, so the model needs to use Windows commands; Orion tells it which platform it is on.
How is $ORION related to the tool?
$ORION is the project’s community token. You don’t need it to use Orion. See the home page for details. It has no intrinsic value and nothing here is financial advice.