Your Terminal Just Got Smarter (and Slightly Unsettling)
What Is This Creepy-Clever Thing?
Gemini CLI is like hiring a very smart, unpaid robot that lives inside your terminal.
It can read your files, explain code, fix bugs, and do things you probably could’ve done yourself—but didn’t.
- It uses Gemini 2.5 Pro (yes, the one with a massive memory).
- It’s free (for now, anyway).
- You don’t need to install a bunch of stuff or open a browser.
- Runs straight from a single command.
Basically: imagine ChatGPT, but with terminal powers, and it doesn’t complain about labor laws.
How to Get It Working (Even If You’re Half Asleep)
Quick Map:
Check Node âžś Copy a command âžś Log in âžś Ask questions âžś Watch magic happen
Step 1: Make Sure Node.js Works
Open a terminal and type:
node -v
If it’s v20 or more, you’re golden.
If not, download from nodejs.org (click big green button) or run this if on Linux:
sudo apt update && sudo apt install nodejs npm -y
Step 2: Run It Instantly (No Install, No Drama)
In the same terminal, paste this:
npx https://github.com/google-gemini/gemini-cli
That’s it.
No setup. No admin rights. No 400-step tutorial.
It’ll open, ask for your Google login, and boom—you’re in.
Want It Installed Forever?
npm install -g @google/gemini-cli
Then you can just type:
gemini
…whenever you want the robot back.
What Can It Actually Do?
Try these and feel smart:
-
Explain index.js like I’m five.
-
Why is auth.js throwing “TypeError: undefined”? Fix it.
-
Summarize this whole project folder.
Gemini reads your files, finds bugs, shows a fix, and politely asks for permission to change stuff.
(Unless you turn on YOLO mode, which skips the “asking” part. Risky. Fun.)
Hidden Powers You Didn’t Ask For (But Now You Want)
Feature | What It Does |
---|---|
--yolo |
Gemini skips confirmation. Chaos on speed. |
GEMINI.md |
Gemini writes a full step-by-step plan before touching your code. Like a very nervous intern. |
/tools |
Shows all built-in features it secretly has. |
/memory |
Tells you what Gemini remembers (yes, it keeps notes). |
/stats |
Brags about how many tokens it used and time it “saved” you. |
@search URL |
Pulls data from the web right into the conversation. |
`echo “prompt” | gemini -p -` |
Want to Give It Superpowers? Use MCPs (Basically Add-ons)
Example: Add Apidog
Open ~/.gemini/settings.json
and paste:
{
"mcpServers": {
"apidog": {
"command": "npx",
"args": ["-y", "apidog-mcp-server@latest", "--oas=https://example.com/openapi.yaml"]
}
}
}
Then you can say:
Use Apidog MCP to list all endpoints.
Boom. It reads your OpenAPI file and acts like it built the API itself.
Example: Add Netdata (DevOps Nerds, Assemble)
"netdata": {
"command": "/usr/sbin/nd-mcp",
"args": ["ws://192.168.1.50:19999/mcp?api_key=MYKEY"]
}
Then ask:
What's the CPU usage across all servers for the past hour?
It answers with actual charts. Witchcraft.
Real Talk: Things That Might Break
Problem | Easy Fix |
---|---|
Gemini says “command not found” | You forgot to install Node.js. |
It opens but nothing happens | Try a different terminal or run gemini --no-color . |
It keeps asking to log in | Use incognito. Clear your cookies. Blame Google. |
Your MCP plugin won’t work | Your JSON probably has a comma missing. Always a comma. |
Watch Out For These
- YOLO mode is fun… until Gemini rewrites something important.
- Never set
"trust": true
for random MCP plugins. That’s like saying, “Sure, stranger, run whatever you want on my machine.” - You can press
ESC
anytime to cancel what it’s about to do. Use that like your digital eject button.
Cheat Sheet: For When You Forget Everything
What You Want | What To Type |
---|---|
Reopen last chat | /resume |
Change look | /theme |
Free up token space | /compress |
Start fresh | /clear |
Find its memory | /memory |
See its stats | /stats |
If You’re a Beginner, Use This
Skill Level | What To Do | Time | Needs Admin? |
---|---|---|---|
Kid/Beginner | npx https://github.com/google-gemini/gemini-cli |
30 seconds | No |
Normal user | npm install -g @google/gemini-cli |
1 minute | Sometimes |
DevOps pro | Add RUN npm i -g @google/gemini-cli in Dockerfile |
During build | Yes |
Actual Working Links (No Clickbait)
- Gemini CLI on GitHub
- Google’s Blog Post
- Full Guide on Apidog
- Full Tutorial (Dev.to)
- Official Docs (Gemini Code Assist)
TL;DR?
Run this and live your best terminal life:
npx https://github.com/google-gemini/gemini-cli
If Google ever charges for it, at least you got to feel powerful for free.