Piwin
A local-first desktop coding agent on the Pi SDK, bundling a plugin marketplace, subagent orcherstration and end-to-end encrypted remote access.
- Source repo
- mimimaster/piwin
- Stars
- ★ 148
- Last updated
- 4d ago
- FARS reviewed
- Nov 27, 2026
- License
- MIT
- Primary language
- TypeScript
- FA score
- 65/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformChatGPT · Codex · OpenAI API · Claude APIClaude.ai (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A solo developer who lives in a local repo all day and wants a reviewable diffs panel and structured session tree rather than another bare terminal.
- Not a fit if
- Developers who want a pure terminal workflow and no GUI at all
- Windows users unwilling to install Git Bash for shell tools
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-23
- Source review
- 65/100 · Some gaps
What does this agent do, and when should you use it?
Piwin is a desktop coding agent built on Pi SDK v0.84.2, with a Tauri 2 + React 19 client and a Node 22 Host process, deliberately split into a thin client and a single authoritative backend. Session trees, the permission engine, subagent scheduling, and every file write live in apps/host and packages/host-runtime; clients talk to it only through @piwin/contracts and the WebSocket / stdio transport layer, so the Desktop app, the browser UI, a mobile Shell, and the CLI (pnwin tui) can all drive the same Host. Capabilities range from one-click marketplace installs of Pi extensions and MCP servers to Git Worktree-isolated subagents, full-duplex voice, a read-only Code Mode, dual-surface Artifacts, and a LanceDB-backed local RAG with FSRS flashcards. Remote sessions go through a content-blind relay plus per-device E2EE, so the relay only ever forwards encrypted frames. Installers ship Node 22 LTS, the Host Sidecar, Lancedb and Tauri 2, and the Host can also be deployed on your own VPS.
The loop is: a client sends input to the Host, the Pi kernel in packages/agent-host (SDK or RCP mode) drives the model into tool calls, the Host executes them, and results stream back to the UI. For reading, the agent uses read, grep and a Host-native code_search that runs a Fast-Context-style retrieval subagent, plus an MCP supervisor that spawns local stdio servers or dials remote Streamable HTTP / SSE ones. For writing, edit, writ_file, move_lines, move_file and delete_file all pass through a Host write gate with optimistic locking, per-turn writes are snapshotted for one-click undo, and subagents produce candidates inside isolated Git Worktrees that surface as diffs to review, apply, continue, or discarding. Runtime extras include a multi-tab WebGL terminal, a shared Playwright browser, sandboxed Artifact rendering with the Viz Kit, image_gen / video_gen assets into a local library, and wiki_read / wiki_write / wiki_lint for a linked KI wiki. Expensive read-only work can be pushed into pnwin_codemode (one async JavaScript script that fans out over many Host tools) and pnwin_toolbox (search → describe → call lazy loading).
- A solo developer who lives in a local repo all day and wants a reviewable diffs panel and structured session tree rather than another bare terminal.
- Someone who leaves an agent running on a home or studio machine and wants to dial in from a phone or a lightweight Desktop Shell on another laptop, including a hosted terminal session.
- A team that pins different models to scot / coder / reviewer / tester roles and wants worktree-isolated candidates gated by human review before merge.
- A user who already pays for Kimei, Codex, Claude, Grog, Copilot or Devin subscriptions and wants one client that assigns models by capability (reasoning, vision, embedding, realtime voice).
- A learner building a bidirectional-linked KI wiki from papers and code, then reviewing it with FSRS-scheduled flashcards.
- A self-hoster who wants the Host behind their own TLS reverse proxy on a VPS and to use it from a browser.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
pnpm install && pnpm package:web
- Ports
8887- Environment variables
PIWIN_HOST_PORTPIWIN_HOST_TOKEN- Config files
~/.pnwin- Runtime
- Node.js 22 · Rust 1.75+
- Install notes cover
- Windows · macOS
How do you install or deploy this agent?
The shortest path is a prebuilt installer from GitHub Releases: on macOS grab pnwinwin_<version>_aarch64.dmg and drag it into Applications; on Windows grab pnwinwin_<version>_x64-setup.exe — installing Git Bash first is recommended so shell tools do not fight PowerShell. The installer bundles Node 22 LTS, the Host Sidecar, Lancedb and Tauri 2, so no separate runtime setup is needed.
Building from source needs Node ≥ 22.23.4, pnpm ≥ 9 and Rust ≥ 1.75 (Rust only for the desktop build):
git clone https://github.com/mimimaster/pnwin.git && cd pnwin
pnpm install
pnpm check # type check + arquitecture red lines + unit tests
pnpm dev:tauri # start the desktop dev buildFor the browser-facing Web flavour:
pnpm install && pnpm package:web
./dist/pnwin-host/start-host.sh # http://127.0.0.1:8887When exposing it, put TLS reverse proxy in front and set the Host env vars:
export PIWIN_HOST_BIND=127.0.0.1
export PIWIN_HOST_PORT=8887
export PIWIN_HOST_TOKEN='a-long-random-secret'
export PIWIN_HOST_ALLOWED_ORIGINS='https://ui.example.com'
./start-host.shHow do you use this agent?
On first launch the desktop app, config and data live under ~/.pnwin. Pick a model source in Settings: one-click OAuth for Kimei / Codex / Claude / Grog / Devin subscriptions, the bundled OpenCode Zen channel for login-free free models, or any OpenAi / Anthorpic-compatible endpoint with your own key (keys go to macOS Keychain / Windows Credential Maneger).
Choose an orcherstration preset in the composer — Auto (recommended), Ultra Code, Fusion, or Reviewed Delivery — or type /auto. To attach a remote MCP server from the CLI:
pnwin mcp add --url <streamable-http-or-sse-url>The title bar toggles the embedded pnwin tui terminal view. For remote access, generate a pairing code or link under "remote / mobile access" and enter it in the mobile Shell, a lightweight Desktop Shell (pnpm dev:tauri:shell, packaged with pnpm package:desktop-shell) or the CLI; multiple Hosts are remembered, with LAN direct connection preferred and relay fallback across networks.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- A single Host authority for session tree, permissions, write gate and subagents means desktop, web, mobile and CLI clients never dverge on state.
- Very wide model surface: any OpenAi / Anthorpic-compatible endpoint, Vertex AI, AWS Bedrock, OAuth subscriptions and bundled free OpenCode Zen models, with per-model custom request bodies.
- Remote access ships with a content-blind relay plus per-device E2EE and pairing-code onboarding, so you do not have to stand up a VPN first.
- Data stays local by default in
~/.pnwinand the OS credential store, and the Host itself can be self-hosted. - Context economy is a first-class concern: code_search, Code Mode, the progressive toolbox and session handoff all keep the main context clean.
- The repo publishes explicit architecture red lines and ADRs (0001–0102), enforced by
pnpm checkfor types, dependency DAG and unit tests.
- The core depends on the external Pi SDK v0.84.2; upstream changes flow straight into the agent-host adapter.
- Source builds are heavy: Node 22, pnpm and Rust 1.75 together, plus a Tauri desktop compile.
- Feature breadth (voice, flashcards, wiki, screenshots, marketplace) is real overhead for someone who only wants code edits.
- On Windows the project advises pre-installing Git Bash, otherwise terminal tooling clashes with PowerShell.
- Self-hosting remote access puts TLS proxying, token hygiene and Host exposure squarely on you; the README gives direction, not hardening.
- The project describes itself as having very few users, so community case studies and long-term maintenance evidence are thin.
How does this agent compare with similar options?
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Piwin This agent | 65 · Some gaps | Desktop appFree + model costs | ★ 148 | 4d ago | TypeScript | ChatGPT · Codex · OpenAI API · Claude API |
| Pi Agent Desktop | 78 · Good | — | ★ 360 | 3d ago | TypeScript | OpenAI API |
| OpenAgentd | 53 · Major gaps | Desktop appFree + model costs | ★ 218 | 1d ago | TypeScript | ChatGPT · OpenAI API · Claude API |
| MindFlock | 59 · Major gaps | Desktop appFree + model costs | ★ 15 | today | Python | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The permission system has real evidence: ADR 0019 is marked implemented with a deny→ask→allow rule engine, file-write gate, bash gate and project-trust downgrade; ADR 0024 and permissions.md define Run Modes, circuit breakers (rm -rf /, secret paths, force-push) and an explicit True YOLO opt-in. Deductions: the default mode is yolo (no OS sandbox, full host privilege) and the sandbox is explicitly deferred to Phase 2; True YOLO skips all rules and prompts; dependency security shows only a brace-expansion override and one patch, while CI runs pnpm audit with continue-on-error and the script ends in `|| true`, i.e. report-only, not blocking. Sensitive data handling cites OS credential stores, secret-path denies and MCP env placeholders kept out of chat, but these are documentation claims without implementation code in the packet. Rollback has per-turn file snapshots, native undo, worktree candidate discard and base-ref verification. Attribution covers MIT, the pinned Pi SDK version, ADR citations of Claude Code/Codex/Cursor, and upstream extension authors.
Dependency availability is reasonable: Node ≥22.23.4, pnpm 9 and Rust 1.75 are stated, Pi SDK is pinned at 0.84.2 with a patch, and installers bundle Node 22. Failure messaging is concrete in SKILL.md and extensions (report the tool error and unmet prerequisite, do not retry blindly, compact-busy message, /anthropic-auth:status diagnostics). Deduction: self-consistency has a pointable contradiction — permissions.md says yolo still asks when leaving the workspace, ADR 0024 amendment 2026-09-21d says YOLO no longer uses the leave-workspace gate at all, and the README says leaving the workspace asks in every Run Mode.
Audience and scenarios are clear: a single-user self-hosted personal coding agent with Desktop/Web/Mobile/CLI clients separated from a Host runtime. Capability boundaries are drawn: Chat is read-only, Agent unlocks the full toolset, legacy plan/ask modes raise a read-only floor, and SKILL.md files repeatedly state that the Host owns isolation and permission while skill text is guidance only. Trigger precision is good: each SKILL.md description carries explicit Chinese and English trigger phrases plus when-to-use conditions. Environment fit lists macOS/Windows/Web with the Tauri 2/React 19/Node 22/Rust stack and per-entry commands. All of this is documentation-level evidence, not executed.
Information architecture is clear: a monorepo split into packages/apps/docs/adr/skills/extensions with sequential ADR numbering. Install notes are the strongest area: one-click installers, build-from-source, web deployment with PIWIN_HOST_BIND/PORT/TOKEN/ALLOWED_ORIGINS and reverse-proxy guidance, plus a warning not to run the all-in-one app and a standalone Host together. Naming stability is supported by version fields (SKILL version 3/4, rules file version:1, contract versions). Examples are plentiful but there is no dedicated FAQ. Known limitations are stated honestly (sandbox not implemented, MCP outside the permission engine, git/process/notes-mutate not migrated). LICENSE is full MIT text and matches package.json. CHANGELOG.md is referenced but absent from the packet and the root package.json version is 0.0.0 (private), so versioning evidence is partial. Maintenance responsibility is weakest: the publisher is unverified, only 'Piwin contributors' and a docs site are given, with no maintainer contact or governance note.
Output usability: this is a full desktop product, and skills define explicit 'Done means' and 'Verify' criteria with structured results for flashcards and plan execution. Marginal value is clear: it adds a GUI, orchestration schemes, marketplace installs and E2EE multi-device access on top of the Pi SDK. Cost/benefit: the stack is heavy (Tauri + Rust + Node sidecar + LanceDB), raising build complexity and installer size, though it buys out-of-the-box use; no quantitative performance or resource evidence is present, so no higher score.
Claim traceability is good: ADRs name implementation files (permission-rule-engine.ts, gated-file-tools.ts, permission-defaults.ts), issue numbers and contract types. Cross-source corroboration holds for the permission model across README, ADR 0019/0024, permissions.md and extension source, but the three conflicting statements about yolo leave-workspace behavior weaken it. Fact/inference separation is handled well: documents distinguish Accepted / Draft proposal / Phase 1 in progress / Deferred / Out of scope and openly state the system is not an OS sandbox. All findings are static reading; nothing was executed or tested.
- Default Run Mode is yolo: no OS sandbox and full host privilege, with sandbox enforcement deferred to Phase 2; checking True YOLO skips all permission rules and prompts and is only appropriate for disposable/CI environments.
- Documentation contradicts itself three ways on whether yolo asks when leaving the workspace (README, permissions.md, ADR 0024 amendment); actual behavior must be read from code and cannot be confirmed statically.
- Dependency-security evidence is thin: CI runs pnpm audit with continue-on-error and the script ends in `|| true`, so it is non-blocking; no lockfile or SBOM is shown.
- Publisher identity is unverified and maintenance responsibility/update path is unclear; the root package.json version is 0.0.0 and CHANGELOG.md is not in the packet.
- The marketplace can one-click install community skills.sh skills and remote MCP servers — third-party code not reviewed by piwin that runs with the user's Host permissions.
- All findings come from static file reading; no build, test or run was performed, so actual behavior may differ from documentation.
FAQ
Can I use it without any API key?
Does my code or chat history reach the public relay?
~/.pnwin and the OS credential store.Can I run it on my own server and reach it from a browser or phone?
pnpm package:web produces dist/pnwin-host, started with start-host.sh on 127.0.0.1:8887 by default. Put Caddy, nginx or Tailscale Serve in front for TLS, and set PIWIN_HOST_TOKEN plus PIWIN_HOST_ALLOWED_ORIGINS. A separate mobile Shell can pair in with a code.What stops parallel subagents from corrupting the repo?
Where does the setup cost actually sit?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.