pi-web

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT

README

pi-web

A web front end for the pi coding agent in one small binary: an embedded chat UI plus a JSON API, driving pi --mode rpc (LF-delimited JSONL over stdio) as a child process.

pi-web keeps no state of its own. Sessions are pi's JSONL files in the pi session directory, so anything you start in the browser can be picked up from pi in a terminal, and vice versa.

Install

Prebuilt binaries for Linux and macOS (amd64/arm64) are on the releases page:

curl -Lo pi-web "https://github.com/khangkontum/pi-web/releases/latest/download/pi-web_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" && chmod +x pi-web

Or with Go:

go install github.com/khangkontum/pi-web/cmd/pi-web@latest

Requires the pi CLI on PATH (or point --pi-bin at it).

Usage

pi-web --workspace ~/code/myproject

Then open http://127.0.0.1:9999 and start a session. Pick a working folder, model, and reasoning effort from the UI; sessions are shared with the pi CLI in a terminal.

pi-web binds loopback and authenticates nobody — anything that can reach the socket can drive the agent. Expose it only behind something that authenticates (a reverse proxy, an SSH tunnel), or not at all.

Run pi-web --help for all flags. See docs/reference.md for the HTTP API, self-update, deployment, and release details.

Development

go build ./...
go test ./...

The UI is plain HTML/CSS/JS embedded with go:embed — there is no build step. Tool versions are pinned in mise.toml for mise users; a plain Go toolchain works the same.

License

MIT

Directories

Path Synopsis
cmd
pi-web command
Command pi-web serves the pi coding agent over HTTP: an embedded chat UI plus a small JSON API, with sessions shared with the pi CLI.
Command pi-web serves the pi coding agent over HTTP: an embedded chat UI plus a small JSON API, with sessions shared with the pi CLI.
internal
piweb
Package piweb implements pi-web: a small HTTP server that serves an embedded chat UI and drives the pi coding agent through its RPC mode (`pi --mode rpc`, LF-delimited JSONL over stdio).
Package piweb implements pi-web: a small HTTP server that serves an embedded chat UI and drives the pi coding agent through its RPC mode (`pi --mode rpc`, LF-delimited JSONL over stdio).

Jump to

Keyboard shortcuts

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