AI for the masses

Copilot for CLI: Your Personal Shell Wizard


Have you ever found yourself struggling to remember a specific shell command or an obscure flag? Or perhaps you’ve wished you could just tell the shell what you want it to do in plain English? If so, you’re in luck. GitHub is currently developing a tool that aims to bring the power of GitHub Copilot right into your terminal: Copilot for CLI.

What is Copilot for CLI?

Copilot for CLI is a tool designed to translate natural language into terminal commands. It’s like having a shell wizard by your side, ready to assist you with comprehensive knowledge of flags and the entire AWK language. When you need something more complicated than a simple `cd myrepo`, you can turn to this guru and just ask – in regular, human language – what you want to get done.

Three Modes of Interaction

Copilot for CLI provides three shell commands: `??`, `git?`, and `gh?`.

– `??` is a general-purpose command for arbitrary shell commands. It can compose commands and loops, and even throw around obscure find flags to satisfy your query. For example, you could use `?? list js files` or `?? make get request with curl`.

– `git?` is used specifically for git invocations. Compared to `??`, it is more powerful at generating Git commands, and your queries can be more succinct when you don’t need to explain that you’re in the context of Git. For instance, you could use `git? list all commits` or `git? delete a local branch`.

– `gh?` combines the power of the GitHub CLI command and query interface with the convenience of having AI generate the complicated flags and jq expressions for you. You could use `gh? all closed PRs` or `gh? create a private repo`.

How to Get Copilot for CLI?

Currently, Copilot for CLI is in the usable prototype stage. GitHub is allowing users to try out this tool as a prototype. To get it, you can sign up for the waitlist, and GitHub will notify you when you’re admitted. Note that you will also need GitHub Copilot access to use it.


The terminal is a powerful tool, but it can take many years of regular use to become a shell wizard. With Copilot for CLI, you can have a shell wizard by your side, ready to assist you with any command or flag you might need. So why not sign up for the waitlist and give it a try?

[GitHub Next Project page]

You can check this video from IanWootten