Skip to main content

Install Gemini CLI in VS Code by using Chocolatey (PRE-Install Python and Node.js) first and then NPM (Node.js) - FAILED! TIDAK BISA TERINSTALL!!

YOUTUBE-CHANNEL

MY Self-Done PROCEDURE



Chocolatey is a package manager for Windows, similar to how apt works on Linux or brew on macOS. It helps you install, update, and manage software from the command line.


🧩 What Chocolatey Does

It automates the installation of programs and tools like:

choco install googlechrome
choco install vscode
choco install git

Chocolatey downloads and installs software silently — no manual clicking through installers.


⚙️ How to Install Chocolatey

You can install it by running this command in PowerShell (as Administrator):

Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = `
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Once installed, you can verify it with:

choco --version


📦 Example Commands

Action Command
Install package choco install nodejs
Upgrade all packages choco upgrade all
Uninstall package choco uninstall firefox
Search package choco search python

🐍 Step: Install Python

Run this command:

choco install python -y

Check the installation:

python --version

⚙️ Step: Install Node.js

Run this command:

choco install nodejs -y

Check the installation:

node -v npm -v

Step to Verify everything works

After installation, you should be able to run:

python --version node --version npm --version

If these show version numbers, both tools are successfully installed and added to your PATH.


Install the Gemini CLI using npm (instead of Chocolatey), here’s exactly how to do it inside VS Code’s terminal, step by step:

🧩 Prerequisites

Before installing, make sure you already have:

  1. Node.js installed
    Check in your VS Code terminal:

    node --version
    

    Example output:

    v18.x.x
    
  2. npm (comes with Node.js)

    npm --version
    

    Example output:

    10.x.x
    
  3. (Optional but recommended) Python
    Some dependencies might require it:

    python --version

⚙️ Step: Install Gemini CLI Globally via npm

In your VS Code terminal, run:

npm install -g @google/gemini-cli

Explanation:

  • npm install → tells npm to install a package

  • -g → installs it globally, so it works from anywhere

  • @google/gemini-cli → the official Gemini CLI package name


🧪 Step: Verify the Installation

Once it’s done, check the version:

gemini --version

You should see something like:

gemini-cli v1.x.x

If you get an error like “gemini not recognized”, try restarting VS Code (so it reloads your PATH).



That’s it! 

NOW Gemini CLI ALREADY installed globally via npm and ready to use inside VS Code.


An important distinction because only one of these is the official Google Gemini CLI.

Let’s break it down 👇

Official package

npm install -g @google/generative-ai-cli
  • Publisher: @google

  • Official command-line tool from Google for interacting with Gemini (Google’s generative AI models).

  • Provided by Google’s Generative AI team under the official @google npm scope.

  • It integrates with the Gemini API via your Google AI Studio API key.

  • Command:

    gemini
    
  • Docs: https://www.npmjs.com/package/@google/generative-ai-cli


⚠️ Likely unofficial or outdated

npm install -g @google/gemini-cli
  • As of now, @google/gemini-cli is not an official Google package.

  • It may:

    • Not exist on npm at all.

    • Or be a third-party / placeholder package not maintained by Google.

  • Installing it could give you errors like:

    npm ERR! 404 Not Found - GET https://registry.npmjs.org/@google%2fgemini-cli - Not found
    


🧭 In summary

Command Status Publisher Purpose
npm install -g @google/generative-ai-cli ✅ Official Google The real Gemini CLI
npm install -g @google/gemini-cli ❌ Unofficial / invalid Unknown Don’t use

✅ Correct way to install

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

Then verify:

gemini --version

Difference between Node.js and npm clearly 👇

🟢 Node.js

➤ What it is

Node.js is a runtime environment that lets you run JavaScript outside the browser (on your computer or server).

➤ What it does

  • Executes JavaScript files (e.g., app.js).

  • Powers server-side applications (like APIs, CLIs, tools).

  • Provides built-in modules (like fs, http, etc.) for working with files, networking, and processes.

➤ Example

node app.js

This runs a JavaScript file using the Node.js engine (V8, from Chrome).


📦 npm (Node Package Manager)

➤ What it is

npm is a package manager that comes bundled with Node.js.
It manages reusable code modules (called packages) you can install from the npm registry.

➤ What it does

  • Installs, updates, and removes JavaScript packages.

  • Tracks dependencies in a package.json file.

  • Lets you install CLI tools (like the Gemini CLI) or libraries (like Express).

➤ Example

npm install express

This downloads the Express framework into your project.

Or install globally:

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

⚖️ Node.js vs npm — Side by Side

Feature Node.js npm
Type Runtime environment Package manager
Purpose Runs JavaScript outside browsers Manages JS libraries and tools
Installed with Chocolatey, installer from nodejs.org Bundled with Node.js
Example command node app.js npm install express
Core use Running JS programs Installing/managing dependencies

✅ In short

  • Node.js = runs JavaScript

  • npm = installs and manages packages for Node.js

Or simply:

🧠 “Node.js runs the code, npm gets the code.”

Comments

Popular posts from this blog

PART 0.1.0 RAD PROTOTYPE Web-App: Post-Video & Comments [program]

Video List — JP Kanji Ultra Translation CONTROL SECTION — Login (Admin) Username: Password: Login CONTROL SECTION — Admin Panel Enable Comments Disable Comments Logout Activity Log Show Video COMMENTS DISABLED BY ADMIN Leave a Comment: Additional Comment Show Video COMMENTS DISABLED BY ADMIN Leave a Comment: Additional Comment Show Video COMMENTS DISABLED BY ADMIN Leave a Comment: Additional Comment Show Video COMMENTS DISABLED BY ADMIN Leave a Comment: Additional Comment

My Pending and Delayed POSTs SUMMARY [APPs]
MADE by ChatGPT

🔗 My Pending and Delayed POSTs SUMMARY Sort by Date Sort by Auto Title Sort by My Title Ascending Descending (Newest First) Insert URL: Your Own Title (Optional): Status: Pending Done ➕ ADD ENTRY 💾 SAVE EDIT (MAIN FORM) DATE / TIME AUTO TITLE MY TITLE STATUS URL ACTIONS 📝 TO DO LIST SUMMARY Sort by Date Sort by Header Sort by Detail ...

Tablet Holder di Mobil dan Konsep DOUBLE Tablet Holder aka +secondary supporting holder

Gw udah pasang Holder khusus Tablet yg menurut gw sudah pilihan terbaik! Karena memiliki Arm KERAS/RIGID yg dibutuhkan utk menggenggam ERAT Dalam hal menopang Tablet yg lebih berat dr HP biasa Cekidot Lapak (click here!!) Namun .. Setelah gw pasang Bukan tidak bagus Tapi kalau melewati jalan jelek GOYANG (sikit) juga Gan! Akan tetapi .... Gw rasa bisa makin dimaksimalkan KERIGIDAN dengan menambah PENOPANG KEDUA Check it out: Dari searching2 di MarketPlace Gw ketemu yg mirip holder lampu belajar zaman doeloe Dan .. namun .. tiba2 gw menemukan Ide (lanjutan) Mekanisme yg bisa diReApplied kalau suatu saat diperlukan di Kreasi Agan2 lain  Gunakan Kombo 2 Perangkat berikut apabila membutuhkan holdingan tablet tambahan yg memiliki  "hold area"  yg lebih sempit karena holder kedua "takutnya/dirasa" tidak akan muat utk menggenggam Tablet sebagai penopang kedua, sebagai akibat holder pertama/utama sudah "cukup banyak" memakan tempat Perangkat Pertama (kon...