Gemini guides

FREE GUIDE

Gemini CLI

Start Gemini CLI in a practice project and ask it to explain the files before changing anything.

  • 4 min read
  • Step by step
  • Copy-ready prompt

Start Gemini CLI in a practice project and ask it to explain the files before changing anything. You will finish with an evidence-based project map and a small next step you understand.

Before you start

  • A terminal, internet connection, a browser for sign-in, and Node.js 20 or later with npm. Google recommends macOS 15+, Windows 11 24H2+, or Ubuntu 20.04+.
  • A Google Account eligible for Gemini CLI in your location. This walkthrough uses Google sign-in; some organization and Code Assist accounts also require a configured Google Cloud project.
  • A practice copy of a small project you own, including its README if it has one. Remove secrets and customer data from that copy before using it.
  • A little terminal familiarity: you should be able to open a terminal and move into a folder with cd.

Want to do it yourself?

Difficulty
6 out of 10
Estimated completion time
30–60 minutes

Skills you’ll need: Check your runtime, install a CLI, navigate a practice folder, and compare its project explanation with actual files.

How this helps your brand

A verified project map helps you understand where a future website or software change belongs. Checking real files and documented commands gives the next task a more dependable starting point.

  1. Step 1: Check the runtime and install the CLI

    In your terminal, run node --version and npm --version. If Node is below version 20 or either command is missing, set up a compatible Node.js installation before continuing.

    Run npm install -g @google/gemini-cli to install the default stable release. If gemini later reports “command not found,” check whether npm’s global binary directory is in your PATH. Google’s installation guide also documents npx @google/gemini-cli as an alternative launch method.

  2. Step 2: Open the practice folder and sign in

    Use cd followed by your practice folder’s path, putting a path containing spaces in quotes. Launch Gemini CLI by running gemini. Select Sign in with Google and complete the browser sign-in, then return to the terminal.

    If your account requires a Google Cloud project, follow the official authentication setup with your administrator. Do not paste a password or API key into the conversation to resolve a sign-in error.

    Illustrated exampleFrom your shell to the Gemini CLI conversation
    Example terminal session

    cd "Northline practice"

    Current folder: Northline practice/

    gemini

    Explain this project and cite local file paths. Do not edit files or run the application.
    Explanation only
    1. Set the folder first

      The CLI starts inside your practice copy. Quotes keep a folder name with spaces together.

    2. Use the browser for sign-in

      Return to the terminal when the account is connected.

    3. Then describe the task

      Shell commands launch the tool. Your project question goes in the CLI conversation.

    An illustrated session using a folder named “Northline practice”. Start in your own practice folder, complete sign-in, then paste the explanation prompt into Gemini CLI.
  3. Step 3: Ask it to map the project

    Paste the prompt below into the Gemini CLI input, using the project’s name. Ask it to inspect local files and identify the entry point, important folders, and documented run commands.

    Keep this first task to explanation. If the CLI asks to run a command or write a file, read the proposed action. Decline edits or installations that are unnecessary for understanding the project.

  4. Step 4: Check the explanation against actual files

    Open two or three files the answer names. Check that they exist and that their contents support the explanation. Compare suggested run commands with the project’s README and configuration before trying them.

    If Gemini names a file that does not exist, give it the correct path and ask it to revise the map using that file. An absent README is a reason to inspect the project configuration, not invent a startup command.

    Illustrated exampleMatch the project map to file evidence
    Northline practice/
    • README.md1
    • package.json1
    • src/
      • main.tsx2
      • App.tsx3

    Open the files named in the answer.

    1 Documented run command

    README.md says npm run dev.

    package.json agrees: "dev": "vite".

    ✓ Both files support the command
    2 App entry point

    src/main.tsx mounts the app:

    createRoot(root).render(<App />)
    3 Home-page heading

    src/App.tsx contains the visible text:

    <h1>Northline Studio</h1>

    No test script in this example? Record “Test command not established” and ask what evidence is missing.

    These sample files show how to check an explanation. Use the paths and configuration in your own project, and mark anything you cannot establish clearly.
  5. Step 5: Choose one next step without changing the project

    Ask which one small change would help you learn the project, and what files and checks it would involve. For a simple website, that might be changing one heading and checking it in a local preview.

    Save the verified project map and proposed next step in your own notes. If a quota or access error interrupts the session, keep the error text and consult the CLI’s account and troubleshooting documentation before retrying.

You're done when

  • Gemini CLI launches in the intended practice folder and accepts your prompt after sign-in.
  • Its project map names real files you opened and checked, with missing information marked clearly.
  • You understand one proposed next step and its checks, and the exercise has not required changes to your project files.

Your prompt

Show promptHide prompt

COPY AND PASTE

Help me understand this local project: [project name]. Inspect its README, configuration, and relevant source files. Explain the purpose, entry point, main folders, and any documented commands for running or checking it. Cite the local file paths behind your explanation.

This task is explanation only: do not edit files, install dependencies, start servers, or run the application. If information is missing, say what you could not establish. Finish by proposing one small beginner-friendly change and how I could verify it, but do not implement it.

Paste this into Gemini CLI after starting it from your practice project folder. Shell installation and launch commands belong in the terminal before the chat starts.

FREE BY EMAIL

Get the full AI guide

Our complete, step-by-step guide to using AI in your business, sent straight to your inbox.

Keep goingMore Gemini guidesReturn to Gemini for more practical guides and launch notes.

Get every new tool guide in your inbox

When a tool drops a new feature, you get the breakdown: what it is, how it works, and how to use it.

By subscribing, you agree to receive the tool guides newsletter. Unsubscribe anytime.