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. When you explicitly use an AI feature (chat, inline completion, file or scaffold generation, README generation), 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. 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. - 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. Start LSP servers for 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.
- 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.
- 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.
Download the portable build, extract it, and run PeaBox-IDE.exe. All settings,
sessions and recovery data stay beside it in PeaBox-IDE-Data.
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 |
| 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 |
| 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 and zip). macOS and Linux
packages are planned in Phase 3 of
ROADMAP.md. - Source mode: Windows, macOS or Linux with Node.js 20+ and npm 10+.
node-ptyships a prebuilt binary verified against the bundled Electron runtime;tools/postinstall.jschecks it and only attempts a source rebuild when needed. 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 workflowAUDIT.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 build :: validate + unit tests + Windows portable/zip in dist/
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 |
preload.js |
Context-isolated bridge exposing the namespaced window.api |
renderer.js |
Editor UI: Monaco, explorer, tabs, search, Git, run, debug, AI, palette, settings |
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/postinstall.js |
node-pty prebuild probe with non-fatal rebuild fallback |
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 — the prebuilt binary does not
match this Electron version. Install Desktop development with C++ via Visual
Studio Build Tools, run
npx electron-builder install-app-deps, and 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.