ホーム 暮らし [Windows 11] Complete in 5 minutes! Gemini CLI Installation Guide

[Windows 11] Complete in 5 minutes! Gemini CLI Installation Guide

藤崎 健人 藤崎 健人 • 更新: • 公開: • 読了約 14 分
目次


n3d6c6c276033

Hello. This is Yamatoro.

As you all know, Gemini is a powerful AI model developed by Google.
A tool called Gemini CLI has been released that allows you to use its conversational and coding capabilities directly from the command line.


It is becoming a hot topic online, with comments like "It's better than Cloud Code!" and "I'm switching to Gemini CLI."


If you haven't tried it yet, it only takes 5 minutes to install, so let's give it a go!

In this article, I will explain the steps to install Gemini CLI using PowerShell for Windows 11 users, broken down into two major steps.

What we will do in this article
  1. Install Node.js: Prepare the execution environment required to run Gemini CLI.

  2. Install Gemini CLI from PowerShell: Use the npm command to install the CLI tool itself.



Now, let's get started!

Step 1: Install Node.js

Gemini CLI runs on Node.js, which is a JavaScript execution environment. Therefore, you first need to install Node.js on your PC.

Node.js comes with a tool called npm (Node Package Manager), which you can use to easily install Gemini CLI.


1. Access the official Node.js website

First, access the official Node.js website using your web browser.



2. Download the installer

Click "Install Node.js" on the top page to download the installer.

Click on the "Windows Installer (.msi)" located towards the bottom of the page.

■ Reference Information
You can also change the version at the top of the page.

  • LTS (Recommended): Stands for Long-Term Support; this is a stable version with guaranteed long-term support. Unless you have a specific reason, you should choose this.

  • Current (Latest): Contains the latest features, but may lack stability.


3. Install Node.js

Run the downloaded .msi file to launch the installer.
Basically, you can just click "Next" with all the default settings. Agree to the license agreement, confirm the installation folder, and complete the installation.

4. Verify the installation

Let's verify that it was installed correctly.
Type "PowerShell" into the Windows search bar.

Open a new PowerShell window andrun each of the following commands.

node -v
npm -v

If a version number like v20.11.0 is displayed for each, the Node.js installation is successful!



Step 2: Install Gemini CLI from PowerShell

Now that Node.js is ready, it's time to install the main event, the Gemini CLI.

1. Open PowerShell

As before, search for "PowerShell" in the search bar and launch it.

If you still have it open from the version check earlier, that is fine.


2. Run the installation command

In the PowerShell window, please copy and paste the following command and execute it.

npm install -g @google/generative-ai/cli


Explanation of the command
  • "npm install": A command to install a package using npm.

  • "-g": An option meaning "global". By adding this, you will be able to use the gemini command from anywhere on your PC.

  • "@google/generative-ai/cli": This is the package name for the Gemini CLI.


3. Verify the installation

Once the installation is complete, let's try running the following command.

gemini --help


If the usage instructions for the gemini command are displayed, the installation was successful!


If you cannot start gemini due to an error

Sometimes an error may occur when running the installation command.

In such cases, clearing the cache and re-running the command will resolve the issue.

1. Run the Command Prompt (or PowerShell) as an administrator. 2. Run the following command to clear the cache.

npm cache clean --force

3. Run the gemini cli installation command again.

npm install -g @google/generative-ai/cli


First step: Google account authentication

It is finally time to launch the Gemini CLI.

Type "gemini" in PowerShell and press Enter.

When Gemini starts, the theme settings will be displayed, so select your preferred design.

Select your preferred design for Select Theme.
You can leave Apply To as "User Settings".


To use the Gemini CLI, you need to authenticate your Google account, so select "Login with Google" while logged into your Google account in Edge or Chrome.

Your browser will open automatically to confirm authentication; just click login to complete the process.

Gemini is now ready to use!
Let's try a simple chat.

The response will be displayed.

Beyond simple questions, try entering something like "write a blog post about XX".

You will get a high-quality article that feels less like a typical AI output!

By the way, "gemini-2.5-pro" displayed at the bottom right of the command is the version currently running.

You can use the excellent "gemini-2.5-pro" for a while, but it is set to automatically switch to a lower-tier model called "flash" after a certain point.


It will return to pro the next day, so try using it while keeping an eye on your frequency.


Summary


That is all. Thank you for your hard work.

In this article, I explained how to install the Gemini CLI in the following two steps.

  1. Install Node.js (LTS version)

  2. Run npm install -g @google/generative-ai/cli in PowerShell

Now you can leverage the power of Gemini in any situation, such as coding, writing, or brainstorming ideas.

Please try out various commands and use them for your work or side projects.

同じカテゴリの記事

藤崎 健人

芸能取材歴10年のデスク。所属事務所の公式リリース、番組公式サイト、配信サービスの告知を一次情報として採用し、裏付けの取れない内容は記事にしていません。

おすすめの関連記事