Skip to content

ilovepixelart/pi-code

Repository files navigation

pi-code

npm npm GitHub
Coverage Quality Gate Status
Reliability Rating Maintainability Rating Security Rating

Claude Code experience for the pi coding agent, in one package. Point pi at a project that already has a .claude/ directory and it reads your existing config: rules, commands, skills, hooks, output styles, MCP servers, and agents. It also adds the Claude Code features pi lacks: a todo overlay, checkpoints, memory, web search, and subagents.

pi-code demo

Install

pi install npm:pi-code       # from npm
pi install -l npm:pi-code    # project-local instead, writes .pi/settings.json

Other sources:

pi install git:github.com/ilovepixelart/pi-code
pi install ./pi-code         # local checkout, then /reload after edits

One pi install and everything below loads on the next start. pi list shows what is installed, pi config toggles individual resources, and pi update pi-code upgrades it. Each feature is an extension under extensions/.

What it does

Feature Reads / provides Extension
Global + project rules ~/.claude/rules, .claude/rules (+ paths: frontmatter scoping) claude-rules.ts
Custom slash commands .claude/commands/*.md → pi prompt templates commands.ts
Skills .claude/skills → pi skill discovery skills.ts
Hooks .claude/settings.json hooks on pi lifecycle events hooks.ts
Output styles .claude/output-styles + active outputStyle, /output-style switcher output-styles.ts
CLAUDE.md @imports resolves @path imports pi's native loader skips context-imports.ts
MCP servers user ~/.claude.json, ~/.pi/agent/mcp.json (loaded on session start); project .mcp.json, .pi/mcp.json (only once the project is approved); stdio, HTTP, SSE mcp.ts
Project trust prompts before loading project config (MCP servers, hooks, agents) that pi would otherwise trust silently project-approval.ts
Subagents / Task ~/.claude/agents and ~/.pi/agent/agents, plus project .claude/agents and .pi/agents; background runs subagent/
Plan mode plan_mode_complete tool, exact tool snapshot/restore plan-mode/
Todo list persistent overlay, status machine, compaction-safe todo.ts
Checkpoints / rewind shadow-repo snapshots, hard-reset restore git-checkpoint.ts
Persistent memory per-project memories, index injected each session memory.ts
WebSearch / WebFetch key-free DuckDuckGo search, SSRF-guarded fetch web.ts
AskUserQuestion vendored example question.ts
Statusline turn state + session cost status-line.ts
Notifications vendored example notify.ts

CLAUDE.md itself needs no extension: pi loads CLAUDE.md / AGENTS.md context files natively (global + walking cwd to root). context-imports.ts only adds the @import resolution pi's loader lacks, appending the imported files without re-injecting the base.

output-guard.ts and web-transport.ts are shared internals (context-budget truncation, DNS-pinned fetch) with no feature of their own; the tools above use them.

Vendored bases (question, notify, status-line) come from pi's MIT example extensions (see LICENSE).

Development

npm install
npm run check           # biome + strict tsc + vitest, the whole gate
scripts/e2e.sh          # drives the real pi TUI via tmux (needs a working model)
scripts/record-demos.sh # re-records demos/*.tape with vhs at low thinking

Extensions live in extensions/, tests in tests/. Install a local checkout with pi install ./pi-code, then /reload after edits.

About

Claude Code experience for the pi coding agent, in one package: reads your .claude config (rules, commands, skills, hooks, output styles, MCP, agents) and adds todo, checkpoints, memory, web, and subagents.

Topics

Resources

License

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors