Github Copilot is an awesome tool, that I use in JetBrains Rider and VS Code and recently I found out, that Copilot can be used in CLI aswell. Let me show you how to set it up.



  1. Install github cli

This depends on what packaging software you use. For full list of choices follow this link I’m gonna use chocolatey.

  1. Authenticate

Run following, to authenticate with your GitHub account.

  1. Install Copilot

  1. You are done

Now you can run


Running previous suggest command is in my opinion not very convenient, because it’s long and you need to first choose what kind of command you are asking about.


To get around that, we can use -t argument and we can specify shell so the full command will look as follows

This gives you the anwser right away, but it’s still too long, so let’s fix that.

Open your powershell profile – type $PROFILE, hit ENTER and you will get the profile path, then open it in your prefered editor.

Alteratively, if you use VS Code, just type: code $PROFILE, this opens your powershell profile in VS Code right away.

Once you opened the powershell profile, paste in following code:

Save the profile, restart your terminal and voila, you can use ?? or ps? commands. For example ps? list all ps1 files gives you the anwser

Enjoy 👍


Last modified: December 6, 2023
Notify of
Inline Feedbacks
View all comments