# Repository Briefing: egoist/oi
> Source: https://repoforai.com/repo/egoist/oi (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/egoist/oi
- **Official Docs / Website**: https://oi.egoist.dev
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Zig
- **License**: MIT
- **Engineering Health**: A (79/100 · Maintenance 35/35 · Adoption 4/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.1.17 (2026-12-03) — https://github.com/egoist/oi/releases
- **Review Snapshot**: 2026-12-03 (Note: v0.1.17 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Self-Hosted, CLI, MCP, API
- **Momentum**: 115 ★ total (+0 24h / +0 7d) · 3 forks
- **When to Use**: Best for: Teams that want a self-hosted coding CLI with provider choice, reviewable edits, file-aware recovery, and ACP or MCP integration. Skip if: You need verified cross-platform sandbox parity, a remote web deployment without your own access-control review, or a drop-in replacement for an established Claude Code workflow.

## Overview
```text
### Architecture & Core Mechanics
oi packages a Zig coding-agent core as one native binary, with quickjs-ng and SQLite compiled in and TLS handled by Zig. The stripped, size-optimized build is about 2.9 MiB; the Linux musl build is fully static. That footprint describes the packaged agent, not the tools or model runtimes it may invoke.

The terminal UI and one-shot `oi -p` are direct entry points. Editors use ACP over stdio through `oi rpc`; `oi serve --web` exposes the local HTTP API and browser UI, and a C library supports native embedding. The first-turn tool set includes file operations, shell execution, search, sub-agent delegation, `tool_search`, and `codemode`. MCP servers, skills, custom commands, hooks, and JavaScript plugins provide separate extension surfaces.

### Key Capabilities & Differentiators
oi can switch providers within a session across services including Anthropic, OpenAI, Gemini, DeepSeek, and OpenRouter, as well as local runners such as Ollama and LM Studio. `oi login codex` and `oi login grok` offer supported subscription sign-in paths instead of API keys. The nine first-turn tools plus the system prompt use about 1.5k tokens, or about 1.2k with sub-agents disabled; installed skills add one prompt line apiece.

File changes are presented as diffs, and permission rules can allow, ask, or deny actions. Rewind restores files to the selected session point; the next prompt creates a new branch. Sub-agents can run in parallel, in the background, or in their own Git worktrees. Rewind is useful for recovering edits, but it should not be treated as rollback for external effects of shell commands.

### Trade-offs & Limitations
Compared with staying on an established Claude Code workflow, oi is worth evaluating when in-session provider switching, ACP integration, or file-aware rewind are decisive. Those features do not establish parity with an existing tool setup; test model choice, MCP integrations, approval prompts, and recovery on representative tasks. A hosted model keeps inference off the workstation but still entails provider terms, network dependence, and usage costs. A local runner puts inference sizing on the operator.

The shell sandbox is optional: `--sandbox on` uses Landlock on Linux or Seatbelt on macOS, with out-of-workspace writes subject to approval. A Windows installer exists, but that does not establish Windows sandbox parity. The MIT license allows commercial use and redistribution under its notice requirements; review the terms of any provider or subscription separately.

### Hardware & Deployment Guide
Run the native binary for the terminal UI or one-shot use. Source builds use Zig 0.17.1 with `zig build -Doptimize=small`. Bun is optional: `bun install && bun run build:web` prepares the web UI for the next Zig build to embed. `oi serve --web` binds to `127.0.0.1:4096` by default; review access controls before using `--host` to expose it to the network or tailnet. The agent is self-hostable, but offline inference requires a local model backend configured in advance.

The recent releases matter for editor and multi-project use. v0.1.14 added ACP v1 alongside v2. v0.1.15 fixed `oi rpc` and `oi serve` so each session uses its own directory for commands, path resolution, `AGENTS.md`, and write permissions instead of inheriting the server's startup directory. v0.1.16 fixed delivery of background reports arriving during the last model call.
```

## Key Capabilities
```text
- Native packaging: Approximately 2.9 MiB stripped in the size-optimized configuration, with quickjs-ng and SQLite compiled in and a fully static Linux musl build.
- Tool context: The nine first-turn tools plus the system prompt use about 1.5k tokens, or about 1.2k with sub-agents disabled; installed skills add prompt lines.
- Execution controls: File diffs precede approval; `--sandbox on` adds Landlock or Seatbelt command restrictions on Linux or macOS.
- Recovery and delegation: Rewind restores files with the session, the next prompt branches, and sub-agents can run in separate Git worktrees.
- Model access: Switch providers mid-session, use Ollama or LM Studio for local inference, or sign in with a supported ChatGPT or Grok plan.
- Integration: `oi rpc` supports ACP v1/v2 over stdio; `oi serve --web` exposes a local HTTP API and web UI; a C library supports embedding.
```

## Quick Start / Clone
```bash
curl -fsSL https://oi.egoist.dev/install.sh | sh
```
