A full IDE on a USB stick. No install, no account, no cloud.
PeaBox is a portable, local-first desktop code editor built with Electron. Open a
folder, edit, search across the workspace, review Git changes, run code, debug,
and use a real terminal — with Git, terminal, LSP and AI built in rather than
assembled from extensions. The portable build keeps its data in a
PeaBox-IDE-Data folder beside the executable, so it works on machines where you
cannot install software.
Where the data goes: editing, search, Git, terminal, run and debugging are local. MCP tools ask permission before they run, and the MCP Audit panel is the inspectable record of what left the machine; keys and tokens are redacted. The agent only writes files you explicitly apply, as a reviewable diff with a rollback checkpoint. Local context indexing is opt-in and deletable. When you explicitly use an AI feature (chat, inline completion, file or scaffold generation, README generation, screenshots), the prompt, selected file content or project context you provide is sent to the provider you configured. Keys are encrypted with Electron
safeStoragewhere available. Choose Ollama to keep AI entirely on your machine, and set a spend cap for paid providers. No telemetry is collected.
- Editor — Monaco with custom dark/light themes and a theme chooser, syntax
highlighting for 40+ languages, sticky scroll, minimap, word wrap, split and
diff editors, adjustable font/tab size, code metrics, outline and symbol palette.
Basic Vim mode is included (
hjkl,dd/yy/p,:w/:q,/search). - Explorer — multi-root workspaces, lazy-loaded folder tree, Git badges, context menus for new file/folder, rename, delete, copy path and reveal.
- Search & replace — async, chunked full-text search with match-case, whole-word and regex modes, grouped highlighted results and click-to-jump. Replace in files previews every match before applying and reloads affected tabs.
- Palette & navigation —
Ctrl+Pfuzzy-searches files,Ctrl+Shift+Pruns commands,Ctrl+Shift+Ojumps to symbols. Back/forward navigation, reopen closed editor, breadcrumbs and a recent-folders welcome screen. Workbench keybindings are editable with conflict detection and JSON import/export. Settings profiles (Default, Work, Personal, Education plus custom ones) can be switched instantly and synced through a local JSON file or a local Git repo. Git sync commits only the settings file and never exports provider keys. - Source control — branching, staging, per-file and per-hunk stage/unstage/
discard, commit and amend, stash browser, fetch/pull/push, diff and hunk diff,
file history, blame compare and inline blame. Git uses argument arrays with
shell: falseand no interactive prompts. - Runtimes & tasks — F5 runs Python, Node, Go, PowerShell or shell with live
output and interactive stdin; runtime autodetection and version checks; npm
scripts from
package.jsonrun directly in the terminal. - Terminal — multiple xterm.js sessions backed by node-pty, tabs, resize handling, automatic fit and SSH connection helper.
- Language support — built-in Monaco workers provide immediate JS/TS, JSON, CSS and HTML completions and diagnostics. Language Profiles detect the languages in a workspace and offer a one-click LSP start for JS/TS, Python, Go, Rust, C/C++, C#, Java, PHP, Ruby, SQL and Shell/YAML. Check a runtime version or place an install command in the terminal for review before running it. Optional profile formatters (Prettier, Ruff, gofmt, rustfmt, clang-format and others) can run on save from a bundled, allow-listed registry. LSP adds completion, hover, signature help, go-to-definition, references, rename, code actions and inlay hints. Diagnostics appear in the Problems view. DAP debugging supports breakpoints, stepping, variables, call stack and a paused-line highlight.
- AI (opt-in) — eight providers including OpenAI, Anthropic, Google, OpenRouter, HuggingFace, Azure Foundry and local Ollama. Inline completions, chat, file creation, project scaffolding, current-file editing and README generation. Writes always require confirmation.
- Private agentic workbench (
Ctrl+Shift+A) — plan → propose unified diff → apply/reject per file → revert a checkpoint. Four local MCP servers ship enabled; optional stdio/HTTP servers need explicit permission. The MCP audit pane records every destination and redacts secrets. An opt-in local index,.peabox/skills/*.mdplaybooks, screenshot attach, a live cost meter and a an enforced USD spend cap complete the loop. - Special viewers — Markdown preview, image preview, hex view for binaries and a chunked viewer for files over 5 MB.
- Session & recovery — restores workspace, tabs, cursor and scroll position; unsaved buffers are snapshotted and offered back after a crash or forced exit. External file changes are watched and protected against accidental overwrites.
- Extras — notes scratchpad, Zen mode, environment switcher, deploy command, plugin commands, drag-and-drop file opening and a keyboard shortcut reference.
- Plugin SDK foundation — manifests in
.peabox/plugins/<id>/peabox-plugin.jsondeclare a permission allowlist, contributions and a worker entry. Validated commands run in a sandboxed Web Worker with a narrow permission-gated API: no window, DOM, Node or raw IPC access. A workspace-local.peabox/registry.jsonlists community plugins with SHA-256 hashes and optional signatures verified by a launcher-provided public key (no private key ships with the app). First-party extras use the same manifest contract but keep stable command IDs and run through built-in commands.peabox-plugin init/validatescaffolds and checks plugins entirely offline. - Role kits — nine first-party kits and workspace-local
.peabox/kits/<id>/peabox-kit.jsonmanifests declare settings patches, plugin references, snippets and task templates.Kits: Browse Local Kitsswitches kits reversibly, captures only allowlisted values, exports a validated manifest, and installs or updates a kit from a JSON file chosen in native dialogs. A maintainer-reviewed offline catalog pins canonical SHA-256 hashes so catalog installs reject altered manifests. First-run onboarding asks what you build, suggests one reviewed kit and applies it only after confirmation; it can be skipped and never runs task commands.npm run kit:checkvalidates manifests, catalog pins and per-kit reference projects offline. Applied snippets join Insert Snippet; task templates run only after an explicit review step, and plugin references remain declarations. Per-kit SEO pages live indocs/kits/, with a classroom guide indocs/education/pilot-guide.md. - Offline team baseline — a workspace-local
.peabox/team-policy.jsoncan allow or deny role kits without an account or network. It is read-only to the app, reported in Settings, and enforced before a kit is applied or installed; restoring a kit is never blocked. The audit panel combines local MCP decisions with reviewable agent checkpoints. Seedocs/team-policy.mdfor the format and open-core boundary. - Security — sandboxed renderer, context isolation, strict CSP, path confinement to workspace roots, atomic writes, shell-free process execution, encrypted keys and a static validator that enforces these rules in CI. Release builds support Windows Authenticode, macOS notarization and Linux GPG signatures; credentials stay in CI secrets, never in the repo.
Download the portable build, extract it, and run PeaBox-IDE.exe. All settings,
sessions and recovery data stay beside it in PeaBox-IDE-Data.
Portable mode is identical on Windows, macOS and Linux. The Windows portable
executable enables it automatically. On macOS/Linux zips, DMGs and AppImages,
set PB_PORTABLE=1 when launching from writable removable media, or set
PB_PORTABLE_DIR to an explicit data directory. A .peabox-portable marker next
to the executable or .app bundle also enables it. PeaBox checks that the data
folder is writable and falls back to the normal user profile on a read-only USB
volume, so the editor still starts. app:info reports the active mode.
From source:
npm install
npm startBUILD_WINDOWS.bat builds the Windows portable/zip artifacts;
START_SOURCE.bat validates and starts source mode.
| Action | Shortcut |
|---|---|
| Quick open files | Ctrl+P |
| Command palette | Ctrl+Shift+P |
| Go to symbol | Ctrl+Shift+O |
| Open folder / open file | Ctrl+O / Ctrl+Alt+O |
| Switch recent workspace | Ctrl+Alt+P (or type % in quick open) |
| New file / save / save all | Ctrl+N / Ctrl+S / Ctrl+Alt+S |
| Close editor | Ctrl+W |
| Sidebar / panel / terminal | Ctrl+B / Ctrl+J / Ctrl+` |
| Explorer / Search / Git | Ctrl+Shift+E / F / G |
| Agent Tools workbench | Ctrl+Shift+A |
| Replace in files | Ctrl+Shift+H |
| Find / Replace / Go to line | Ctrl+F / Ctrl+H / Ctrl+G |
| Font size up / down / reset | Ctrl+= / Ctrl+- / Ctrl+0 |
| Split editor / Zen mode | Ctrl+\ / via command palette |
| Run / Stop | F5 / Shift+F5 |
| Debug: breakpoint / continue / step | F9 / F5 / F10, F11 |
| Definition / references / rename | F12 / Shift+F12 / F2 |
| Settings | Ctrl+, |
- Packaged builds: Windows 10/11 x64 (portable, zip and optional NSIS),
macOS x64/arm64 (DMG/ZIP) and Linux x64 (AppImage/deb). Unsigned local builds
work on all three; signed/notarized release artifacts need the credentials in
SIGNING.md. - Source mode: Windows, macOS or Linux with Node.js 20+ and npm 10+.
node-ptyprebuilds are probed at install time; when none matches the target OS, architecture or Electron runtime,tools/postinstall.jsattempts a source rebuild and reports platform-specific guidance instead of failing the install. The editor, Git, search and run panel work without a terminal.
ROADMAP.md— the full phased plan from v0.23.0 to v1.0CHANGELOG.md— release historyCONTRIBUTING.md— ground rules and development workflowSIGNING.md— release signing and notarization setup for all platformsdocs/zero-setup.md— honest comparison and reproducible demo linksdocs/kits/index.md— portable IDE landing pages for all nine role kitsdocs/education/pilot-guide.md— offline classroom pilot and USB image guidedocs/team-policy.md— offline team policy format and unified local auditAUDIT.md,AUDIT_REPORT.md,FINAL_AUDIT.md— historical quality reviewsRELEASE_NOTES_v0.16.0.md,RELEASE_NOTES_v0.17.0.md— older release notes
npm run validate :: syntax, DOM ids, icons, bridge methods, IPC, security
npm run test:unit :: node:test suite for shared helpers
npm run test:e2e :: Playwright Electron smoke test
npm run lint :: ESLint 9 flat config
npm run test :: validate + unit tests
npm run kit:check :: verify catalog hash pins and kit reference projects
npm run kit:validate :: parse workspace kit manifests with the app's validator
npm run kit:smoke :: simulate reversible switching across every role kit
npm run signing:check :: report configured signing credentials (no secrets shown)
npm run build :: validate + unit tests + Windows portable/zip/installer in dist/
npm run build:win :: Windows portable/zip
npm run build:win-installer :: Windows NSIS installer (signed when configured)
npm run build:mac :: macOS signed/notarized DMG/ZIP (requires credentials)
npm run build:mac-unsigned :: macOS unsigned verification build
npm run build:linux :: Linux AppImage/deb (adds .asc signatures when configured)
npm run demo:capture :: regenerate docs/demo GIF and MP4 (needs ffmpeg)
npm run audit :: npm audit --omit=dev| File | Purpose |
|---|---|
main.js |
Electron main process: window, persistence, IPC, filesystem, Git, runtimes, terminals, LSP/DAP, AI, recovery |
main/settings-sync.js |
Settings export/import and Git sync IPC, with dialog-based repository authorization |
main/kit-catalog.js |
Maintainer-reviewed offline catalog with canonical SHA-256 pins |
main/kit-landing.js |
Per-kit SEO snippets generated from reviewed manifests |
main/team-policy.js |
Read-only workspace policy IPC with path confinement |
preload.js |
Context-isolated bridge exposing the namespaced window.api |
renderer/dom.js |
Classic-script DOM helpers in the window.PeaBoxRenderer namespace |
renderer/context.js |
Shared session state and core accessors for renderer modules |
renderer/modal.js |
Reusable modal, confirmation and input dialog helpers |
renderer/paths.js |
Shared relative-path and path-comparison helpers |
renderer/search.js |
Workspace search, replace preview and highlighted results |
renderer/git.js |
Git status, tree badges, changes, diffs, hunks, history, branches and commits |
renderer/git-gutter.js |
Git diff gutter decorations and inline/hover blame |
renderer/lsp.js |
Language profiles, LSP servers, Monaco providers and symbol navigation |
renderer/ai.js |
AI completions, chat, provider keys, file creation and scaffolding |
renderer/debug.js |
DAP sessions, debugger controls, stack/variables and Monaco breakpoints |
renderer/core.js |
Theme, layout, persistence, navigation history and view switching |
renderer/workspace.js |
Monaco bootstrap, editor status helpers and workspace/recent-project lifecycle |
renderer/explorer.js |
Explorer tree, Git badges, file/folder creation, rename/delete and reveal actions |
renderer/tabs.js |
Editor tabs, breadcrumbs, file open/save/close, previews and dirty tracking |
renderer/settings.js |
Settings, profiles, sync, keybindings and unsaved-work recovery |
renderer/runtime.js |
Run, output/problems and terminal panels |
renderer/editor-tools.js |
Compare/diff, snippets, transforms, split editor and view toggles |
renderer/commands.js |
Command registry, file index, command palette and outline symbols |
renderer/shell-support.js |
Context menu, external-change reconciliation, close prompts and status helpers |
renderer/lifecycle.js |
Menu dispatch, keyboard, drag/drop, startup and the host bridge |
renderer.js |
Thin boot entry that validates and starts the Lifecycle module |
shared.js |
Dependency-free UMD helpers shared by main, renderer and tests |
index.html / style.css |
Markup, icon sprite and design system |
tests/unit.test.js |
Unit coverage for helpers, Git parsing, fuzzy matching, LSP framing, command builders |
tests/electron.spec.js |
End-to-end smoke test including terminal and task flows |
tools/validate.js |
Static architectural and security validation |
tools/kit-cli.js |
Offline kit manifest, catalog-pin and reference-project quality gate |
tools/postinstall.js |
node-pty prebuild probe with non-fatal rebuild fallback |
tools/capture-demo.js |
Reproducible Playwright demo capture encoded with ffmpeg |
.github/workflows/ci.yml |
Windows/macOS/Linux test and build matrix |
main process (Node + Git) <-- IPC via contextBridge --> renderer (Monaco + UI)
• window + persistence • small namespaced api • state + views
• filesystem + search • no raw ipcRenderer • LSP/DAP/AI wiring
• terminals + watchers
• recovery + AI keys
- State (
state.json), hot-exit session (session.json), window bounds and recovery snapshots live under ElectronuserData—%APPDATA%\peabox-idefor installed builds, orPeaBox-IDE-Databeside a portable executable. - Every renderer-supplied path is resolved with
realpathand checked against the registered workspace roots; symlinks cannot escape a root. - Process working directories are confined to workspace roots and child processes are spawned without a shell.
- Files are saved atomically with
fsync; oversized and binary reads are refused. - AI keys use
safeStoragewhen available; AI features require explicit opt-in and file writes require confirmation.
- Terminal says node-pty could not be loaded — no prebuilt binary matches
this OS, architecture or Electron version. PeaBox reports the issue through
window.api.terminal.status()and shows platform-specific steps: Visual Studio Build Tools on Windows, Xcode Command Line Tools (xcode-select --install) on macOS, or build-essential and Python 3 on Linux. Runnpx electron-builder install-app-depsand restart. Everything except the terminal keeps working. - Editor is blank — rerun
npm installso Monaco and@xterm/*are present. - Git commands time out — ensure Git is on
PATHand credentials work non-interactively; PeaBox disables credential prompts. - Packaged build fails — complete
npm install, then removedistand retry.
Contributions are welcome — see CONTRIBUTING.md. Run
npm run validate && npm run test:unit && npm run test:e2e before opening a PR,
and keep the CSP and sandbox strict.
MIT — see LICENSE.