Comprehensive guide covering 30+ advanced techniques for using Gemini CLI, Google's open-source AI terminal assistant. Covers persistent context with GEMINI.md files, custom slash commands, MCP server extensions, memory management, checkpointing for rollbacks, file and image referencing with @ syntax, on-the-fly tool creation, system troubleshooting, YOLO mode for auto-approval, headless scripting, and session management. Includes setup instructions, authentication options (free Google account or API key), and practical examples for coding tasks, debugging, content generation, and workflow automation.

1h 32m read timeFrom addyo.substack.com
Post cover image
Table of contents
Getting StartedTip 1: Use GEMINI.md for Persistent ContextTip 2: Create Custom Slash CommandsTip 3: Extend Gemini with Your Own MCP ServersTip 4: Leverage Memory Addition & RecallTip 5: Use Checkpointing and /restore as an Undo ButtonTip 6: Read Google Docs, Sheets, and More.Tip 7: Reference Files and Images with @ for Explicit ContextTip 8: On-the-Fly Tool Creation (Have Gemini Build Helpers)Tip 9: Use Gemini CLI for System Troubleshooting & ConfigurationTip 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 SessionsTip 13: Multi-Directory Workspace - One Gemini, Many FoldersTip 14: Organize and Clean Up Your Files with AI AssistanceTip 15: Compress Long Conversations to Stay Within ContextTip 16: Passthrough Shell Commands with ! (Talk to Your Terminal)Tip 17: Treat Every CLI Tool as a Potential Gemini ToolTip 18: Utilize Multimodal AI - Let Gemini See Images and MoreTip 19: Customize the $PATH (and Tool Availability) for StabilityTip 20: Track and reduce token spend with token caching and statsTip 21: Use /copy for Quick Clipboard CopyTip 22: Master Ctrl+C for Shell Mode and ExitingTip 23: Customize Gemini CLI with settings.jsonTip 24: Leverage IDE Integration (VS Code) for Context & DiffsTip 25: Automate Repo Tasks with Gemini CLI GitHub ActionTip 26: Enable Telemetry for Insights and ObservabilityTip 27: Keep an Eye on the Roadmap (Background Agents & More)Tip 28: Extend Gemini CLI with ExtensionsAdditional Fun: Corgi Mode Easter Egg 🐕

Sort: