1
[Link],003 --> [Link],004
- [Instructor] Well, first of all, what is GitHub Copilot
2
[Link],004 --> [Link],008
in the CLI?
3
[Link],008 --> [Link],000
We’ve seen by investigating policy,
4
[Link],000 --> [Link],001
it’s one of the places
5
[Link],001 --> [Link],002
where we can interact with the service.
6
[Link],002 --> [Link],002
In this case, it’s in your terminal. Isn’t that great?
7
[Link],002 --> [Link],000
And that’s your terminal no matter which one you use,
8
[Link],000 --> [Link],006
whether it’s a Mac terminal or Linux terminal
9
[Link],006 --> [Link],005
or Windows terminal.
10
[Link],005 --> [Link],000
As of this recording in spring 2025,
11
[Link],000 --> [Link],001
the only supported language is English, unfortunately.
12
[Link],001 --> [Link],006
The primary commands that this tool helps with
13
[Link],006 --> [Link],001
are GitHub CLI commands, the GHCLI
14
[Link],001 --> [Link],008
that I hope you’re familiar with.
15
[Link],008 --> [Link],004
You have to be familiar with the GitHub CLI
16
[Link],004 --> [Link],007
in order to be successful
17
[Link],007 --> [Link],005
on not only the GitHub Copilot exam,
18
[Link],005 --> [Link],001
but also the other four GitHub exams as well.
19
[Link],001 --> [Link],002
The Git CLI, everybody’s favorite,
20
[Link],002 --> [Link],004
and then Standard Shell like Bash or zShell.
21
[Link],004 --> [Link],008
And I found that it’s okay with PowerShell,
22
[Link],008 --> [Link],002
you can test different shells
23
[Link],002 --> [Link],001
in scripting languages to see.
24
[Link],001 --> [Link],006
There’s an option to choose a general CLI command.
25
[Link],006 --> [Link],003
The 80% use cases here are to find the right command
26
[Link],003 --> [Link],006
to perform a task in the moment.
27
[Link],006 --> [Link],004
We’re not talking about you building
28
[Link],004 --> [Link],001
an administrative script that’ll persist in a repo,
29
[Link],001 --> [Link],000
we’re talking about when you’re live at a terminal.
30
[Link],000 --> [Link],005
And also, just the opposite.
31
[Link],005 --> [Link],004
You get an unfamiliar command from Stack Overflow.
32
[Link],004 --> [Link],006
You take an extra moment,
33
[Link],006 --> [Link],009
"Hey, can you explain what this means?"
34
[Link],009 --> [Link],000
That’s particularly good for a gnarly regular expression.
35
[Link],000 --> [Link],008
How do we get started with this Copilot in the CLI?
36
[Link],008 --> [Link],004
Well, you need your license, right?
37
[Link],004 --> [Link],002
In terms of your dev box, you have
38
[Link],002 --> [Link],006
to have the GitHub CLI installed.
39
[Link],006 --> [Link],001
You have to sign in, get your token.
40
[Link],001 --> [Link],000
And from there, you can run gh extension install
41
[Link],000 --> [Link],003
to pass in the repo owner for GitHub Copilot,
42
[Link],003 --> [Link],004
which is gitHub/gh-copilot.
43
[Link],004 --> [Link],009
And then you can verify with gh copilot --help.
44
[Link],009 --> [Link],001
Standard stuff, right?
45
[Link],001 --> [Link],006
Troubleshooting, main thing I’ve found is gh auth login,
46
[Link],006 --> [Link],003
gh auth status.
47
[Link],003 --> [Link],000
Make sure that your token is current.
48
[Link],000 --> [Link],005
Also, the extension is regularly revised, so make sure
49
[Link],005 --> [Link],007
that you’re updating your GitHub CLI extensions
50
[Link],007 --> [Link],009
with gh extension upgrade.
51
[Link],009 --> [Link],000
I’m going to do a deep demo on this,
52
[Link],000 --> [Link],001
so I don’t want to belabor the PowerPoint.
53
[Link],001 --> [Link],004
Let me bring out my whiteboarding tools though
54
[Link],004 --> [Link],007
for just a second.
55
[Link],007 --> [Link],008
I’m in Windows terminal here, and I’m using gh.
56
[Link],008 --> [Link],008
Gh is the GitHub CLI,
57
[Link],008 --> [Link],006
and it’s a non-interactive command language.
58
[Link],006 --> [Link],006
You start with gh and then you have your context.
59
[Link],006 --> [Link],006
There’s a whole bunch of different contexts
60
[Link],006 --> [Link],007
for pull requests, projects, packages, you name it.
61
[Link],007 --> [Link],002
Copilot is the one that we have with this extension,
62
[Link],002 --> [Link],004
and there’s two main commands: explain and suggest.
63
[Link],004 --> [Link],005
Here, I’m asking the AI to explain a git rebase command.
64
[Link],005 --> [Link],008
Comes back from the AI, and then we can go from there.
65
[Link],008 --> [Link],000
Meant to be easy in easy out.
66
[Link],000 --> [Link],007
Note that this is very different from our Copilot experience
67
[Link],007 --> [Link],002
in the IDE or in the GitHub web interface.
68
[Link],002 --> [Link],004
This is much, much different indeed.
69
[Link],004 --> [Link],005
I love this prompt. Check this out.
70
[Link],005 --> [Link],000
Let me bring my whiteboarding tool out again,
71
[Link],000 --> [Link],004
Gh copilot suggests create a Git log command
72
[Link],004 --> [Link],006
that displays a graph of the commit history
73
[Link],006 --> [Link],006
with a colorblind-friendly format.
74
[Link],006 --> [Link],000
Isn’t that cool? I love that.
75
[Link],000 --> [Link],006
This is an opportunity for you to use your prompting skills
76
[Link],006 --> [Link],007
to really get custom-fitted responses from the AI.
77
[Link],007 --> [Link],000
It’s really great.