Command Interface

The Command interface — every field that a registered command can define.

interface Command {
  id: string;              // Stable unique id — used for deduplication in register()
  label: string;           // Primary display text
  description?: string;    // Secondary text shown below the label
  keywords?: string[];     // Extra search terms (not displayed)
  icon?: string;           // Text, ligature, or emoji rendered as-is
  category?: string;       // Group heading — default: 'Commands'
  disabled?: boolean;      // Excluded from search results when true
  shortcut?: string;       // Display-only label (e.g. '⌘K') — no auto-binding
  action: () => void | Promise<void>;
}