Agent-readable wiki
Cabinet Developer Reference Wiki
Cabinet is an AI-first "startup OS" that stores an entire knowledge base as markdown files on disk, orchestrates BYOAI agents (Claude, Codex, Gemini, Grok, and more) with persistent memory and cron-scheduled jobs, and exposes a Next.js + WebSocket daemon architecture with zero database dependency.
Pages
- Technical OrientationWhat Cabinet is, its two-process runtime (Next.js on port 4000 + daemon on port 4100), the file-on-disk data model, the npx CLI entry points (cabinetai / create-cabinet), the full tech stack (Next.js 16, TypeScript, Tiptap, Zustand, xterm.js, node-cron, better-sqlite3, ws), and how the rest of this reference is organized.
- Cabinet Daemon — WebSocket Bus, PTY Sessions & Job SchedulerThe unified background server (server/cabinet-daemon.ts) that combines the WebSocket event bus, node-cron job scheduler, PTY/xterm terminal sessions with Claude lifecycle management, full-text search indexing, SQLite initialization, and file-watcher-driven real-time updates. Covers the daemon HTTP + WS server boot sequence, message protocol, and how each subsystem registers with the single server instance.
- Provider Adapter Layer — BYOAI Adapters & RegistriesThe pluggable adapter registry (src/lib/agents/adapters/) that maps provider IDs to concrete CLI-backed adapters: claude-local, codex-local, cursor-local, gemini-local, opencode-local, pi-local, grok-local, and copilot-local. Documents the AgentAdapter interface, per-adapter stream parsers, the plugin-loader for third-party adapters, provider-registry resolution, and how per-run provider/model overrides are applied at launch time.
- Agent Runtime — Conversations, Skills & Scheduled JobsEnd-to-end lifecycle of an agent run: persona templating (persona-manager.ts), conversation creation and transcript storage (conversation-store.ts, conversation-runner.ts), skill loading and scoping (skills/loader.ts, skills/scope.ts), heartbeat polling (heartbeat.ts), action parsing and dispatching (action-parser.ts, action-dispatcher.ts), and the cron-based job scheduler (jobs/job-manager.ts, job-normalization.ts). Includes the agent library of 20 pre-built templates.
- File-Based Storage & Git-Backed HistoryHow Cabinet stores all knowledge as markdown files on disk with no traditional database: path conventions (path-utils.ts), page I/O with gray-matter front-matter (page-io.ts), the virtual file tree builder (tree-builder.ts), low-level filesystem operations (fs-operations.ts), and the simple-git integration that auto-commits every save and powers the full diff viewer (git-service.ts). Covers cabinet discovery, multi-cabinet support, and the data-dir layout.
- Next.js API Routes, Zustand Stores & UI ArchitectureThe complete surface of Next.js API routes under src/app/api/ (agents, jobs, kb, git, search, terminal, onboarding, registry, and more), the Zustand client state stores (app-store, tree-store, ai-panel-store, editor-store, search-store), and the major React component groups (editor with Tiptap, sidebar, agents panel, composer, skills browser, settings). Closes the reference with extension points: adding a new provider adapter, registering a skill source, and what to inspect next.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.