Opening the command palette
You can open the command palette in multiple ways:The automatic typing detection on the homepage only works with letters (a-z, A-Z) and only when you’re not already typing in an input field.
Searching for utilities
The command palette uses fuzzy search to find utilities across multiple fields:- Utility name - “JSON Toolbox”, “Base64 Converter”, etc.
- Description - “Format, validate, diff, schema, convert & query”
- Utility ID - “json”, “base64”, “uuid”, etc.
Search examples
Navigation
Once the command palette is open, navigate through results using your keyboard:Move selection up or down through the filtered results.
Navigate to the selected utility.
Close the command palette without navigating.
Hovering over an item automatically selects it and prefetches the utility for faster loading.
Performance optimizations
The command palette includes several performance optimizations:Lazy loading with prefetch
When you hover over a utility in the command palette, TryDevUtils automatically prefetches that utility’s code in the background. This ensures instant loading when you select it.Smart state management
The command palette resets its state when opened to ensure a clean search experience:- Search query is cleared
- Selection index resets to 0
- Input automatically receives focus
Scroll into view
The selected item automatically scrolls into view as you navigate with arrow keys, ensuring you always see the current selection.Utility information display
Each utility in the command palette shows:A color-coded icon representing the utility’s category and function.
The full name of the utility (e.g., “JSON Toolbox”, “Base64 Converter”).
A brief description of what the utility does.
The short ID shown in a badge (visible on larger screens), useful for direct URL navigation.
Keyboard shortcuts reference
At the bottom of the command palette, you’ll find a quick reference of available keyboard shortcuts:↑↓- Navigate through results↵(Enter) - Select the highlighted utilityesc- Close the palette
Platform-specific behavior
Web version
The command palette displays the⌘K shortcut hint in the header’s search button.
Desktop version
The desktop app shows the appropriate modifier key (⌘K on macOS, Ctrl+K on Windows/Linux) and includes an additional ⌘F / Ctrl+F shortcut to focus the sidebar filter.
Extension version
In the Chrome extension, the command palette includes the⌘K hint in the integrated search bar at the top of the utilities view.
Implementation details
The command palette is built with the following components:- Dialog component - Accessible modal dialog from shadcn/ui
- Custom event handling - Keyboard navigation with arrow keys and Enter
- Real-time filtering - Updates results as you type
- Auto-focus input - Ensures immediate typing when opened
The command palette is implemented in
/src/components/CommandPalette.tsx and uses React hooks (useCommandPalette) for global state management.Tips and tricks
Source code reference
The command palette implementation can be found in:- Main component:
/src/components/CommandPalette.tsx:20-176 - Hook for global state:
/src/components/CommandPalette.tsx:179-235 - Keyboard shortcuts:
/src/components/KeyboardShortcuts.tsx