macpad
v0.1.1
Published
A simple multi-tab notepad built on top of the VS Code Monaco editor.
Maintainers
Readme
macpad
A simple multi-tab notepad for macOS (and Windows/Linux) built on top of the Visual Studio Code open-source editor — Monaco.
Features
- Multi-tab editing (open many files, switch with
Ctrl+Tab) - Syntax highlighting for ~70 languages via Monaco (JS/TS, Python, Go, Rust, Java, C/C++, C#, HTML, CSS, JSON, YAML, Markdown, SQL, Shell, PHP, Ruby, Swift, Kotlin, Dockerfile, …)
- Automatic language detection from file extension; manual override via status-bar language picker
- Standard shortcuts:
New,Open…,Save,Save As…,Close Tab - Dirty indicator per tab, save prompt on close
- Light / dark theme (auto follows system by default;
⌥⌘Ttoggles) - Line & column display, word wrap
Install
npm install -g macpad
macpadThis installs the editor as a global CLI; running macpad launches the desktop app.
Prerequisites
- Node.js 18+ (developed against 22)
Run in dev
npm install
npm run devVite serves the renderer, and vite-plugin-electron boots Electron pointing at it; hot-reload covers both processes.
Production build
npm run build
npm run startKeyboard shortcuts
| Action | macOS | Windows / Linux |
| ------------- | ------------- | ---------------- |
| New tab | ⌘N | Ctrl+N |
| Open file | ⌘O | Ctrl+O |
| Save | ⌘S | Ctrl+S |
| Save As | ⇧⌘S | Ctrl+Shift+S |
| Close tab | ⌘W | Ctrl+W |
| Next tab | ⌃Tab | Ctrl+Tab |
| Previous tab | ⌃⇧Tab | Ctrl+Shift+Tab |
| Toggle theme | ⌥⌘T | Ctrl+Alt+T |
Inside the editor, all standard Monaco shortcuts work (⌘F find, ⌥⇧F format if the language supports it, multi-cursor, etc.).
Architecture
- Main process (
src/main/) — Electron app lifecycle, native menu, file-system IPC handlers. - Preload (
src/main/preload.ts) —contextBridgeexposes a narrowwindow.macpadAPI to the renderer;contextIsolationis on andnodeIntegrationis off. - Renderer (
src/renderer/) — plain TS. Bootstraps Monaco, manages tab models, renders the tab bar and status bar. - Shared (
src/shared/types.ts) — IPC message types used by both sides.
