Works with cmdk or Base UI. Auto-discover routes, fuzzy search with synonyms, RBAC filtering, frecency ranking, CLI tooling. The Quick Start stack (provider, register hook, cmdk adapter and shortcut) is about 8.3 kB min + brotli on top of React and cmdk.
Try it: press ⌘K or Ctrl+K anywhere on this site.
cmdk gives you beautiful primitives. cmdk-engine adds the brain.
Auto-scan React Router and Next.js routes. The CLI writes a sitemap, and sitemapToCommands turns it into commands.
Built-in lightweight fuzzy search: exact > prefix > substring > word initials > fuzzy. Words match in any order, and accents are ignored.
Filter commands by user permissions. Supports any/all modes with a pluggable access provider.
Frequently and recently used commands float to the top. Exponential decay algorithm, zero config.
Bidirectional synonym engine. "money" finds "billing", and a synonym match never outranks a direct match.
Tree-shakeable, zero runtime dependencies. Core engine is 3.7 kB minified + brotli; the Quick Start stack (provider, register hook, cmdk adapter and shortcut) is 8.3 kB.
Keep cmdk's composable UI. Upgrade the brain behind it.
| Feature | cmdk | cmdk-engine |
|---|---|---|
| Composable UI | ||
| Route auto-discovery | ||
| RBAC / permissions | ||
| Frecency ranking | ||
| Keyword synonyms | ||
| Deterministic sorting | Open upstream issues (#264, #375) | |
| First item auto-select | Open upstream issue (#280) | |
| Dynamic content updates | Open upstream issue (#267) | |
| CLI tooling | ||
| UI-agnostic core |
Route Config ─→ Route Adapter ─→ Command Registry ─→ Keyword Engine
│
├─→ Access Control Filter
│
├─→ Search Engine (fuzzy / match-sorter)
│
└─→ Frecency Ranking
│
▼
Headless API / Hooks
│
▼
UI Adapter (cmdk / Base UI)| Import | Size | Purpose |
|---|---|---|
| cmdk-engine | 3.7 kB | Core engine (types, registry, search, keywords, access control, frecency) |
| cmdk-engine/react | 4.4 kB | React hooks (provider, useCommandPalette, useCommandRegister) |
| cmdk-engine/adapters/cmdk | 1.8 kB | Pre-wired cmdk components |
| cmdk-engine/adapters/react-router | 1.1 kB | React Router v6/v7/v8 route scanner |
| cmdk-engine/search/match-sorter | 0.55 kB | Optional match-sorter search backend |
| cmdk-engine/adapters/base-ui | 1.8 kB | Pre-wired Base UI components |
| cmdk-engine/adapters/sitemap | 0.23 kB | Turns the CLI route sitemap into commands |
Minified + brotli, each entry's own code; siblings and peers excluded. The Quick Start stack (provider, register hook, cmdk adapter and shortcut) is 8.3 kB in total. All entry points are tree-shakeable. The core has zero runtime dependencies.