GithubX

Command

Command palette for the mouse and keyboard.

## installation

pnpm dlx shadcn@latest add https://ascii.cnlibs.com/r/command.json

## usage

import { Button } from "@/components/ui/button";
import { Command } from "@/components/ui/command";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
<Dialog>
  <DialogTrigger render={<Button variant="outline">[ ⌘K ]</Button>} />
  <DialogContent chWidth={50}>
    <Command
      groups={[
        { group: "File", items: [{ value: "new-file", label: "New file", hint: "ctrl+n" }] },
        { group: "Account", items: [{ value: "sign-out", label: "Sign out" }] },
      ]}
      placeholder="Type a command or search..."
    />
  </DialogContent>
</Dialog>

## inline with a custom filter

Outside a dialog, with a matcher that also searches hints and a custom empty message.

Deploy
Deploy to productionprod
Deploy to stagingstg
Roll back last deployundo
Logs
Tail build logslogs
Show recent errorserr