You'll love the GitHub Command Palette if you're looking for a way to navigate, search, and run commands on GitHub with just your keyboard. This feature is currently in public beta, and it lets you access any page or resource on GitHub with a few keystrokes. You can also execute commands to optimize your workflows, such as switching themes, creating issues, or opening pull requests. In this post, I'll show you how to activate the GitHub Command Palette and share some tips on how to get the most out of it.
How to activate the GitHub Command Palette
The GitHub Command Palette is available as a feature preview, which means you can opt-in to try it out before it becomes generally available. To activate the GitHub Command Palette, follow these steps:
Go to https://github.com/
Click on your top-right profile icon
Select "Feature preview."
Under "GitHub Command Palette," click "Enable."
You'll see a confirmation message that says, "GitHub Command Palette enabled."
You can now use the GitHub Command Palette on any page on GitHub
How to open the GitHub Command Palette
To open the GitHub Command Palette, use one of the following default keyboard shortcuts:
Windows and Linux: Ctrl + K or Ctrl + Alt + K
Mac: Command + K or Command + Option + K
You can also customize the keyboard shortcuts in the Accessibility section of your user settings. For more information, see "Customizing your GitHub Command Palette keyboard shortcuts."
When you open the GitHub Command Palette, it shows your location at the top left and uses it as the scope for suggestions. For example, if you're on a repository page, it will show suggestions related to that repository.
How to navigate with the GitHub Command Palette
You can use the GitHub Command Palette to navigate to any page you can access on GitHub. For example, you can quickly jump to your organizations, repositories, issues, pull requests, projects, files, and more.
When you open the GitHub Command Palette, the suggestions are optimized to give you easy access to top-level pages like the Issues page or Pull requests page. If the location you want isn't listed, start entering the name or number for the location to refine the suggestions.
You can also use modes to find specific types of resources and execute commands. To enter a mode, type one of the following symbols:
- > Enter command mode - # Search for issues, pull requests, discussions, and projects - ! Search for projects - @ Search for users, organizations, and repositories - / Search for files within a repository scope
For example, if you want to find an issue by its number, type # followed by the issue number and press Enter.
Example of Supercharging Your Development Workflow
If you want to check the status of a pull request you reviewed earlier but don't remember the number or the title. You can use the GitHub Command Palette to find it quickly.
Ctrl + K (Windows/Linux) or
Command + K (Mac) to open the GitHub Command Palette. Type
# and see a list of issues, pull requests, discussions, and projects you have recently interacted with. You can type a few keywords that you remember from the pull request and see the matching results. Select the one that you are looking for and press Enter. You will be taken to the pull request page to see the latest comments and changes.
Boom, navigating GitHub efficiently just happened.
Give GitHub Command Palette a try and see if it helps improve your developer workflow if you find yourself navigating GitHub repos on a regular basis.