Skip to content
Projets

À propos

Pi Agent Desktop — 基于 Electron 的 Pi 编程智能体桌面客户端 (衍生自 pi-web)

IA et apprentissage automatique

Comment ces chiffres sont mesurés

What you can do

  • Agent modes - Plan / Ask / Full safety modes, with Ask-tool interception confirmation
  • Extension UI Bridge - Native dialogs for extension confirm / select / input / editor / notify
  • Project trust - Project Trust 409 handshake with an authorization dialog
  • Tool panel - Control which tools the agent may use

Progression mesurée des étoiles

in 24h
+1
in 7 days
+6
in 15 days
+8
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

English · 简体中文 · 日本語


Pi Agent Desktop logo

Pi Agent Desktop

Your personal, minimalist Codex — a native desktop client for the Pi coding agent, built with Electron for an experience that feels more native than the browser.

Release License Stars Downloads Platform Landing

Upstream: this project is derived from pi-web, with a focus on desktop experience polish and feature enhancements.

Sponsored partnership

AICodeMirror

Explore AICodeMirror and view its available models and services.

Learn more through my invitation link ↗

This link includes the author's invitation code. Service and promotion details are subject to the platform's pages.

Table of Contents

Features

🖥️ Desktop Experience

Feature Description
Native desktop app Standalone Electron window with system tray and minimize-to-tray
Native workspace UI Apple-style layout, a liquid thinking orb, and a more compact message input
Auto-updates Checks and installs new versions from GitHub Releases
Shortcuts Ctrl+B toggles the left sidebar, Ctrl+Alt+B toggles the right panel

💬 Sessions & Conversation

Feature Description
Session browser All Pi sessions grouped by working directory
Real-time conversation Stream responses live with the agent over SSE
Running message queue Enter to steer immediately, Alt+Enter to queue; drag or keyboard to reorder follow-ups
In-session branching Roll back to any node and continue from there, branches kept in the same file
Branch navigator Visually switch between branches within a session
Fork & clone sessions Branch from any node via API/UI, or clone to a plain directory or a Git worktree on a new branch
Session export Export a session to HTML or Markdown in one click
Model switching Switch models mid-conversation; picker loads providers dynamically registered by local Pi extensions
Usage & quotas Open the status-bar panel to inspect session tokens, cache usage, context capacity, and supported provider quotas with reset times

🤖 Agent Capabilities

Feature Description
Agent modes Plan / Ask / Full safety modes, with Ask-tool interception confirmation
Extension UI Bridge Native dialogs for extension confirm / select / input / editor / notify
Project trust Project Trust 409 handshake with an authorization dialog
Tool panel Control which tools the agent may use
Long-term memory (LTM) Project-level SQLite memory (memory_save / memory_recall / memory_forget) with cross-session retrieval; CJK via FTS5 trigram; auto-observed before agent_end and compaction

⚙️ Configuration & Management

Feature Description
MCP server management Global (~/.pi/agent/mcp.json) and project (<cwd>/.pi/mcp.json) MCP configs, manageable from the UI
Extensions & Skills management Unified UI to enable, diagnose, and manage global and project extensions and Skills
AgentMode persistence Writes a custom desktop_agent_mode node to .jsonl and restores the historical mode on reload
Interface language English / 简体中文, follows the system
File browsing Built-in file browser and viewer in the sidebar

Download & Install

Grab the latest installer from the Releases page.

Platform Package
🪟 Windows Pi-Agent-Desktop-Setup-x.x.x.exe
🍎 macOS (Universal, Intel + Apple Silicon) Pi-Agent-Desktop-x.x.x-mac-universal.dmg (ZIP for auto-update)
🐧 Linux x64 Pi-Agent-Desktop-x.x.x-linux-amd64.deb

Development

Show development commands
# Install dependencies
npm install

# Dev mode (browser)
npm run dev          # http://localhost:30141

# Dev mode (Electron desktop window)
npm run dev:electron

# Type check
npx tsc --noEmit

# Lint
npm run lint

# Unit tests (includes middleware.test.ts; keep --test-force-exit)
npm test

# Windows CI subset (paths / Electron)
npm run test:windows

# macOS CI subset (paths / Electron / packaging config)
npm run test:macos

# Build the installer for the current system (Windows NSIS / Linux DEB; for macOS use the next line)
npm run dist

# Build Intel + Apple Silicon Universal macOS installer
npm run dist:mac

# GitHub Release: push a vX.Y.Z tag and Actions builds all three platforms (see docs/RELEASING.md)

Project Structure

Show project structure
app/
  api/
    sessions/      # Read session files
    agent/         # Send commands, SSE event stream
    memory/        # LTM recall / remember / forget / stats / health
    files/         # Read file contents
    models/        # Available models & default model
    models-config/ # Read/write models.json
    skills/        # Skill search & install
    auth/          # Login & API Key management
    mcp/           # MCP server config read/write
    extensions/    # Extension management
    trust/         # Project trust handshake
    desktop-settings/ # Desktop-level settings
    default-cwd/   # Default working directory
    select-directory/ # Directory picker
    statusline/    # Status line data
    home/          # Home / landing data
    health/        # Health checks
components/        # UI components
electron/          # Electron main process
hooks/             # React hooks (session management, panel layout, etc.)
lib/
  ltm/               # Long-term memory (SQLite + MemoryService + hooks)
  i18n/              # UI copy (en / zh-CN / system)
  session-reader.ts  # Parse .jsonl session files
  session-branch-clone.ts # Session fork & clone params and headers
  git-worktree.ts    # Git worktree creation, identity check & cleanup
  rpc-manager.ts     # Manage AgentSession lifecycle
  normalize.ts       # Normalize toolCall field names
  types.ts
scripts/
  ensure-standalone-next-runtimes.mjs             # Patch in Turbopack runtime
  ensure-standalone-pi-runtime.mjs                # Patch in Pi runtime dependency closure
  ensure-standalone-macos-universal-runtimes.mjs  # Patch in both macOS Sharp runtimes
  dereference-standalone-symlinks.mjs             # Resolve standalone symlinks before packaging
  smoke-standalone-server.mjs                      # Smoke-test the standalone server
  smoke-packaged-standalone.mjs                    # Smoke-test the packaged app

Tech Stack

Next.js React TypeScript Electron Tailwind CSS

Packaging: electron-builder (Windows NSIS · macOS Universal DMG + ZIP · Linux DEB) · Realtime: SSE streaming

Credits

  • pi-mono — the Pi coding agent core
  • pi-web — the upstream web UI project

Contributing

Report issues, open PRs, and merge guidelines live in CONTRIBUTING.md. New features go on dev/ or future/ branches. Releasing follows docs/RELEASING.md.

License

MIT License

Star History

Explorer des projets similaires

Chargement…