---
title: "Command"
description: "A command palette with search, groups, shortcuts, and keyboard navigation, inline or in a dialog. Built on cmdk for ⌘K menus."
plan: Free
docs: https://ui.edbn.me/docs/components/command
---

# Command

A command palette with search, groups, shortcuts, and keyboard navigation, inline or in a dialog. Built on cmdk for ⌘K menus.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/command.json
```

## Dependencies
- npm: cmdk@^1.1.1, lucide-react@^1.33.0
- edbn: edbn-base, dialog, input-group

## Usage

```tsx examples/command-basic.tsx
"use client";
import { Search, User } from "lucide-react";
import {
  Command,
  CommandEmpty,
  CommandGroup,
  CommandInput,
  CommandItem,
  CommandItemDescription,
  CommandList,
} from "@/components/ui/command";

export default function CommandBasicPreview() {
  return (
    <Command className="max-w-wide">
      <CommandInput placeholder="Search actions…" />
      <CommandList>
        <CommandEmpty>No results.</CommandEmpty>
        <CommandGroup heading="Actions">
          <CommandItem>
            <Search /> Search
          </CommandItem>
          <CommandItem>
            <User /> Profile
            <CommandItemDescription>
              Name, avatar and email
            </CommandItemDescription>
          </CommandItem>
        </CommandGroup>
      </CommandList>
    </Command>
  );
}
```

## Files
- components/ui/command.tsx (248 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
