Binder is a Local-first knowledge base with bidirectional Markdown sync, editor integration (LSP), MCP server, and CLI.
Status: Early development — APIs and data formats may change. Breaking changes are allowed.
- TypeScript everywhere for type safety and better developer tooling
- Bun for development, testing, building, and package management
- Node.js 22+ as the production runtime (built CLI runs via
node) - SQLite as a database for both local and production (
bun:sqlitein dev,better-sqlite3in production) - Drizzle ORM for type-safe database operations and migrations
- Zod for runtime schema validation
- VS Code Language Server Protocol for editor integration and diagnostics
- Yargs for CLI argument parsing
Bun workspaces monorepo with three packages under packages/:
@binder.do/cli— Main entry point. Contains the CLI, LSP server, MCP server, Markdown document sync/diffing, schema loading, and validation logic.@binder/db— Core data layer. Knowledge graph engine, entity/relationship storage, transaction processing, changeset computation, filtering.@binder/utils— Shared utilities. Pure helpers for arrays, strings, encoding, error handling etc.
- Unit tests —
bun testruns unit tests under each package'ssrc/directory. - E2E tests —
bun test:e2eruns end-to-end smoke tests underpackages/cli/tests/. These spin up temporary workspaces, seed data, and exercise CLI, LSP, and MCP workflows against a real runtime.
Two binder instances exist in the project. Use the right one:
bun run dev-- dev instance (.binder-dev/data). Use for experimentation, testing, inspecting data.- The
bindertool / CLI -- production instance. For reading docs and updating task records.
Dev instance commands:
bun run dev init -q-- initialize empty dev instance (no interactive prompts)bun run dev init -q --blueprint project-- init with Task + Milestone types and sample databun run dev init -q --blueprint personal-- init with PARA schema (Area, Project, Task, Note, Resource) and sample databun run dev read <key> --format yaml-- inspect dev databun run dev search <query>-- search dev datasqlite3 .binder-dev/data/binder.db-- direct SQL queries on dev instance
Scratch scripts, intermediate outputs, and other throwaway files go in tmp/ at the project root. It is git-ignored.