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

- **GitHub URL**: https://github.com/coipond/coi
- **Official Docs / Website**: https://coipond.ai
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Go
- **License**: MIT
- **Engineering Health**: A+ (90/100 · Maintenance 35/35 · Adoption 15/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.17.0 (2026-11-25) — https://github.com/coipond/coi/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, CLI
- **Momentum**: 804 ★ total (+0 24h / +12 7d) · 69 forks
- **Topics**: `agentic-ai`, `ai-tools`, `anthropic`, `claude`, `claude-code`, `code-sandbox`, `codex`, `coding-assistant`, `container-security`, `containers`, `developer-tools`, `incus`
- **When to Use**: Best for: Linux teams running one or more coding agents that need Docker, systemd, or package installs, with reusable limits and restricted egress. Skip if: You only need a thin CLI wrapper, cannot administer Incus, must keep the project directory read-only, or require separate kernels for untrusted tenants.

## Overview
```text
### Architecture & Core Mechanics
Coi is a self-hosted Go CLI that runs coding agents in Incus system containers. `coi build` prepares the base image; `coi shell` launches the configured tool interactively, while `coi run` executes a command or prompt without an interactive session. Each container gives the agent root, systemd, and Docker in a full Linux userspace, but shares the host kernel. The project is mounted at `/workspace`; writes persist on the host under the user's ownership.

The module targets Go 1.26.0 and depends on Cobra, BurntSushi TOML, JSON Schema v6, go-systemd/v22, and miekg/dns. The tree includes `cmd/`, `internal/`, `profiles/`, and `schema/`. Integration is at the CLI and configuration layers, not through a demonstrated MCP server: an inheritable TOML profile selects the image, tool, limits, mounts, network policy, build scripts, and agent instructions.

### Key Capabilities & Differentiators
Claude Code is the default. Coi also supports Codex CLI, OpenCode v1 and v2, pi, Oh My Pi, and Goose. Codex, OpenCode v1, Oh My Pi, and Goose must be included when building the image. Parallel slots have separate home directories; persistent instances keep their installed packages, while ephemeral instances discard the container on exit. Workspace changes and session history survive either lifecycle.

Network policy offers open, restricted, and allowlist egress modes with nftables, DNS pinning, and per-host port controls. Monitoring targets reverse shells, command-and-control traffic, exfiltration, and DNS tunneling; detected HIGH events pause the container, and CRITICAL events terminate it. Read-only Git hooks and IDE settings, protected paths, and a guard against direct commits and pushes to `main` address repository risks. `coi audit` streams JSONL threat events for downstream analysis.

### Trade-offs & Limitations
Compared with running an agent directly on the host, Coi reduces ambient exposure of credentials and environment variables and adds egress controls. Compared with a conventional application container, it gives the agent a full init system and Docker inside the environment, at the cost of administering Incus, base images, and another layer of state. A simple build or test job may not need that setup; a workload that requires a separate kernel belongs in a VM or microVM.

The most important boundary is the writable workspace: changes are saved to the host immediately, so disposing of the container does not undo edits or deletion. Explicit mounts and forwarded secrets also expand what the agent can reach. Treat automated threat response and branch guards as layers rather than guarantees. For unattended work, use scoped credentials, review project profiles before adopting them, and validate the egress policy and monitoring on representative workloads.

### Hardware & Deployment Guide
Run Coi on Linux with Incus; on macOS, it runs through a Linux VM using Colima or Lima. Use a Linux release binary or inspect `install.sh` before running it, then run `coi build` and `coi shell` from the project directory. Use `coi health` to verify the setup. Configure opt-in agents before the build: an existing persistent container retains the image it was created from, so rebuilding the base alone does not update that instance.

For CI or cron, `coi run --prompt-name nightly` runs a predefined prompt headlessly; command exit codes propagate. Start with profile CPU and memory limits and size the host with `coi top` under representative builds and concurrent sessions. This self-hosts execution, not inference: authentication and network requirements depend on the chosen agent and backend. The release list progresses from v0.15.0 to v0.17.0, but the excerpts show installation instructions rather than identifiable feature changes.
```

## Key Capabilities
```text
- Execution: Incus system containers provide agent-local root, systemd, and Docker while sharing the host kernel.
- Workspace: `/workspace` writes back to the host with the user's ownership; host credentials are not forwarded by default, and `coi shell` lists explicit grants.
- Network and response: nftables supports open, restricted, and allowlist egress, with DNS pinning and per-host port scopes; detected HIGH events pause the container and CRITICAL events stop it.
- Configuration: Inheritable TOML profiles bundle images, tools, mounts, resource limits, network policy, and build scripts; `coi validate profile` checks profiles.
- Lifecycle: Parallel slots have separate home directories; ephemeral instances discard container-local changes on exit while workspace changes and session history are retained.
- Operations: `coi run` propagates exit status, `coi top` reports per-container CPU, memory, and I/O, and `coi audit` exposes JSONL threat events.
```

## Quick Start / Clone
```bash
# 1. Install
curl -fsSL https://raw.githubusercontent.com/coipond/coi/master/install.sh | bash

# 2. Build the base image (first time only, ~5-10 min)
coi build

# 3. Start coding, from any project directory
cd your-project
coi shell
```
