headless

command
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command headless embeds PiG as a library: a coding session with MCP servers and one provider (Anthropic), and no terminal. It reads a prompt from its arguments, runs it, and prints the last assistant message.

ANTHROPIC_API_KEY=... go run ./examples/headless "list the files in the current directory"

MCP servers come from mcp.json in the agent directory and in the project's .pig directory, as for the pig command.

The size of this program is what an embedder pays for MCP, the session API and the provider code. Build it with the strip tags that drop the features it never uses (see docs/site/docs/embedding.md and TestHeadlessEmbedBinarySizeGate).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL