Skip to content
pi-c Artifact [da6dd9dd42]
Login

Artifact [da6dd9dd42]

Artifact da6dd9dd42dcfc7e8f6dd119c53226a6d93e5abdf7368375e0e2d3ba65475df7:


pic

A durable coding agent in C. pic does what the Pi coding agent does (same tools, sessions, compaction, slash commands, JSON events and model catalog), and keeps every turn in a SQLite journal so a crash, a kill or a lost connection never loses work or runs a command twice.

Build and install

make pic           # build/pic/release/pic
make install-pic   # runs the test suite, then installs to ~/.local/bin/pic

API keys come from the environment (ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, ...), as in Pi. pic never stores a key.

Use

pic                          # the terminal interface in the current directory
pic tui -c                   # continue the latest conversation
pic ask "fix the failing test"
pic ask -c "now add a regression test"
pic chat                     # a plain line prompt
pic --model openrouter/deepseek/deepseek-v4-flash --thinking high ask "..."
pic models                   # models whose provider has a key
pic sessions                 # conversations in this workspace
pic skills                   # skills in ~/.pic/skills (and the trusted workspace's); /skill:name runs one
pic --json ask "..."         # Pi's JSON events on stdout

In the terminal interface: / opens the command menu (/model, /settings, /thinking, /tree, /fork, /compact, /export, /share, /resume and the rest of Pi's commands); Ctrl+L picks a model, Ctrl+P cycles models, Shift+Tab cycles thinking levels, Esc stops a reply. pic --help lists every command.

Test

make test-pic      # crash, tool, provider, session, TUI and unit suites; ASan/UBSan and release builds

CI runs the same suite on every check-in and gates trunk. Changes are also run under Fil-C, where any memory error is a crash (tools/remote/).

Where pic can run

pic is C11 with every dependency vendored, links only libc, libm and pthread, does its own TLS, and keeps all its state in SQLite. What touches the operating system sits behind two interfaces: pic_platform (clocks, entropy, the lock, input files, the SQLite VFS) and pic_executor (file operations and running commands). That makes unusual targets reachable:

Documents

reference/pi.lock.json pins the Pi revision used as the behavioural reference. Pi's source is not part of this repository.

License

BSD 2-Clause; see LICENSE. Vendored code and adapted Pi material keep their own licenses; see NOTICE.