gemini
gemini - Google Gemini AI Integration
The gemini module provides a powerful CLI interface for Google's Gemini AI models, supporting text generation, file-based context, and multimodal inputs like images.
When to Activate
- When the user wants to use Gemini for chat or complex text generation.
- When the user needs to analyze or translate files using Gemini's large context window.
- When the user wants to provide images for AI analysis via the terminal.
- When managing Gemini API keys or exploring available models.
- When using Gemini's integrated Google Search tool (
gg).
Core Principles & Rules
- API Key Management: Use
initor--cfg apikey=<key>for setup. - Multimodal Support: Use the
--fileflag to attach images or documents for the AI to process. - Token Counting: Use the
--countflag to estimate token usage before or during a request. - Google Search Integration: Utilize the
ggsubcommand to leverage real-time information from Google Search within the AI response.
Additional Scenarios
- Git Commit Messages: Pipe
git diffinto@geminifor high-quality, standardized commit messages. - Combined Tools: Pipe outputs from other tools (e.g.,
x wkpfor Wikipedia) into@geminifor specialized analysis. - Official CLI: Access the official Google Gemini CLI via
x gemini cli.
Patterns & Examples
Chat with Image and Text
# Ask Gemini to describe an image file
@gemini --file ./pic.jpg "What is described in this image?"
Translate Files
# Translate multiple local files using Gemini's context
x gemini chat request --file ./abstract.en.md --file ./content.en.md "Translate these to Chinese"
Google Search Integration
# Ask a question and use Google Search for the answer
x gemini gg "What are the latest features in x-cmd?"
Checklist
- Ensure the Gemini API key is configured using
x gemini init. - Verify that attached files (images/documents) exist and are supported formats.
- Confirm the specific model version using
x gemini model lsif needed.
More from x-cmd/skill
x-cmd
|
25x-security
This skill provides comprehensive security assessment and vulnerability management tools through x-cmd CLI, including network reconnaissance with Shodan, vulnerability scanning with OSV, and known exploited vulnerability tracking with KEV. This skill should be used when users need to perform security assessments, vulnerability research, network reconnaissance, or security monitoring from command line interfaces.
13x-network
This skill provides comprehensive network administration and diagnostic tools through x-cmd CLI, including network scanning with Nmap, ARP table management, DNS configuration, routing table analysis, and enhanced ping utilities. This skill should be used when users need to perform network diagnostics, troubleshoot connectivity issues, analyze network topology, or monitor network performance from command line interfaces.
11x-knowledge
This skill provides access to various knowledge search tools through x-cmd CLI, including Hacker News, Wikipedia, DuckDuckGo search, RFC documents, Project Gutenberg books, and Stack Exchange. This skill should be used when users need to search for technical information, browse online knowledge bases, or access documentation from command line interfaces.
6x-git
This skill provides comprehensive Git and code hosting platform management tools through x-cmd CLI, including GitHub, GitLab, Codeberg, Forgejo integration, and Git hooks management. This skill should be used when users need to manage Git repositories, work with code hosting platforms, automate Git workflows, or configure Git hooks from command line interfaces.
6x-system
This skill provides comprehensive system administration and monitoring tools through x-cmd CLI, including process management, macOS system utilities, network configuration, disk health monitoring, and storage analysis. This skill should be used when users need to perform system administration tasks, monitor system performance, manage network configurations, or troubleshoot system issues from command line interfaces.
6