# Gemini CLI: Complete Beginner’s Guide to Installation & Usage

**URL:** <https://onehack.st/t/gemini-cli-complete-beginner-s-guide-to-installation-usage/309723>\
**Category:** Tutorials & Methods\
**Tags:** tools, programming\
**Created:** [August 11, 2025, 7:56pm UTC](https://onehack.st/t/gemini-cli-complete-beginner-s-guide-to-installation-usage/309723 "2025-08-11T19:56:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoBody](https://onehack.st/user_avatar/onehack.st/nobody/32/163880_2.png) [@NoBody](https://onehack.st/u/NoBody)\
**Post date:** [August 11, 2025, 7:56pm UTC](https://onehack.st/t/gemini-cli-complete-beginner-s-guide-to-installation-usage/309723/1 "2025-08-11T19:56:27Z")

</div>

Gemini CLI: Complete Beginner’s Guide to Installation & Usage

**Gemini CLI** is a **free, open-source** tool that brings **Google’s Gemini AI** directly into your **Terminal** , enabling developers and tech users to code, write, research, and manage files in plain English. It’s lightweight, supports long prompts, integrates with tools like VS Code, and is highly customizable.

* * *

## **⚙ Installation**

1. **Install Node.js** (v18 or higher) → [Node.js Downloads](https://nodejs.org/en/download/)
2. Get **Google Account** or **Gemini API Key** → [Google AI Studio](https://aistudio.google.com/app/apikey)
3. **Run instantly** :

```bash
npx https://github.com/google-gemini/gemini-cli

```

1. **Install globally** :

```bash
npm install -g @google/gemini-cli

```

1. **Verify installation** :

```bash
gemini --version

```

* * *

## **🔑 Authentication**

- On first run:

```bash
gemini

```

Choose a **color theme** and authenticate via **Google Account** or **Gemini API key** (API key offers higher quotas).

* * *

## **💡 Use Cases & Commands**

### **1. Coding Assistant**

- Default model: `gemini-2.5-pro` (can switch to faster `gemini-2.0-flash-lite`):

```bash
gemini --m gemini-2.0-flash-lite

```

- Example prompt: _“Generate a function in Node.js that calculates the factorial of a number.”_
- Can **save outputs** directly to files, e.g.:

```plaintext
Save this code in a file named factorial.js

```

### **2. File & Project Management**

- Can **create directories, files, and scaffold projects**.  
Example prompt to scaffold a Go project:

```plaintext
I want to scaffold a new Go project with:
- Module name: github.com/user/project
- Language: Go
- Purpose: CLI app
...

```

- Gemini CLI will request **file system permissions** before making changes.

* * *

## **🚀 Key Benefits**

- **Cross-functional** : Coding, content creation, research, file handling, automation.
- **Speed** : Switch between high-power and lightweight AI models.
- **Customizable** : Themes, model selection, command chaining.

**GitHub Repo** → [google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli)

* * *
