MichaelKinsy/PiG

PiG (Pi in Go) is a faithful Go port of upstream Pi, the TypeScript codebase behind the Pi coding agent. It is a parity-bound translation, not a rewrite: upstream behavior is the contract, and Go is the implementation language.

What it solves

PiG solves the need for a fast, lightweight terminal coding agent that doesn't depend on Node.js. It is a Go reimplementation of Pi, the original minimal and extensible coding agent, so you get the same functionality with quicker startup and a single native binary. It keeps compatibility with Pi's TypeScript extensions, so existing Pi tools work unchanged.

How it works

PiG rebuilds Pi's core packages in Go: the agent loop, AI providers, coding-agent SDK, and terminal UI (TUI). It supplies compatible Go runtime modules for Pi's TypeScript extension API, so Node-based extensions run as they did. In addition, PiG provides extension SDKs for Go, Rust, and Python, letting you write new extensions in those languages. Extensions, skills, and prompts can be bundled into a 'Piglet'—a named agent that is portable and can be compiled into its own executable. PiG is tested against a pinned release of Pi (1.5.0) using paired parity scenarios, ensuring observable behavior matches the reference.

Who it's for

PiG is for developers who want a coding agent in the terminal, especially those who prefer to avoid Node.js dependencies or want faster startup and a single binary. It also appeals to developers who want to extend an agent using Go, Rust, or Python, or who want to package a custom agent as a shareable 'Piglet'. It is in pre-stable 0.x status, so it suits early adopters comfortable with edge cases still hardening.

Highlights

  • Single native binary — no Node.js runtime needed.
  • Runs Pi's TypeScript extensions unchanged via compatible runtime modules.
  • Supports writing extensions in Go, Rust, and Python.
  • Piglet bundles extensions, skills, and prompts into a named agent you can share or build into an executable.
  • Parity-tested against Pi 1.5.0 with paired scenarios and documented divergences.
  • Installable via curl, npm, Go, Nix, or build from source.
  • Windows support is available as a preview.

Related

  • Project
  • Project
  • Project
  • Project
  • Project