Your knowledge base. Your AI team. Now desktop-first.
Yantra is a local-first startup OS built on markdown files, a local daemon, and an Electron shell around the existing Next.js UI. Your vault stays on disk, your runtime stays local, and the app feels like a real Mac desktop app instead of a browser tab.
Requirements:
- Bun
1.2.22 - Node
22.x - macOS or Linux
bun install --frozen-lockfile
bun run verify:supply-chain
bun run devThat launches the Electron shell, which manages:
- the Next.js UI on
127.0.0.1:3000 - the Yantra daemon on
127.0.0.1:3001
Yantra now has three layers:
- Electron shell — desktop window, lifecycle, startup/shutdown orchestration
- Next.js app — UI, API routes, editor, sidebar, search, panels
- Yantra daemon — PTY sessions, jobs, websockets, SQLite bootstrap, agent runtime
Key paths:
electron/ Electron main/runtime/seed code
src/app/ Next.js UI + API routes
server/yantra-daemon.ts Local daemon backend
src/lib/config/ Runtime path + roots config
scripts/ Desktop staging and verification scripts
This repo now treats Bun as the package manager authority:
packageManageris pinned to[email protected]- direct dependencies are exact-pinned
bun.lockis canonicalbunfig.tomlenforces exact saves, frozen lockfile, and a minimum release agetrustedDependenciesis explicitly allowlistedbun run verify:supply-chainfails if unsafe package-runner or lifecycle patterns come back
Native recovery is manual, not automatic:
bun run doctor:nativebun run build # build web + daemon + electron + staged runtime
bun run dist # package desktop app with electron-builderThe staged desktop runtime is validated by:
bun run verify:desktop-runtimeYantra still supports a browser-first deployment if you want it:
bun run build:web
bun run build:daemon
bun run start:web
bun run start:daemonIn container/reverse-proxy mode, set YANTRA_DAEMON_HOST=0.0.0.0.
Use .env.example as the starting point. Desktop builds seed .env.local into the user config directory automatically on first launch.
Important variables:
KB_PASSWORDDOMAINYANTRA_DAEMON_HOSTYANTRA_DAEMON_PUBLIC_ORIGINABSURD_DATABASE_URLYANTRA_ABSURD_QUEUE
To debug the browser UI in a normal browser session:
bun run debug:chromeMIT