Ctrl+Shift+P to open it and start typing to search.
Overview
The Command Palette is a fuzzy-search interface that lets you execute commands without navigating through menus:- Keyboard-driven: No mouse required
- Fuzzy matching: Type partial names to find commands
- Context-aware: Shows commands relevant to the current view
- Extensible: Plugins can add custom commands
Opening the Command Palette
Keyboard Shortcut
PressCtrl+Shift+P (or Cmd+Shift+P on macOS) from anywhere in angr Management.
The implementation uses a Qt event filter (angrmanagement/ui/main_window.py):
Via Menu
Navigate to View → Command PaletteUsing the Command Palette
Architecture
The Command Palette is built on a reusable palette framework with three main components:Palette Framework
The base implementation (angrmanagement/ui/dialogs/palette.py:20) provides:
Command Palette Implementation
The Command Palette specializes the framework (angrmanagement/ui/dialogs/command_palette.py:16):
Dialog Interface
The dialog provides the UI (angrmanagement/ui/dialogs/command_palette.py:31):
Fuzzy Matching
The palette uses fuzzy string matching to find commands (angrmanagement/ui/dialogs/palette.py:62):
- Type partial words:
"goto"matches “Goto Function” - Skip characters:
"gtfn"matches “Goto Function” - Handle typos:
"gotto"still matches “Goto Function”
Visual Rendering
Matching characters are highlighted in bold (angrmanagement/ui/dialogs/palette.py:82):
Command System
Commands are managed by the Command Manager (angrmanagement/logic/commands/command_manager.py:11):
Command Types
Commands are defined with theCommand interface (angrmanagement/logic/commands/command.py:12):
Basic Commands
Simple commands invoke a callable (angrmanagement/logic/commands/command.py:47):
View Commands
Context-aware commands that operate on specific views (angrmanagement/logic/commands/command.py:61):
Registering Commands
To add commands to the palette:Goto Palette
angr Management also includes a “Goto” palette for navigation (angrmanagement/ui/dialogs/goto_palette.py:22):
- Lists all functions in the binary
- Shows function addresses as annotations
- Color-codes functions by type (PLT, syscall, simprocedure, etc.)
- Allows quick navigation to any function
Keyboard Navigation
The palette supports full keyboard navigation (angrmanagement/ui/dialogs/palette.py:242):
Extending with Plugins
Plugins can add commands to the palette:Performance
The palette is optimized for large command lists:- Lazy loading: Items loaded only when palette opens
- Limited results: Fuzzy search returns top 50 matches
- Efficient rendering: Custom delegate for fast painting
- Incremental filtering: Updates as you type
Customization
Custom Palettes
Create custom palettes by subclassing the framework:Custom Rendering
Customize how items are displayed:Best Practices
Command Naming
Command Naming
- Use descriptive, action-oriented names
- Include context in the caption: “Function: Rename” not just “Rename”
- Group related commands with prefixes: “View: Show CFG”, “View: Show Hex”
- Make commands easy to find with multiple keywords
Visibility
Visibility
- Hide commands that aren’t applicable in the current context
- Use
is_visibleto show view-specific commands only in relevant views - Keep the command list focused and relevant
Performance
Performance
- Keep command execution fast for responsive UI
- Avoid heavy operations in command constructors
- Use background jobs for long-running tasks
See Also
- Plugin System - Add custom commands via plugins
- Keyboard Shortcuts - Learn all keyboard shortcuts
- Views - Understanding view-specific commands