Get the full source code of application here:
Show More Show Less View Video Transcript
0:00
Uh hello guys, welcome to this video. So
0:02
in this video I will show you how to
0:04
install the Google Gemini CLI directly
0:07
inside your Windows machine to directly
0:10
chat inside the command line. So I will
0:12
show you step by step. I created this
0:15
brand new folder and this is their
0:17
GitHub page. If you just type Google
0:19
Gemini CLI, so it's an open-source AI
0:22
agent that brings the power of Gemini
0:24
directly inside your terminal. So now
0:27
what you need to do you should have
0:28
NodeJS installed. So it is clearly it is
0:32
mentioned on their website that ensure
0:34
that you have at least NodeJS version 18
0:38
installed. So I have already installed
0:40
NodeJS. So you can check the version of
0:44
NodeJS by this command Node version. So
0:48
we are using the latest version which is
0:50
23.7.0.
0:52
So if you haven't installed NodeJS,
0:55
simply type on Google Node download and
0:58
just install the latest version of
1:00
NodeJS.
1:02
After that you just need to run this
1:03
command to install the Gemini CLI.
1:07
So they mention I've given the article
1:09
link in the description of the video. So
1:12
simply copy this command and paste it.
1:15
npm install we are installing it
1:18
globally here. -ash g at the rate
1:20
google/gemini
1:22
cla. So just enter it and this command
1:25
will install the gemini cla utility. So
1:29
this will take at least uh 15 to 20
1:32
seconds to download and install this
1:36
utility inside your computer. So just
1:38
wait for the command to finish
1:44
and then after that you just need to
1:45
configure the API key using the Gemini.
1:52
So
1:56
so now it is uh installing it. In the
1:58
meanwhile what we can do we can go to
2:00
this next option to generating an API
2:04
key. So for you can generate the API key
2:06
by going to Google AI studio
2:10
and right here in the dashboard you can
2:11
create a new API key.
2:14
So click this button and this will
2:16
create a new API key for you.
2:24
So this will be different for you. So
2:26
don't copy my API key.
2:29
So with the help of this API key you can
2:32
now generate API responses. So now it is
2:35
you can see it has successfully
2:37
installed it. So now if you type your
2:39
Gemini.
2:42
So now the command will be successful.
2:45
Here you will see now you just need to
2:48
create the variable for API key to
2:51
configure it.
2:57
So here you can basically write like
2:59
this export gemini API key create a
3:02
environment variable right in the
3:04
terminal itself. So now you can see it
3:06
is asking you to setting a theme here.
3:09
So these are different themes available
3:11
right here. So I will stick to the
3:13
default theme.
3:19
So this is different kinds of
3:22
authentication. Here you can see Gemini
3:25
API key or login with Google or vortex
3:29
API. So you need to select the second
3:31
option.
3:36
So it is saying that uh Gemini API key
3:39
environment variable not found. So first
3:41
for that you first of all need to
3:49
uh I think yeah you need to
3:57
set this environment variable. So you
4:00
will simply say export
4:04
Gemini API key and then you will paste
4:07
your API key that you got.
4:16
So this is saying export is not
4:18
recognized.
4:26
So just wait we can ask chat GPT for
4:28
this.
4:32
You're getting this error because you're
4:34
trying to
4:36
so sorry if you are on Windows you need
4:38
to write like this set Gemini API key.
4:42
This command is useful for Linux only.
4:45
So after you set this environment
4:47
variable now just type Gemini and then
4:50
you can actually
4:53
so it is waiting for your
4:54
authentication.
4:56
So now it is asking you to type your
4:58
message. You can type any message here
5:01
to the Gemini CLI. Let's suppose I say
5:03
write a Python program
5:07
to add two numbers and print out
5:12
the result.
5:14
So now it is actually
5:19
making that request and then you can see
5:21
on the command line itself it generates
5:24
the program here the Python script
5:27
apply this change.
5:34
So it is creating that
5:38
it is creating this file itself and
5:40
writing this addition program. Here you
5:42
can see everything is I've created a
5:45
Python file named add numbers by in your
5:47
current directory. It add two numbers
5:49
and prints the result. You can run it
5:52
from your terminal. So now I can run
5:54
this file here. Add numbers.
6:06
So it will also execute your script as
6:08
well. You can run your code
6:12
all these things will happen directly.
6:14
So,
6:25
so in this easy way guys, you can
6:27
actually get started with Gemini. I have
6:30
just
6:32
uh showed you step-by-step process.
6:35
So please hit that like button,
6:38
subscribe the channel and also check out
6:39
my website freemediattools.com
6:42
uh which contains thousands of tools.
#Programming
#Development Tools
#Open Source
