Hoja de Referencia de la CLI de Google Gemini: La Guía para Usuarios Avanzados de Terminal
Desbloquea flujos de trabajo avanzados de IA en tu terminal con la hoja de referencia de la CLI de Google Gemini, que cubre instalación, configuración, comandos, contexto y la integración del Protocolo de Contexto de Modelo para una alta productividad de los desarrolladores y automatización de siguiente nivel.
El contenido sin traducción disponible se muestra en su versión original en inglés.
En este artículo
What is Google Gemini CLI?
is Google’s open-source command-line AI agent that embeds Gemini’s large language models directly into your terminal. Its powerful natural language processing allows you to code, debug, generate content, automate repetitive tasks, and even interact with external APIs and code repositories—all from the simplicity and speed of the command line.
Empieza tu proyecto
Empecemos a crear Algo excepcional.
Comparte la URL de tu sitio web, tus objetivos, tu plataforma y cualquier restricción de fecha límite o presupuesto. Normalmente respondemos en el plazo de un día hábil con preguntas o los próximos pasos sugeridos. Por favor, no envíes contraseñas ni registros de clientes.
> Refactor the directory @./src/ to use async/await.
Multi-modal Prototyping:
gemini then
> Generate an app prototype from @./ui-mockup.png
Google Gemini CLI Pro Tips
Speed: Use keyboard up/down for prompt history.
Security: Use API keys and .env for safer automation in scripts.
Automation: Integrate with bash scripts for custom devops workflows.
Customization: Edit settings in .gemini/settings.json for global or project preferences.
Plugin Ecosystem: Explore extensions and MCP servers for integrating new models, tools, and APIs as new use cases emerge.
Frequently Asked Questions (FAQs) – Google Gemini CLI Cheatsheet
1. What is the best way to install the Google Gemini CLI?
Install globally with npm install -g @google/gemini-cli or run via npx @google/gemini-cli. Node.js v18+ is required.
2. How do I authenticate Gemini CLI—Google account or API key?
For most, use your personal Google account at first launch, which grants free, high-limits. For advanced use, set the GEMINI_API_KEY as an environment variable or .env file for API key authentication.
3. How can I access and use context from my codebase in prompts?
Reference files or folders in prompts with @./src/file.js or @./directory/ and use GEMINI.md for custom project rules.
4. What is the Model Context Protocol (MCP) in Gemini CLI?
MCP is the open protocol Google Gemini CLI uses to integrate external tools like GitHub, Notion, or cloud APIs—add servers in .gemini/settings.json and use /mcp to list available actions.
5. How do I monitor Gemini CLI usage and rate limits?
Use /stats to see token usage, queries per session, and request quotas. Personal Google login offers 1,000 free model requests/day and 60/minute; see quota in session.
Resumen
Google Gemini CLI cheatsheet is your definitive resource for Google’s command-line AI agent. Combining open-source flexibility, deep integration with APIs and tools through MCP, multimodal support, robust free usage quotas, and intuitive commands, Gemini CLI ushers in a new era of developer productivity right from the terminal. With slash, context, and shell commands, checkpointing, and customization options, power users can automate, code, document, and create seamlessly. By leveraging this cheatsheet, you unlock the full potential of Gemini CLI—placing world-class AI, advanced code analysis, and automation at your fingertips.