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. No public PiG release artifact is available yet.

Start here

  • Quickstart explains how to build and start PiG.
  • 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. Source extensions normally use the subprocess host. Compatible Go factories can be fused into a Piglet Binary.

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 0.87.1
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