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

Utk yg mo Bantu2 Keuangan saya
..monggo ke Bank Central Asia BCA 5520166779 a.n. Andreas Tparlaungan Manurung (Indonesia)


For those who would like to help support my finances
..please feel free to send it to Bank Central Asia (BCA) account number 5520166779 under the name Andreas Tparlaungan Manurung (Indonesia)

ANDREAS TOMMY PARLAUNGAN MANURUNG SHARED POOLING ACCOUNT MY ANDROID APKs PAGE please download here! REFRESH PAGE aka CHECK LATEST UPDATE! DOWNLOAD "SHOWING" POOL OF MY ANDROID-APK(s) aka APK CONTAINING LIST OF ALL MY ANDROID-APK(s) APP CLICK HERE FOR ALWAYS BEING UPDATED FOR MY LATEST APK! CONTOH HASIL "PROGRAM" App: Prompts' Guide aka TEMPLATE-HELPERs click here to download! Youtube and Instagram EMBEDded to Blogger/Blogspot.com SOURCE CODE Click this box to download 📥 TikTok EMBEDded to Blogger/Blogspot.com SOURCE CODE Input: BrowserLINK (mandatory) Click this box to download SHORTCUT-APPs note :  "precise" click to download R8: ronin1985.blogspot.com R2M: ronin-manu.blogspot.com Helping Download(ing) OnlineVIDEO! ...

Donation Account + CustomAPPs

Utk yg mo Bantu2 Keuangan saya ..monggo ke Bank Central Asia BCA 5520166779 a.n. Andreas Tparlaungan Manurung (Indonesia) For those who would like to help support my finances ..please feel free to send it to Bank Central Asia (BCA) account number 5520166779 under the name Andreas Tparlaungan Manurung (Indonesia). Web-Based to Android Apps Convertion (MEDIAN.CO etc.) CONTOH HASIL Android APK "PROGRAM" SAMPLE: Youtube and Instagram EMBEDded to Blogger/Blogspot.com SOURCE CODE Click this box to download Contoh Sample SHORTCUT-APPs "precise" click to download : median.co R8: ronin1985.blogspot.com R2M: ronin-manu.blogspot.com Gw udah coba Median.co utk mengubah Website gw menjadi Aplikasi Android Keren bet!! Median.co Cekidot Software lain yg mirip! ChatGPT : If you're looking for tools similar to Median.co to convert websites into Android apps, here are some...

REPOST: Studying WATER PUMP by ROMAN ENGINEERING

*^ Ini yg Asli Gan! Mekanisme pada Concrete Pump: Kok ky Sistem Mekanik Romawi ya?! Tapi malah bisa HANYA pake PER aka bukan "MATA BOR look a like" Mekanisme Drill yg Cost Pembuatan bikin REPOT aka harus Tool SUPER Khusus Dari Material Besi yg digunakan terlihat langsung secara kasat mata Jauh Lebih Banyak drpd Per Biasa seperti yg ditunjukkan pd Video Alternatif dgn Penggunaan PER Video dr Instagram: Source: YouTube Rome's drainage machines #history #romanempire #engineering