pi-c

Changes To index
Login

Changes To index

Initial version of "index"























































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# pic

A durable coding agent in C.
pic does what the [Pi](https://github.com/earendil-works/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.

- **Durable.** Each request, model reply and tool call is committed to `WORKSPACE/.pic/journal.sqlite` before and after it happens. A run that dies is picked up by the next `pic`; a command that may have run is reported as such, never silently re-run.
- **Any model.** Anthropic, OpenAI, Google Gemini, OpenRouter and any OpenAI-compatible server, by API key or [subscription sign-in](docs/manual/sign-in.md), with Pi's thinking levels; [the manual](docs/manual/models.md) lists them all. One conversation can move between providers.
- **One binary, no runtime.** C11, built with Make. Its only dependencies are vendored: SQLite with libfossil, zlib and BearSSL. It links libc, libm and pthread, nothing else.
- **State in SQLite.** pic's own state lives in the journal per workspace and in `~/.pic/pic.sqlite` (settings, the model catalog, trust decisions and the conversation lines that ctx archives). Only what you write yourself is a file: `~/.pic/hooks.json`, `keybindings.json` and `skills/`.

## Install

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

The build uses `CC` (default `cc`); it is warning-clean under clang and gcc.

## Five-minute start

```sh
pic login anthropic              # or set ANTHROPIC_API_KEY, OPENAI_API_KEY, ...
pic                              # the terminal interface in the current directory
pic ask "fix the failing test"   # one request, the answer on stdout
pic -p "list the TODOs"          # Pi's print mode
pic tui -c                       # continue the latest conversation
pic help                         # the manual, compiled in
```

[Getting started](docs/manual/start.md) has the rest.

## Coming from Claude Code

pic runs your Claude Code hooks as they are, `pic import --claude` brings a Claude Code transcript in, and where Pi's keys are awkward on a Mac, pic uses Claude Code's.
See [coming from Claude Code](docs/manual/from-claude-code.md).

## Remote control

Watch and steer a running conversation from another terminal or a phone over ssh with `pic attach`
and `pic send`; `/remote-control` (or `pic remote-control`, `pic rc`) shows the command and a QR
code. See [remote control](docs/manual/remote-control.md).

## Documents

- [The manual](docs/manual/start.md): one topic per file
- [The reference](docs/README.md): flags, settings, environment variables, keys, slash and RPC commands, events
- [Architecture](docs/dev/architecture.md) and [durability](docs/dev/durability.md)
- [The implementation plan](docs/design/implementation-plan.md)
- [AGENTS.md](AGENTS.md): how to change pic and where each change is documented

## License

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