better-cmdk is a React command palette with built-in AI chat.
Use it in three modes:
- Command palette only (
actions, no chat). - Command palette + hosted chat (default, no setup).
- Command palette + external agent (
chat, recommended with modifywithai).
https://better-cmdk.com/api/chat by default as a developer trial service (free, no signup, rate-limited to 10 requests per 10 minutes). For production, set your own chatEndpoint or use modifywithai for agentic capabilities.
Core model: one actions array
Define oneCommandAction[] list and reuse it everywhere.
better-cmdkuses UI fields (label,group,icon,shortcut,keywords) for search and rendering.modifywithaiuses agent fields (description,inputSchema,approvalRequired,execute) for action execution.- If a library does not use a field, it ignores it.
Action types
| Type | Definition | Behavior |
|---|---|---|
| Command-like | No inputSchema | Runs directly from search/select |
| Argument-requiring | Has inputSchema | Routed through AI so arguments can be provided |
Integration options
| Option | Use when | CommandMenu props |
|---|---|---|
| No chat | You want search + shortcuts only | actions |
| Hosted chat (default) | You want to quickly try AI chat during development | actions |
| External agent | You want agentic action execution and approvals | actions, chat |
What you get
Two modes in one UI
Users search actions in command mode and switch to chat mode only when needed.
Agent-compatible actions
The same action definitions work in better-cmdk and modifywithai.
Approval workflow UI
Built-in confirmation components handle allow/deny flows for sensitive actions.
Composable primitives
Use the declarative
actions API or drop down to cmdk-style children rendering.Next steps
Quickstart
Install better-cmdk and ship a working palette in minutes.
Extending
Learn action design rules, approvals, context hooks, and theming.