Coding & Development🌐universal

🐜 oh-pi

One-click setup for pi-coding-agent with ant colony swarm. Like oh-my-zsh for pi.

Quick Start

Install this Skill

npx skills add telagod/oh-pi
<div align="center">

<img src="./logo.svg" width="180" alt="oh-pi logo"/>

# 🐜 oh-pi

**One command to supercharge [pi-coding-agent](https://github.com/badlogic/pi-mono).**

Like oh-my-zsh for pi β€” but with an autonomous ant colony.

[![npm](https://img.shields.io/npm/v/oh-pi)](https://www.npmjs.com/package/oh-pi)
[![license](https://img.shields.io/npm/l/oh-pi)](./LICENSE)
[![node](https://img.shields.io/node/v/oh-pi)](https://nodejs.org)

[English](./README.md) | [δΈ­ζ–‡](./README.zh.md) | [FranΓ§ais](./README.fr.md)

```bash
npx oh-pi
```

</div>

---

## 30-Second Start

```bash
npx oh-pi    # configure everything
pi           # start coding
```

oh-pi auto-detects your environment, guides setup in a modern TUI, and writes `~/.pi/agent/` for you.

Already configured? It detects existing files and offers **backup before overwriting**.

## 2-Minute Value

pi-coding-agent is powerful by default, but manual setup across providers, themes, extensions, skills, and prompts is slow. oh-pi compresses that setup into under a minute β€” then adds an **ant colony swarm** for multi-agent execution.

Want the fast walkthrough? See [`docs/DEMO-SCRIPT.md`](./docs/DEMO-SCRIPT.md).

## When Not to Use Ant Colony

Use plain pi workflows (without colony) when your task is tiny, highly exploratory, or needs constant human steering.

For positioning, scope, and milestones, see [`ROADMAP.md`](./ROADMAP.md). For rationale behind key trade-offs, see [`DECISIONS.md`](./DECISIONS.md).

## What You Get

```
~/.pi/agent/
β”œβ”€β”€ auth.json            API keys (0600 permissions)
β”œβ”€β”€ settings.json        Model, theme, thinking level
β”œβ”€β”€ keybindings.json     Vim/Emacs shortcuts (optional)
β”œβ”€β”€ AGENTS.md            Role-specific AI guidelines
β”œβ”€β”€ extensions/          8 extensions (7 default + ant-colony)
β”‚   β”œβ”€β”€ safe-guard       Dangerous command confirmation + path protection
β”‚   β”œβ”€β”€ git-guard        Auto stash checkpoints + dirty repo warning
β”‚   β”œβ”€β”€ auto-session     Session naming from first message
β”‚   β”œβ”€β”€ custom-footer    Enhanced status bar (token/cost/time/git/cwd)
β”‚   β”œβ”€β”€ compact-header   Streamlined startup info
β”‚   β”œβ”€β”€ auto-update      Check for updates on launch
β”‚   β”œβ”€β”€ bg-process       ⏳ **Bg Process** β€” Auto-background long-running commands (dev servers, etc.)
β”‚   └── ant-colony/      🐜 Autonomous multi-agent swarm (optional)
β”œβ”€β”€ prompts/             10 templates (/review /fix /commit /test ...)
β”œβ”€β”€ skills/              11 skills (tools + UI design + workflows)
└── themes/              6 custom themes
```

## Setup Modes

| Mode | Steps | For |
|------|-------|-----|
| πŸš€ **Quick** | 3 | Pick provider β†’ enter key β†’ done |
| πŸ“¦ **Preset** | 2 | Choose a role profile β†’ enter key |
| πŸŽ›οΈ **Custom** | 6 | Pick everything yourself |

### Presets

| | Theme | Thinking | Includes |
|---|-------|----------|----------|
| ⚫ Full Power | oh-pi Dark | high | All extensions + bg-process + ant-colony |
| πŸ”΄ Clean | Default | off | No extensions, just core |
| 🐜 Colony Only | oh-pi Dark | medium | Ant-colony with minimal setup |

### Providers

Anthropic Β· OpenAI Β· Google Gemini Β· Groq Β· OpenRouter Β· xAI Β· Mistral Β· [FOXNIO](https://www.foxnio.com) (recommended public-benefit Claude provider)

Auto-detects API keys from environment variables.

## 🐜 Ant Colony

The headline feature. A multi-agent swarm modeled after real ant ecology β€” deeply integrated into pi's SDK.

```
You: "Refactor auth from sessions to JWT"

oh-pi:
  πŸ” Scout ants explore codebase (haiku β€” fast, cheap)
  πŸ“‹ Task pool generated from discoveries
  βš’οΈ  Worker ants execute in parallel (sonnet β€” capable)
  πŸ›‘οΈ Soldier ants review all changes (sonnet β€” thorough)
  βœ… Done β€” report auto-injected into conversation
```

### What's new in v0.1.75

- **Planning Recovery Loop**: if scouts return unstructured intel, colony enters `planning_recovery` instead of failing immediately.
- **Plan Validation Gate**: before workers start, tasks are validated (title/description/caste/priority).
- **Scout Quorum for complex goals**: multi-step goals default to at least 2 scouts for better planning reliability.

### Colony lifecycle (simple)

`SCOUTING β†’ (if needed) PLANNING_RECOVERY β†’ WORKING β†’ REVIEWING β†’ DONE`

### Architecture

Each ant is an in-process `AgentSession` (pi SDK), not a child process:

```
pi (main process)
  └─ ant_colony tool
       └─ queen.ts β†’ runColony()
            └─ spawnAnt() β†’ createAgentSession()
                 β”œβ”€ session.subscribe() β†’ real-time token stream
                 β”œβ”€ Zero startup overhead (shared process)
                 └─ Shared auth & model registry
```

**Interactive mode:** Colony runs in the background β€” you keep chatting. A live widget shows ant progress, and results are auto-injected when done.

**Print mode (`pi -p`):** Colony runs synchronously, blocks until complete.

### Why ants?

Real ant colonies solve complex problems without central control. Each ant follows simple rules, communicates through **pheromone trails**, and the colony self-organi

... (truncated)
Repository
24stars
6forks
View on GitHub
Details
DiscoveredMar 2, 2026
Last UpdatedMar 2, 2026
Author@telagod
Quality Score
46/100