Localhost Hub is a desktop “mission control” for running everything in your local dev universe. Scan directories for projects, launch scripts (individually or as saved workspaces), inspect logs, verify Git status, and scaffold new repos without leaving an Electron shell that feels like a native IDE.
- Highlights
- Getting Started
- Project Scanner & Data Model
- Script Runner & Workspaces
- Projects, Git, Ports & Packages
- Create Project Wizard
- Architecture
- Build, Package & Release
- Testing
- Troubleshooting
- Roadmap Ideas
- License
- Zero-config project discovery – recursively scans folders for
package.jsonfiles, tags frameworks, and surfaces scripts automatically. - Workspace orchestration – create named “workflows” spanning multiple repos; launch scripts sequentially or in parallel with staggered boot to avoid port clashes.
- Deep process insight – live logs with per-project history, toast alerts, Open-In-Browser buttons that parse stdout for URLs/ports, and terminal pop-outs.
- Git awareness – branch, dirty/ahead/behind status, last commit summary, and change lists right from the project header/tab.
- New project scaffolding – step-based creator with templates, dependencies, script planner, Tailwind presets (4.x Oxide or classic 3.4 stack), icon packs, README/git automation, and optional dependency installs.
- Cross-platform packaging – one
npm run build:*pipeline that produces signed/unsigned installers for Linux, macOS, and Windows with consistent iconography.
- Node.js 20+
- npm 10+ (pnpm/yarn/bun supported inside projects; the app itself uses npm)
- Git
npm install
npm run devnpm run dev boots Vite + Electron with live reload for the renderer, main, and preload bundles. The renderer opens automatically once compilation completes.
npm run dev- Toggle DevTools inside the Electron window (
Ctrl/Cmd+Shift+I) when needed. - Use the Setup dialog to add directories under active development.
Localhost Hub stores metadata in electron/database.ts (sqlite via sql.js). Each scan populates:
| Table | Purpose |
|---|---|
projects |
Basic id/name/path/type info |
project_scripts / scripts |
Normalized script definitions |
workspaces, workspace_items |
Multi-project runbooks |
env_profiles, env_vars |
Project-specific environment sets |
settings |
UI + behavior preferences |
Scanner highlights:
- Depth-limited recursion with ignore patterns.
- Tagging for frameworks (Vite, Next.js, etc.) based on
package.json. - Scripts persisted so workspaces keep referencing them even if rescans happen.
- Individual scripts run via
scripts:runIPC, spawning child processes with environment overrides and streaming logs back to the renderer. - Workspace sequencing:
- Parallel: slight stagger to avoid race conditions on port binding.
- Sequential: fire-and-forget order (does not wait for termination—ideal for dev servers).
- Logs, exit/error events, and history entries always carry the originating
projectId, allowing the UI to display cross-workspace output correctly. - Terminal modal: open any running process in a floating terminal with pause/scroll controls.
- Sidebar indicators – see branch/alive/running status at a glance.
- Project tabs – Scripts, Logs, Env Profiles, Ports, Packages, Git.
- Port intelligence – heuristics gather expected/detected ports plus
localhost:URLs scraped from stdout. - Packages panel – paginate dependencies, scan
node_modules, and trigger install operations with package manager detection.
Launch via “Create New Project” in the sidebar or empty state.
- Basics – name, directory, optional description.
- Stack – starter templates, curated dependency presets, script planner, package manager, styling + icon packs.
- Extras – choose language (JS/TS), sample code (CLI vs HTTP server), README + git init, notes.
- Review – confirm before scaffolding.
Backend scaffolding handles:
- Directories &
package.jsoncreation - Dependency/devDependency normalization
- Tailwind v3 vs v4 (Oxide) pipeline files
- Sample source files (
src/index.(ts|js)) - README sections describing scripts/styling/icon packs
- Optional
.gitignore+git init - Optional install command using the selected package manager
- Automatic project rescan so the new repo appears immediately
.
├── electron/
│ ├── main.ts # Main process, IPC handlers, process runner
│ ├── preload.ts # Secure bridge exposing limited API surface
│ ├── database.ts # sql.js schema + CRUD helpers
│ └── utils/ # project scanning, lookup helpers, etc.
├── src/
│ ├── App.tsx # React root, state orchestration
│ ├── components/ # Sidebar, panels, modals, toasts, etc.
│ ├── hooks/ # Data hooks (projects, workspaces, settings…)
│ └── types/ # Global TypeScript definitions
├── scripts/ # Build helpers (icon generation, cache clearing)
├── public/ # Icons, wordmarks
├── buildResources/ # Packaged app icons, entitlements
└── release/ # Generated installers (gitignored)
Key tech:
- Renderer: React 19 + Vite + Tailwind
- Animations: Framer Motion
- DB: sql.js (SQLite compiled to WASM)
- IPC: Electron contextBridge (no node integration in renderer)
- Testing: Vitest + Testing Library + jsdom
npm run buildOutputs:
dist/renderer(Vite build)dist-electron/{main,preload}.js
| Command | Output |
|---|---|
npm run build:linux |
.AppImage + .deb in release/ |
npm run build:mac |
.dmg (requires macOS + signing cert for distribution) |
npm run build:win |
NSIS installer (signed when WIN_SIGN=true) |
npm run build:win:unsigned |
Unsigned .zip (no Wine required on Linux) |
npm run build:all |
mac + linux + signed Windows |
npm run build:all:unsigned |
mac + linux + unsigned Windows |
Behind the scenes:
npm run prebuild:electronregenerates icons and clearsdist*folders.electron-builderreadsbuild.config.cjs(notpackage.json’s legacybuildblock) for multi-platform targets.- Icons generated via
scripts/generate-icons.cjs(includes Linux multi-size directory).
Run once:
npm run testWatch mode:
npm run test:watch- React component behavior (ProjectHeader, etc.)
- Utility logic (path normalization, project lookups)
- jsdom-based tests for UI conditionals
- Workspace runner integration tests (mocked child processes)
- IPC contract tests between renderer and main
- Snapshot or visual regression for key panels
npm run clear:cache- Enable Developer Mode (
Settings → Update & Security → For Developers) - Or run the build terminal as Administrator
- Install Wine/Mono packages per electron.build guide.
- Alternatively run Windows builds on a Windows machine/VM.
- Vite warns when a chunk exceeds 500 kB minified. Consider future code-splitting of rarely used panels if it becomes a perf problem; not currently blocking.
- Try
LOCALHOST_HUB_OZONE_PLATFORM=wayland(orx11) to see which compositor performs better. - If GPU drivers are flaky, test with
LOCALHOST_HUB_DISABLE_GPU=1. - In-app, enable Minimize animations for lighter UI transitions.
- Re-run
npm run generate:iconsif you change assets underpublic/logo-icons. - Ensure
buildResources/contains the generated.icns,.ico,.png, andlinux-icons/**.
- Editable environment profiles per workspace item
- SSH tunneling + remote project discovery
- Git actions (commit/pull/push) with OAuth device flow
- Pluggable script types (Docker compose, Make targets, etc.)
- Telemetry opt-in for better error diagnostics
MIT © Christoffer Madsen
See LICENSE for details.