Getting started

Install

curl -fsSL https://github.com/egoist/oi/releases/latest/download/install.sh | sh     # Linux, macOS
irm https://github.com/egoist/oi/releases/latest/download/install.ps1 | iex           # Windows

The script downloads the binary for your platform (Linux x64/arm64, macOS arm64, Windows x64/arm64), checks its SHA-256 against the release's checksums.txt, and installs it to ~/.local/bin (Windows: %LOCALAPPDATA%\Programs\oi, added to your PATH). Set OI_VERSION for a specific release and OI_INSTALL_DIR for another directory. The Linux binaries are fully static, so they run on any distribution.

Updates. Interactive sessions check for a new release once a day in the background and install it, checksum-verified, for the next start. oi update updates now, and oi update --check only reports. Turn automatic updates off with "auto_update": false in config or OI_NO_UPDATE=1. Local builds report version dev and never update themselves.

Using it

export ANTHROPIC_API_KEY=...        # or OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY, OPENCODE_API_KEY, ...
                                    # or: oi secret set <provider>   (OS keychain)
oi                                  # interactive full-screen terminal UI
oi -p "fix the failing test"        # one-shot; answer on stdout, activity on stderr
oi -p "what is this?" --image shot.png --output-format json   # images in; one JSON result out
oi -c                               # continue the latest session in this directory
oi log            oi rewind <id>    # event tree; move the head (and the files), next turn branches
oi checkpoint export <session> f.json  /  oi checkpoint import f.json
oi rpc                              # ACP v2 (JSON-RPC 2.0) agent over stdio
oi serve --port 4096                # local HTTP daemon: OpenAPI 3.1 + SSE
oi replay <session> --vs strict.js  # re-run a recorded session against other plugins (--deep: sub-agents too)
oi mcp list | login <server>        # MCP servers and their status; OAuth for remote servers
oi models [query] [--refresh]       # model catalog (built-in snapshot + models.dev)
oi -m openai/gpt-6.2-sol            # any provider/model; -c resumes on the session's last model
oi doctor                           # sandbox / runtime / model / credential status
oi update [--check]                 # install the latest release (also automatic, daily)

The terminal UI. oi opens a full-screen UI on the terminal's alternate screen. It has a header, the conversation, an input box and a status bar showing the permission mode, model, effort and session. Like ratatui, it draws each frame into a cell buffer and writes only the cells that changed. Replies render as Markdown while they stream: headings, bold, italic, code spans, lists, quotes, fenced code and rules. Tool calls show their command and the first lines of output.

  • Commands. Type / to open the command menu. It filters as you type: exact names first, then prefixes, then substrings, then letters in order, so /mdl finds /model. Enter runs the highlighted command. /model, /effort, /mode, /resume, /rewind, /provider and /logout open a picker for their argument; Tab completes and Esc closes. The menu also lists what the agent itself expands: /compact, your custom commands, skills, and MCP prompts (/mcp__server__prompt, listed once you type /mcp). /shells lists background shells, /skills the installed skills.
  • Files and images. Type @ to pick a workspace file or folder (fuzzy, gitignore-aware); the mention attaches it to the prompt (see Prompt expansion). Ctrl+V pastes an image from the clipboard (wl-paste, xclip, macOS osascript, or PowerShell), and pasting or dropping an image file's path attaches that image. Each image shows in the draft as [image #N]; deleting the marker drops it.
  • Providers. /provider lists every provider with how it is connected: env var, config, keychain, or local. Picking an unconnected one asks for its API key without showing it, stores the key in the OS keychain, and opens /model on that provider. /logout removes a stored key.
  • Turns. A prompt typed while a turn runs waits in a queue. Ctrl+C or Esc twice cancels the turn and the sub-agents it waits on.
  • Sub-agents. Each agent call shows as a ◆ block with one live status line (the child's latest tool call, its step count, and at the end its tokens and cost); the child's own text stays out of the transcript. /agents lists agent types and this session's sub-agents, and /agents stop <id|all> stops running ones.
  • Approvals. They pop up above the input box and take one key: 1/y allow, 2/a always allow, 3/n/Esc deny. A write or edit shows the unified diff it would make. "Always allow" names the rule it saves (bash(git status *), edit(src/**), web_fetch(domain:docs.rs); see Permission rules), so the next matching call runs without asking, in this and later sessions.
  • Keys. PgUp/PgDn and the mouse wheel scroll; Ctrl+O shows full tool output and thinking. Shift+Tab cycles the permission mode, which is saved to config (see Configuration). Alt+Enter, Ctrl+J, or \ then Enter inserts a newline, and pasted text stays one prompt. Up and Down move between lines, then through prompt history (kept in <data>/history). Ctrl+D, or Ctrl+C twice, exits; Ctrl+Z suspends. Drag over the conversation to select text; letting go copies it to the clipboard (OSC 52, plus wl-copy, xclip, xsel or pbcopy when available). Drag the scrollbar thumb, or click its track, to scroll. Shift+drag still uses the terminal's own selection.
  • Command output. stdout and stderr are captured while the UI runs, so command output and anything plugins print appear in the conversation.

/help lists every command and key. With stdin not a terminal, oi reads prompts line by line instead.

Flags: -y (auto-approve), --read-only, -m/--model provider/model, --effort, --no-net, --sandbox auto|require|off, --write-root DIR, --plugin FILE, --no-plugins. The default model is anthropic/claude-opus-5-5 at effort high; see Providers.

Scripting (-p). --output-format text (default) prints the answer on stdout and activity on stderr. json prints one object when the turn ends: {"type":"result","session_id","model","stop_reason","is_error","error","result","steps","usage","cost_usd"}. stream-json prints one object per line for every update (text, thinking, tool_call with its input, tool_result, notice, agent_start, turn_end with usage, ...), then the result line. --image FILE (repeatable) sends images with the prompt.

AGENTS.md in the workspace (and in ~/.config/oi/) is added to the system prompt.