Configure macOS and dev tooling from the terminal

January 1, 2026. Task: January 1, 2026 This guide covers ~30 pro-tips for effectively using Gemini CLI for agentic coding for Gemini 2.5, 3.0 and beyond Gemini CLI is an open-source AI assistant that brings the power of Google’s Gemini model directly into your terminal. It functions as a conversational, “agentic” command-line tool - meaning it can reason about your requests, choose tools (like running shell commands or editing files), and execute multi-step plans to help with your development workflow. In practical terms, Gemini CLI acts like a supercharged pair programmer and command-line assistant. It excels at coding tasks, debugging, content generation, and even system automation, all through natural language prompts. Before diving into pro tips, let’s quickly recap how to set up Gemini CLI and get it running. Table of Contents Getting Started Tip 1: Use GEMINI.md for Persistent Context Tip 2: Create Custom Slash Commands Tip 3: Extend Gemini with Your Own MCP Servers Tip 4: Leverage Memory Addition & Recall Tip 5: Use Checkpointing and /restore as an Undo Button Tip 6: Read Google Docs, Sheets, and More. Tip 7: Reference Files and Images with @ for Explicit Context Tip 8: On-the-Fly Tool Creation (Have Gemini Build Helpers) Tip 9: Use Gemini CLI for System Troubleshooting & Configuration Tip 10: YOLO Mode - Auto-Approve Tool Actions (Use with Caution) Tip 11: Headless & Scripting Mode (Run Gemini CLI in the Background) Tip 12: Save and Resume Chat Sessions Tip 13: Multi-Directory Workspace - One Gemini, Many Folders Tip 14: Organize and Clean Up Your Files with AI Assistance Tip 15: Compress Long Conversations to Stay Within Context Tip 16: Passthrough Shell Commands with ! (Talk to Your Terminal) Tip 17: Treat Every CLI Tool as a Potential Gemini Tool Tip 18: Utilize Multimodal AI - Let Gemini See Images and More Tip 19: Customize the $PATH (and Tool Availability) for Stability Tip 20: Track and reduce token spend with token caching and stats Tip 21: Use /copy for Quick Clipboard Copy Tip 22: Master Ctrl+C for Shell Mode and Exiting Tip 23: Customize Gemini CLI with settings.json Tip 24: Leverage IDE Integration (VS Code) for Context & Diffs Tip 25: Automate Repo Tasks with Gemini CLI GitHub Action Tip 26: Enable Telemetry for Insights and Observability Tip 27: Keep an Eye on the Roadmap (Background Agents & More) Tip 28: Extend Gemini CLI with Extensions Tip 29: Corgi Mode Easter Egg 🐕 Getting Started Installation: You can install Gemini CLI via npm. For a global install, use: Or run it without installing using npx: Gemini CLI is available on all major platforms (it’s built with Node.js/TypeScript). Once installed, simply run the gemini command in your terminal to launch the interactive CLI. Authentication: On first use, you’ll need to authenticate with the Gemini service. You have two options: (1) Google Account Login (free tier) - this lets you use Gemini 2.5 Pro for free with generous usage limits (about 60 requests/minute and 1,000 requests per day. On launch, Gemini CLI will prompt you to sign in with a Google account (no billing required. (2) API Key (paid or higher-tier access) - you can get an API key from Google AI Studio and set the environment variable GEMINI_API_KEY to use it. API key usage can offer higher quotas and enterprise data‑use protections; prompts aren’t used for training on paid/billed usage, though logs may be retained for safety. For example, add to your shell profile: Basic Usage: To start an interactive session, just run gemini with no arguments. You’ll get a gemini> prompt where you can type requests or commands. For instance: You can then watch as Gemini CLI creates files, installs dependencies, runs tests, etc., to fulfill your request. If you prefer a one-shot invocation (non-interactive), use the -p flag with a prompt, for example: This will output a single response and exit. You can also pipe input into Gemini CLI: for example, echo "Count to 10" | gemini will feed the prompt via stdin.; tools: Gemini. Human role: The original post does not say how a person stayed involved.; limitations: Prerequisites include Node.js installation and Google authentication. Constraints: System-level commands (e.g., rm -rf) require caution; YOLO mode auto-approves actions and should be used carefully. Integration uncertainty: Custom MCP servers require configuration and security review. Human approvals are mandatory in default safe mode to prevent unintended changes..

Tools

Gemini

Published on Agent Work Atlas:

Overview

January 1, 2026

Workflow

January 1, 2026 This guide covers ~30 pro-tips for effectively using Gemini CLI for agentic coding for Gemini 2.5, 3.0 and beyond Gemini CLI is an open-source AI assistant that brings the power of Google’s Gemini model directly into your terminal. It functions as a conversational, “agentic” command-line tool - meaning it can reason about your requests, choose tools (like running shell commands or editing files), and execute multi-step plans to help with your development workflow. In practical terms, Gemini CLI acts like a supercharged pair programmer and command-line assistant. It excels at coding tasks, debugging, content generation, and even system automation, all through natural language prompts. Before diving into pro tips, let’s quickly recap how to set up Gemini CLI and get it running. Table of Contents Getting Started Tip 1: Use GEMINI.md for Persistent Context Tip 2: Create Custom Slash Commands Tip 3: Extend Gemini with Your Own MCP Servers Tip 4: Leverage Memory Addition & Recall Tip 5: Use Checkpointing and /restore as an Undo Button Tip 6: Read Google Docs, Sheets, and More. Tip 7: Reference Files and Images with @ for Explicit Context Tip 8: On-the-Fly Tool Creation (Have Gemini Build Helpers) Tip 9: Use Gemini CLI for System Troubleshooting & Configuration Tip 10: YOLO Mode - Auto-Approve Tool Actions (Use with Caution) Tip 11: Headless & Scripting Mode (Run Gemini CLI in the Background) Tip 12: Save and Resume Chat Sessions Tip 13: Multi-Directory Workspace - One Gemini, Many Folders Tip 14: Organize and Clean Up Your Files with AI Assistance Tip 15: Compress Long Conversations to Stay Within Context Tip 16: Passthrough Shell Commands with ! (Talk to Your Terminal) Tip 17: Treat Every CLI Tool as a Potential Gemini Tool Tip 18: Utilize Multimodal AI - Let Gemini See Images and More Tip 19: Customize the $PATH (and Tool Availability) for Stability Tip 20: Track and reduce token spend with token caching and stats Tip 21: Use /copy for Quick Clipboard Copy Tip 22: Master Ctrl+C for Shell Mode and Exiting Tip 23: Customize Gemini CLI with settings.json Tip 24: Leverage IDE Integration (VS Code) for Context & Diffs Tip 25: Automate Repo Tasks with Gemini CLI GitHub Action Tip 26: Enable Telemetry for Insights and Observability Tip 27: Keep an Eye on the Roadmap (Background Agents & More) Tip 28: Extend Gemini CLI with Extensions Tip 29: Corgi Mode Easter Egg 🐕 Getting Started Installation: You can install Gemini CLI via npm. For a global install, use: Or run it without installing using npx: Gemini CLI is available on all major platforms (it’s built with Node.js/TypeScript). Once installed, simply run the gemini command in your terminal to launch the interactive CLI. Authentication: On first use, you’ll need to authenticate with the Gemini service. You have two options: (1) Google Account Login (free tier) - this lets you use Gemini 2.5 Pro for free with generous usage limits (about 60 requests/minute and 1,000 requests per day. On launch, Gemini CLI will prompt you to sign in with a Google account (no billing required. (2) API Key (paid or higher-tier access) - you can get an API key from Google AI Studio and set the environment variable GEMINI_API_KEY to use it. API key usage can offer higher quotas and enterprise data‑use protections; prompts aren’t used for training on paid/billed usage, though logs may be retained for safety. For example, add to your shell profile: Basic Usage: To start an interactive session, just run gemini with no arguments. You’ll get a gemini> prompt where you can type requests or commands. For instance: You can then watch as Gemini CLI creates files, installs dependencies, runs tests, etc., to fulfill your request. If you prefer a one-shot invocation (non-interactive), use the -p flag with a prompt, for example: This will output a single response and exit. You can also pipe input into Gemini CLI: for example, echo "Count to 10" | gemini will feed the prompt via stdin.

Reported result

Actual outcomes are not reported in the source. The guide describes expected behaviors: checkpointing saves state before file writes, and safe mode prompts for confirmation on system-modifying actions. Proposed acceptance check: Verify that a test file modification triggers a 'Checkpoint saved' message and requires manual approval before applying changes.

Human role

The original post does not say how a person stayed involved.

Limitations

Prerequisites include Node.js installation and Google authentication. Constraints: System-level commands (e.g., rm -rf) require caution; YOLO mode auto-approves actions and should be used carefully. Integration uncertainty: Custom MCP servers require configuration and security review. Human approvals are mandatory in default safe mode to prevent unintended changes.

Try it

I want to configure my macOS development environment using Gemini CLI. First, install Gemini CLI globally via npm and authenticate using my Google Account. Create a GEMINI.md file in my project root with specific coding style guidelines. Then, ask Gemini to create a new Python script for data processing. Ensure checkpointing is enabled so I can undo changes. Before any file is written or shell command is executed, pause and show me the proposed diff or command for my approval. Do not auto-approve any actions. If the task involves system configuration, explicitly warn me about potential impacts. Start with a small sample task: create a 'hello_world.py' file. Show me the checkpoint status and the confirmation prompt before proceeding. If I approve, execute the change. If I reject, stop and ask for clarification. Report the final state of the file system and any logs generated.

Original source

Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.

More cases · Software & development