PiG Documentation

Guides and references for configuring, using, and extending PiG.

PiG documentation

PiG is a faithful Go implementation of Pi, the reference terminal coding agent. PiG follows observable Pi behavior unless a documented divergence explains a necessary difference.

PiG is under active development. Install it on macOS or Linux with curl -fsSL https://pi-in-go.dev/install.sh | sh, on any supported platform with npm install -g @pi-in-go/pig or go install github.com/MichaelKinsy/PiG/cmd/pig@latest, or download an archive from GitHub Releases. Windows support is a preview. You run these commands in a terminal. If you have not used one before, start with Your first ten minutes.

Start here

  • Your first ten minutes takes you from install to one finished task: choose a model, run a walkthrough, come back later. It assumes no programming experience.
  • Quickstart lists every install route, including a build from source.
  • Install troubleshooting helps when pig is not found or an install fails.
  • Applied use cases are step-by-step walkthroughs for people who do not program: summarise PDFs, organise files, and how to undo.
  • Using PiG covers the normal command-line and interactive surfaces.
  • PiG concepts explains Stock PiG, Resources, Packages, Piglets, and Piglet Binaries.
  • Security explains trust and process boundaries.
  • Providers explains model authentication and configuration.

Agent applications

Use a Piglet to define one agent application:

pig --piglet ./agents/reviewer.yaml

A Piglet selects extensions, skills, tools, prompts, model preferences, discovery policy, secrets, and environment requirements.

Build that application as a native executable when you need direct delivery:

pig piglet build ./agents/reviewer.yaml \
  --format binary \
  --out ./pig-reviewer

Read:

Extend PiG

PiG extensions can use Go, Rust, Python, or Node. Each language needs its own toolchain on your computer; pig setup shows which ones PiG finds. Source extensions normally use the subprocess host. Compatible Go factories can be fused into a Piglet Binary. Your first extension builds one step by step.

Create and validate a Go extension:

pig extension init ./review --lang go
pig install ./review --validate-only --json

Read:

Stock PiG and PiG Standard

Stock PiG contains the Pi-compatible engine and generic extension, Package, Piglet, Binary, and documentation machinery. It does not activate product extensions or PiG artwork.

PiG Standard is an explicit Piglet composition. It uses ordinary extension and Piglet contracts. Stock PiG never selects it automatically.

Run Standard from a source checkout:

pig --piglet piglets/standard/pig-standard.yaml

PiG Standard requires every selected extension to be compiled into its Piglet Binary.

Project facts

Item
Value
Executablepig
Modulegithub.com/MichaelKinsy/PiG
User configuration root~/.pig or PIG_HOME
Agent directory~/.pig/agent or PIG_CODING_AGENT_DIR
Pinned Pi release (behavior oracle)Pi 1.5.0
LicenseMIT

Upstream Pi

Pi remains the reference implementation. PiG is not an official Pi release and does not imply endorsement by Pi's maintainers.

Use the upstream project when you need Pi itself:

The PiG website preserves upstream attribution and labels upstream commands and TypeScript APIs when it presents them for comparison.

PiG project documentation · MIT License