Move multi-day AI work across Claude Code, Codex, Antigravity, OpenCode, and more out of scrolling chat tabs — living reports, multi-worker flows, enforced cross-model review, mobile PWA Focus inbox, and governed local memory.
Homepage · Essays · Quickstart · Built-in Protocols · Documentation · Releases · Discord
Desktop workspace (living report with custom widgets, structured data tables, and margin Lead steering) alongside the mobile PWA Focus inbox (Needs repair, unread replies, and running tracks) synced to the same local workspace.
Perga moves multi-day and multi-week work — maintaining a repository, driving engineering OKRs, or running ongoing investment research — out of drifting chat tabs. Each goal gets its own isolated Track: conversation stays in the side pane while the main view continuously distills a read-only living report backed by kernel-verified facts. Orchestrate parallel workers across the CLIs you already use (Claude Code, Codex, Antigravity, OpenCode, Kimi, Qwen, Devin, Factory, Grok, CodeBuddy, Qoder, and more) from a single local SQLite workspace — self-contained packages for macOS Apple Silicon (arm64) and Linux x64 (no .NET runtime installation required).
- Living reports over drifting chat. Keep conversation in the margin and anchor long-running state in a read-only editorial report combining schema-validated ledgers with non-forgeable kernel facts (task status, actual model, gate exit codes, timestamps). Context limits trigger native compaction or report-anchored epoch handover.
- Mobile PWA
Focusinbox over LAN or Tailscale. Triage tracks waiting on you (Needs repair, pending asks, unread replies, and active runs), read distilled living reports, and steer running agents mid-turn from your phone — no cloud backend or Electron app required. - Multi-worker across backends with shared control. A single Lead coordinates parallel workers across any supported provider CLI inside the same track. Execution is structurally separated from acceptance, reviews can be enforced on a different model, and humans share the exact same live stream, steering, interrupt, and model controls as the Lead.
- Unified flows and zero-token watches. A lightweight declarative
flow.jsonunifies parallel dependencies,cron/atschedules, declarative child Track spawning (do.kind: "track"), and zero-token external probes (prChecksor shell commands). Nothing spends tokens while idle; state changes and exceptions wake the Lead to decide next steps. - Governed shared human-AI memory. Stop choosing between goldfish amnesia and bloated
CLAUDE.md/ auto-memory drift. Store durable knowledge as readable UTF-8 Markdown scoped by Area and Global, shared across Claude Code, Codex, and ACP. Task sessions can only read, recall, ormemory_propose— a dedicated Memory Planner governs writes with ETag locking and hard byte budgets, plus one-click Save to Memory and@mentionrecall in chat. - Real isolated workspaces, local sovereignty. Isolate tracks via Git worktrees, Jujutsu (
jj), Linux OverlayFS (shared prewarmed build caches), or remote SSH targets. Terminals run in a native Rust bridge (perga-term-bridge), and all state stays in a local SQLite database you own.
Start any track with a single sentence — no upfront template required. Attach a lightweight built-in protocol (27–40 lines) or ask the Lead to author one only when recurring rules and guardrails emerge:
agents-delivery— Zero-schema delivery protocol:builtin:floworchestration, enforced read-write verification gates, and enforced read-only cross-model review routing.okr-loop— Stable Objective, four-column KR ledger (builtin:table) with kernel-stamped updates, dailycronmetric collection, enforced triage routing, andbuiltin:flowtracking.equity-research— Frameless valuation range axis, event expectation timeline (builtin:list), evergreen thesis notes, weeklycronvaluation refresh, on-demandatevent checks, and enforced cross-model review routing.memory— Dedicated Memory Planner track layout for managing pinned rules, topic index entries, and maintenance flows across an Area or Global scope.
- No .NET runtime required — release archives are self-contained packages for macOS Apple Silicon (
arm64) and Linuxx64(including Windows WSL2), bundling the Host, native Rust terminal bridge, multi-backend agent bridge, and web interface. - Node.js 24 or later for the bundled OAR agent bridge.
- At least one configured provider CLI you already use, such as
claude,codex, Antigravity (agystandalone CLI>= 1.5.0viacurl -fsSL https://antigravity.google/cli/install.sh | bash, not just the IDE app),opencode,kimi,qwen,devin, orgrok.
To use DeepSeek Harness (DSH), install dsh 0.2.1-rc.5 or later and configure its model credentials on the Perga Host. Perga discovers dsh on the local PATH and marks it available when DSH reports an enabled model. Set Perga:ProviderExecutables:dsh to use a different executable path. DSH sessions use OAR's full-access default and run with the execution account's filesystem permissions. Perga disables DSH's optional session event-log upload when opening or resuming a session.
If DSH is your default provider, choose a different default in Settings › Planners before downgrading to a build that supports planner settings but predates built-in DSH discovery.
curl -fsSL https://keanji-x.github.io/perga/install.sh | bashThe installer verifies the archive's SHA-256 checksum, installs to ~/.local/share/perga-app, and writes the perga launcher to ~/.local/bin. Set PERGA_VERSION=v0.1.1 to pin a release, or PERGA_INSTALL_DIR, PERGA_BIN_DIR, PERGA_DATA_DIR, and PERGA_DB_PATH to choose locations.
pergaPerga starts in the background and opens your browser directly into your local workspace on macOS and Linux desktops — no username or password required on 127.0.0.1 (secured by a local 0600 launch token exchanged for an HttpOnly cookie). If the browser doesn't open automatically, run perga open or visit the address printed by perga (default http://127.0.0.1:4041/).
When you want password protection for LAN, Tailscale, or mobile PWA access, set up your local owner account anytime from the bottom-left user menu (Settings › Account), start with perga --require-auth for the first-run Web setup page, or run perga auth init-owner --username owner (add --password-stdin for scripts or headless servers).
The web app is installable as a PWA, and the Host starts the bundled native terminal bridge automatically when needed.
perga status # show the running instance and its URL, PID, and paths
perga logs -f # follow the background log
perga stop # stop the background instance
perga restart # restart with the same Host arguments
perga open # open the running instance in your browser
perga --foreground # run in this terminal (also perga serve)
perga --no-open # start without opening a browserperga version # installed version, install and data directories
perga doctor # package files, Node.js 24+, database, and provider CLIs
perga doctor --deep # probe provider CLI versions, sign-in status, and models
perga upgrade # latest release; or `perga upgrade v0.1.1`
perga uninstall # remove the package and launcher; data in PERGA_DATA_DIR is keptUpgrades keep the data directory and database path recorded by the launcher and restart a running background instance with its saved Host arguments.
Manual archive install & LAN/Tailscale HTTP options
Download the archive and matching .sha256 file from the same GitHub Release (or a CI workflow artifact).
Linux x64 (uname -sm prints Linux x86_64)
sha256sum -c perga-linux-x64.tar.gz.sha256 && tar -xzf perga-linux-x64.tar.gzmacOS on Apple Silicon (uname -sm prints Darwin arm64)
shasum -a 256 -c perga-darwin-arm64.tar.gz.sha256 && tar -xzf perga-darwin-arm64.tar.gzEnter the extracted directory, create the owner account on first use (or omit auth init-owner for local loopback launch-token mode), and launch the self-contained Host directly:
cd perga
export PERGA_DATA_DIR="${PERGA_DATA_DIR:-$HOME/.local/share/perga}"
./Perga.Host auth init-owner --username owner --allow-migrate
./Perga.Host --urls http://127.0.0.1:4041Use the same PERGA_DATA_DIR on subsequent starts and upgrades to preserve your owner account, tracks, and memory.
By default, Perga allows cleartext HTTP only on direct loopback connections (http://localhost / http://127.0.0.1) and requires HTTPS for LAN or proxied access. On a trusted private network where you want plain HTTP access (for example --urls http://0.0.0.0:4041), opt in explicitly with PERGA_AUTH_ALLOW_INSECURE_HTTP=true (or --Perga:AuthAllowInsecureHttp=true, keeping AuthCookieSecurePolicy=Auto). Owner login, origin/host guards, and HTTPS-or-loopback management bearer checks remain active.
Build from source
Start in the repository root on the target machine with the .NET 11 SDK, Node.js 24 or later, npm, rustup, and a native C linker installed. On macOS, Xcode Command Line Tools supply the linker.
(cd tools/perga-oar-bridge && npm ci && npm run build)
(cd fe && npm ci && npm run build)
case "$(uname -sm)" in
"Linux x86_64") target=x86_64-unknown-linux-musl; rid=linux-x64 ;;
"Darwin arm64") target=aarch64-apple-darwin; rid=osx-arm64 ;;
*) echo "Unsupported platform" >&2; exit 1 ;;
esac
rustup target add "$target"
(cd tools/perga-term-bridge && cargo build --locked --release --target "$target")
out=$(mktemp -d)
bash tools/publish-host.sh "$out/perga" "tools/perga-term-bridge/target/$target/release/perga-term-bridge" "$rid"
cp -R fe/web/dist "$out/perga/web"
cd "$out/perga"You are now in the self-contained package directory. Set PERGA_DATA_DIR, create the owner account on first use (optional for local loopback), and start the Host:
export PERGA_DATA_DIR="${PERGA_DATA_DIR:-$HOME/.local/share/perga}"
./Perga.Host auth init-owner --username owner --allow-migrate
./Perga.Host --urls http://127.0.0.1:4041Platform & runtime differences (macOS, Linux, SSH, systemd)
| Feature | Platform behavior |
|---|---|
| Track workspaces | The OverlayFS driver shares prewarmed snapshots on a Linux Host with the mount helper. On macOS, the workspace picker offers Git worktrees, Jujutsu workspaces, directory copies, or direct access according to the source and installed tools. |
| Local terminals | A new terminal defaults to the execution account's configured shell. macOS uses its native pseudo-terminal (PTY). The optional Perga__EnableTerminalLinuxUnshare setting uses Linux user and PID namespaces when available and defaults to off. |
| Terminals over SSH | A new terminal defaults to the remote account's configured shell. Perga can copy its bridge automatically between Linux machines with matching x86-64 or arm64 CPUs. With a macOS Host, install a bridge built for the target on its PATH, or set the target's TerminalBridgeExecutablePath to that executable. |
| Agent environment | On Linux and macOS, Agents inherit the execution account's interactive shell environment in the Agent's actual workspace directory. This includes project hooks such as direnv when configured in the shell. Provider probes capture the shell environment in the execution account's home directory. The OAR bridge uses its own Node environment. If shell initialization or the terminal bridge is unavailable, the Agent starts with the existing environment. SSH targets use the remote account and need a compatible terminal bridge. |
| Workspace files | Linux can read an opened file's path and list an opened directory through /proc/self/fd. macOS checks local files with fgetattrlist and lists directories by their resolved path. Over SSH, the extra check on an opened file depends on the target exposing /proc/self/fd. |
| Remote command cancellation | On an SSH target with the setsid utility, Perga starts remote shell commands and agent subprocesses in their own process group. Without it, cancellation can stop the tracked process while leaving its children running. |
Separately installed terminal bridges keep using Bash as the default until they are upgraded to a version that supports account shell selection.
When a Mac is the SSH target, its stock chmod rejects the argument order used by Perga's remote shell and agent launchers. A job can fail before its command starts. For a statically configured Mac target, set WorkspacesRoot to a directory under the remote user's home. Targets added through the API already discover the remote home. If Homebrew's Node is outside the SSH session's PATH, set the target's OarNodeExecutablePath.
For Agent environment capture, Perga starts Bash on Linux as an interactive non-login shell, including on SSH targets. Bash reads ~/.bashrc in this mode. If Agent settings live in ~/.bash_profile or ~/.profile, make them available from ~/.bashrc as well. On macOS and with other Linux shells such as zsh or fish, Perga starts an interactive login shell.
On macOS, use the physical path for workspaces under the system temporary directory. File and template lookups can fail when /var/ and /private/var/ refer to the same workspace. Run migrations against the same database one at a time to avoid a file-sharing error.
For Linux-specific systemd user-unit deployment and hot upgrades, see managed installation and OverlayFS prerequisites.
- Why I Rewrote a 966k-Line AI-Built Rust Codebase in C# (web) — Reversibility, parallel worktree build tax, and three workflow rules for AI-assisted coding
- Stop Scrolling Chat Logs: Why I Built a Report-Centric Agent Harness (web) — Why the human–AI medium must be bounded, why specs drift, and Perga's three report primitives
- Vision and Fundamental Tensions (EN) (中文) — Core premise, four orthogonal tensions, AI vs. human organizational asymmetries, and long-term vision
- Product Design and Prioritized Pain Points — Concrete
P0–P3pain points, minimal solutions, deliberate trade-offs, deferred scope, and paradigm comparison - Scenario Overview — Progressive complexity across
agents-delivery,okr-loop, andequity-research - Software Development Scenarios — Bottom-up user flows across 6 engineering scenarios (bug fixing, features, RFC design, module maintenance, ops, and refactoring), commonalities, differences, and design questions
- Architecture Reference — 18-project .NET topology, dependency matrix, core modules, and contracts
- Unified Track Flow Architecture — Declarative
flow.jsonengine and read-onlybuiltin:flowprojection - Template Architecture — Composable template layers, report widgets, and schema-validated data
- Linux OverlayFS Workspaces — Prewarmed build cache sharing and namespace mount setup
- Self-Hosted Installation & Hot Upgrades — Dual systemd user services and zero-downtime upgrades
CI and Releases (maintainers)
Pushes to main, pull requests targeting main, and manual runs of CI and release run the .NET, Rust, OAR, and frontend checks. Chromium tests run in a separate advisory job. Linux x64 uses the tested static musl terminal bridge and verifies the self-contained package without an external .NET runtime installed. The macOS arm64 runner builds and tests its native self-contained package and bridge.
Actions uploads perga-linux-x64 and perga-darwin-arm64, each stamped with a VERSION file. Pushing a vX.Y.Z tag (for example v0.1.1) publishes both verified self-contained archives, their SHA-256 checksums, and install.sh to GitHub Releases, with install, pin, and upgrade commands at the top of the notes. A vX.Y.Z-* tag (for example v0.2.0-rc.1) publishes a prerelease, which latest installs skip.
Maintainers cut a release from main with tools/release.sh. It checks the tag, a clean tree, HEAD == origin/main, that the tag is new locally and on origin, and that CI passed for HEAD. It is a dry run unless you pass --push:
bash tools/release.sh v0.1.1 # checks only
bash tools/release.sh v0.1.1 --push # create and push the annotated tagLicensed under the Apache License 2.0.