The Featherweight Desktop & Browser IDE.
< 0.2sstartup •~35 MBRAM footprint • Zero build step • Pure Vanilla HTML/CSS/JS • Monaco Editor • Seti Icons •xterm.js
LiteCode is an ultra-lightweight, zero-bloat code editor and full development workbench designed to replicate the exact look, density, keyboard muscle memory, and core workflow of Visual Studio Code—without the 1.5–2 GB Electron memory overhead.
It runs seamlessly in two modes from the exact same zero-build codebase:
- Desktop Mode (Primary — Native OS Speed): Launch
LiteCode.bat(Windows),./litecode.sh(macOS/Linux), orpython server.py --desktopto open LiteCode in a native frameless desktop window backed directly by your local OS filesystem, native Git CLI, Git Credential Manager, and native OS shell (PowerShell,bash, orzsh). - Browser Mode (Zero-Install Web IDE): Host statically on Cloudflare Pages / GitHub Pages (or open in any Chromium browser) to edit local folders via the File System Access API (
showDirectoryPicker), persist virtual workspaces in IndexedDB, and run Node.js / Linux commands inside an in-browser WebContainer.
| Metric | Electron IDE (VS Code) | LiteCode (Desktop Mode) |
|---|---|---|
| Cold Startup Time | 2.5s – 5.0s |
< 0.2s (Instant) |
| Idle RAM Usage | ~650 MB – 1.8 GB |
~35 MB (Shared OS WebView + Python stdlib) |
| Disk Footprint | ~450 MB |
< 450 KB total repository size |
| Build / Bundler Step | Complex Webpack / Vite / Electron build | Zero-build (index.html, style.css, script.js, server.py) |
- Per-Tab
ITextModel&ICodeEditorViewState: Every open tab preserves its own independent undo/redo stack (Ctrl+Z/Ctrl+Y), cursor position, selection, and scroll position. - Emmet Abbreviation Expansion: Built-in Emmet support (
emmet-monaco-es) + quick snippets (!,html:5,link:css,script:src,.container,ul>li*3) across HTML, CSS, SCSS, Less, JSX, and TSX. - Clickable Local File Links (
Ctrl+Click):import,require(),<script src="...">,<link href="...">, and CSSurl(...)paths in the editor are automatically linked—holdCtrl/Cmdand click to open the target file directly in a new tab. - Synced Monaco Context Menus Everywhere: Right-clicking inside the Monaco editor, file tree, tabs, activity bar, or terminal opens a unified, pixel-accurate VS Code Dark+ context menu wired to real Monaco and workbench commands (
Go to Definition,Go to Symbol,Rename Symbol,Change All Occurrences,Format Document,Cut/Copy/Paste).
- Pre-Init Onboarding View: Open any folder and immediately choose to:
- Initialize Repository (
git init -b main) locally. - Publish / Connect to a GitHub Repository (pick from your GitHub account or create a brand-new public/private repo in one click).
- Clone / Open a GitHub Repository directly into your workspace.
- Initialize Repository (
- PAT-Free GitHub Sign-In (
Sign in with GitHub):- 1-Click Native Sign-In (Git Credential Manager /
ghCLI): Automatically detects existing credentials from Windows/macOS/Linux Git Credential Manager (git credential fill) or triggers the native OS browser sign-in window—no Personal Access Token needed. - GitHub OAuth Device Flow (
github.com/login/device): Generates an 8-character one-time code, copies it to your clipboard, opens GitHub in your browser, and automatically polls until authorized. - PAT Fallback: Optional collapsible section for headless or restricted environments.
- 1-Click Native Sign-In (Git Credential Manager /
- Complete Daily Git Workflow:
- Separate Staged Changes and Changes trees with individual Open File, Stage (
+), Unstage (-), Discard Changes (↶), and side-by-side/inline Diff Inspector. - Split
✓ Commit | vbutton supporting Commit, Commit (Amend), Commit & Push, and Commit & Sync. - Interactive Branch Picker in the Status Bar (
Create New Branch..., checkout existing branches) and realFetch/Pull/Push/Syncactions. - Collapsible
GRAPHcommit history at the bottom of Source Control—click any commit to inspect its fullgit show --stat --patchdiff inside Monaco.
- Separate Staged Changes and Changes trees with individual Open File, Stage (
- Explorer (
Ctrl+Shift+E): Workspace file tree with official 19px Seti UI file icons, inline file/folder creation and rename (F2), drag-and-drop / clipboard file operations, and bottom-docked Open Editors, Outline (live symbol extractor), and Timeline sections. - Search & Replace (
Ctrl+Shift+F): Multi-file workspace search and replace with collapsible Replace input, inlineAa(Match Case),ab(Match Whole Word),.*(Use Regular Expression), andAB(Preserve Case) toggles, plus highlighted match previews and single-match or file-wide replacement. - Run and Debug (
Ctrl+Shift+D): One-click Run and Debug button that executes the active.py,.js,.ts,.sh, or.batscript in the integrated terminal (or launches Live Preview for.htmlfiles), plus automatic.vscode/launch.jsongeneration. - Extensions (
Ctrl+Shift+X): Browse, filter (@installed,@popular,@recommended), install, disable, or uninstall extensions with splitInstall | vmenus.
- **Live-Streaming VS Code Terminal (
Ctrl+\``):** Powered byxterm.js+FitAddonwith authentic Dark+ ANSI colors. Streams output line-by-line in real time via NDJSON (/api/exec_stream), supports **Ctrl+C** process tree cancellation (/api/exec_kill), auto-detects localhost dev server ports (http://localhost:3000`,:5173,:8000) for 1-click Live Preview, and runs inside an in-browser WebContainer when hosted on the web. -
Hybrid Eager + Lazy Monorepo Loader: Small/medium projects (
$\le 150$ files) load into memory in a single shot for0mstab switches and instant regex search; large monorepos lazy-load files on demand viaGET /api/readin< 5ms. -
Live HTML Preview (
Ctrl+Shift+V): Preview HTML/CSS/JS projects side-by-side inside an editor tab. -
BYOK AI Engineer (
Ctrl+Alt+B): Optional right-hand AI coding assistant (agent.js) powered by Gemini SSE streaming with workspace search, surgical file editing, inline diff review (Accept/Reject), and terminal command execution.
Prerequisites: Python 3.8+ (uses only the Python standard library—zero pip install dependencies required).
- Windows (One-Click):
Double-click
LiteCode.bat(launches the native window directly withpythonw—no stray CMD window) or drag-and-drop any project folder ontoLiteCode.bat. - Install
litecode .CLI & "Open with LiteCode" Right-Click Menu (Optional 1-Time Setup):python server.py --install
- Adds
litecodeto your UserPATHso you can typelitecode .inside any folder in your terminal (just likecode .). - Registers "Open with LiteCode" in the Windows Explorer right-click context menu for folders (uses
HKCU—no Admin required).
- Adds
- macOS / Linux:
chmod +x litecode.sh ./litecode.sh . - Open Any Folder Directly:
(Automatically selects a free localhost port starting at
python server.py --desktop /path/to/your/project
8765, so it never collides with your8000/3000/5173dev servers).
Run the backend server and open http://127.0.0.1:8080 in any browser:
python server.py --port 8080Because LiteCode has zero build steps, it deploys directly to GitHub Pages (https://ab-613.github.io/LiteCode/) via the included .github/workflows/pages.yml workflow and coi-serviceworker.js (which automatically enables Cross-Origin Isolation on GitHub Pages so in-browser WebContainers boot with zero server config).
Or deploy to Cloudflare Pages under any project name:
npx wrangler pages deploy . --project-name litecode-ideOpen the examples/ folder in the LiteCode Explorer to test the workbench immediately:
| Example File | What It Demonstrates | How to Run |
|---|---|---|
examples/web-app/index.html |
Interactive counter & CPS meter with linked styles.css and app.js. |
Open examples/web-app/index.html and press Ctrl+Shift+V (or click the Open Live Preview icon in the top-right tab bar). Try Ctrl+Click on styles.css or app.js! |
examples/python-quickstart.py |
Zero-dependency Python benchmark & ANSI terminal output. | Open the file, switch to Run and Debug (Ctrl+Shift+D), and click Run and Debug (or run python examples/python-quickstart.py in the Terminal). |
examples/node-quickstart.js |
Node.js script compatible with both Desktop Mode and Browser WebContainers. | Open the file and click Run and Debug, or run node examples/node-quickstart.js in the Terminal. |
| Shortcut | Action |
|---|---|
Ctrl+P / Cmd+P |
Quick Open: Fuzzy search and jump to any file in the workspace |
Ctrl+Shift+P / F1 |
Command Palette: Run any editor or workbench command |
Ctrl+S |
Save Active File to disk / File System API / IndexedDB |
Ctrl+B |
Toggle Primary Sidebar |
| `Ctrl+`` | Toggle Integrated Terminal Panel |
Ctrl+Alt+B |
Toggle AI Engineer Panel |
Ctrl+Shift+E |
Focus Explorer View |
Ctrl+Shift+F |
Focus Search & Replace View |
Ctrl+Shift+G |
Focus Source Control (Git) View |
Ctrl+Shift+D |
Focus Run and Debug View |
Ctrl+Shift+X |
Focus Extensions View |
Ctrl+Shift+V |
Open Live HTML Preview Tab |
Ctrl+W |
Close Active Editor Tab |
Ctrl+Shift+T |
Reopen Closed Editor Tab |
F2 |
Rename Selected File/Folder (Explorer) or Rename Symbol (Editor) |
Delete |
Delete Selected File/Folder (when Explorer is focused) |
LiteCode/
├── index.html # App shell: loads Codicons, Monaco AMD loader, xterm.js, Emmet, KaTeX
├── style.css # VS Code Dark+ theme, 19px Seti icon mappings, compact workbench layout
├── script.js # Core IDE engine: FSManager, EditorManager, TerminalManager, Git SCM, Views
├── agent.js # BYOK Gemini SSE streaming agent with tool-calling & inline diffs
├── server.py # Zero-dependency Python stdlib desktop backend (FS, Shell, Git, OAuth)
├── seti.woff # Official Seti UI file icon font
├── LiteCode.bat # Windows 1-click desktop launcher
├── litecode.sh # macOS / Linux 1-click desktop launcher
├── package.json # Convenience npm scripts (start, desktop, serve, deploy)
├── _headers # COOP/COEP headers for Cloudflare Pages WebContainer support
└── examples/ # Ready-to-run HTML/CSS/JS, Python, and Node.js examples
├── web-app/
│ ├── index.html
│ ├── styles.css
│ └── app.js
├── python-quickstart.py
└── node-quickstart.js
When running in Desktop Mode, server.py exposes a clean JSON REST API on 127.0.0.1 (see docs/ARCHITECTURE.md for the full technical deep-dive):
GET /api/ping— Returns runtime mode, OS platform, workspace root, and live Git status.GET /api/workspace— Scans workspace tree using a hybrid eager/lazy budget and returns file metadata + Git status.GET /api/read?path=...— On-demand lazy loader for large files or monorepos (> 150files).POST /api/write,/api/mkdir,/api/delete,/api/rename— Atomic filesystem operations.POST /api/set_workspace— Opens the native OS folder picker dialog and switches the active workspace root.POST /api/exec_stream&/api/exec_kill— Real-time NDJSON line-by-line terminal process streaming +Ctrl+Cprocess-tree termination.POST /api/git— Executes real Git & GitHub operations (status,init,stage,unstage,discard,commit,fetch,pull,push,sync,checkout,set_remote,clone,show_commit,file_diff,github_native_auth,github_device_start,github_device_poll).
- Technical Architecture Deep-Dive (
docs/ARCHITECTURE.md) — How the dual-mode runtime, hybrid eager/lazy loader, multi-model Monaco state, streaming shell, and PAT-free GitHub OAuth work under the hood. - Show HN Launch Guide (
docs/SHOW_HN.md) — Ready-to-use Show HN title, URL, and technical first-comment overview.
Licensed under the GNU General Public License v3.0 (GPL-3.0).
Disclaimer: LiteCode is an independent, community-built open-source code editor and is not affiliated with, endorsed by, or sponsored by Microsoft Corporation (Visual Studio Code) or Google LLC.
