Skip to content

Repository files navigation

pigo

CI Release Go

pigo is a terminal coding agent written in Go. Adapt it with extensions, skills, prompt templates, and themes — without forking the host. Put those resources in packages and share them via npm, git, or a local path.

It ships with useful defaults and four ways to run: an interactive TUI, print or JSON, RPC for process integration, and pigo server / pigo client. pigo does not export a stable Go library.

Full manual: docs/README.md. Samples: examples/.

Quick Start

Download a release archive from GitHub Releases, extract it, and put pigo on your PATH.

OS Arch Asset
Linux amd64 pigo_*_linux_amd64.tar.gz
Linux arm64 pigo_*_linux_arm64.tar.gz
macOS amd64 pigo_*_darwin_amd64.tar.gz
macOS arm64 pigo_*_darwin_arm64.tar.gz
Windows amd64 pigo_*_windows_amd64.zip
Windows arm64 pigo_*_windows_arm64.zip

With Go 1.27+:

go install github.com/Lowpower/pigo/cmd/pigo@latest

Authenticate, then start a session in the project you want it to work on:

pigo auth login anthropic          # or openai, openrouter, …
cd /path/to/project
pigo                               # interactive TUI (needs a TTY)
pigo -p "summarize this repo"      # one prompt, then exit

By default the model gets read, write, edit, and bash. Add more through tools, skills, extensions, or packages.

Credentials live in ~/.pigo/agent/auth.json. Settings live in ~/.pigo/agent/settings.json. Override the config root with PIGO_CODING_AGENT_DIR.

See Quickstart and Usage for flags and slash commands.

Providers & Models

Built-in providers include Anthropic, OpenAI, GitHub Copilot, Gemini, Amazon Bedrock, OpenRouter, xAI, llama.cpp, and others. Authenticate with pigo auth login <provider> (API key or OAuth where supported), then pick a model with /model or --model provider/id.

pigo --list-models prints the current catalog. Add providers in ~/.pigo/agent/models.json, or via an extension. See providers and models.

Interactive Mode

Interactive Mode

From top to bottom:

  • Startup headerpigo, provider, model, and theme
  • Messages — your messages, assistant replies, tool calls, and notices
  • Editor — where you type; / opens commands, Tab completes @path
  • Footer — working directory, git branch, session name, token/cost usage, current model, and shortcuts (/help for the rest)

--tui-mode is regular (default) or fullscreen. See Usage and keybindings.

Sessions

Each run that persists writes a JSONL file under ~/.pigo/agent/sessions/. --continue resumes the latest session for this directory; --resume and /resume pick one; --fork / /fork / /clone branch history; /tree jumps to a previous point.

--export and /export write a themed HTML transcript. /share publishes the session (Radius when authenticated, otherwise a private GitHub gist).

See sessions, session format, and compaction. Keep the on-disk JSONL schema stable.

Customization

  • Extensions — subprocess binaries over framed JSON (ext.Serve)
  • SkillsSKILL.md files the model can open
  • Prompt templates — markdown that becomes /name
  • Themes — TUI colour sets
  • Packagespigo install from npm, git, or a local path

Working samples live under examples/.

Programmatic usage

pigo does not export a stable Go library. Embed from:

Development

go build ./...
go test ./...
golangci-lint run ./...
go run ./cmd/pigo --help
go run ./cmd/pigo -p "hello"

The Cloud Agent environment is described in AGENTS.md.

Inspired by earendil-works/pi.

About

CLI/TUI coding agent in Go — streaming LLM, tools, sessions, extensions

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages