A simple but powerful extension for the Gemini CLI that allows you to capture a screenshot and have the AI analyze it immediately.
- Instant Capture: Uses your system's native screenshot tool.
- AI Analysis: Automatically sends the image to Gemini for description or analysis.
- Cross-Platform: Works on macOS and major Linux environments.
Ensure you have one of the following screenshot tools installed on your system:
- macOS:
screencapture(Pre-installed) - Linux:
scrot,gnome-screenshot, orimagemagick(import)
- Ensure you have the Gemini CLI installed.
- Run the following command:
gemini extensions install https://github.com/timsonner/gemini-screenshot-extensionNote: If you are already inside a Gemini CLI session, you may need to exit and restart it for the /screenshot command to appear.
From within Gemini CLI:
/screenshot
Or directly from your terminal:
gemini screenshotThis extension is particularly powerful for front-end developers and creatives:
- UI Implementation: Take a screenshot of a design or a live site and ask: "How would you render this web element using Tailwind CSS?"
- Asset Creation: Capture a UI icon and ask: "Can you recreate this icon as a clean, optimized SVG?"
- Bug Reporting: Snap a visual glitch and ask: "Identify the likely CSS layout issue causing this alignment problem."
- Creative Inspiration: Capture any visual element and use follow-up prompts to brainstorm variations or alternative color palettes.
- The extension triggers your system's screenshot selection tool (e.g., crosshairs appear).
- It saves the captured image to a temporary location.
- It generates a prompt for the Gemini agent including the image path (using the
@syntax). - Gemini analyzes the image within your current session.
To uninstall the extension, run:
gemini extensions remove gemini-screenshot-extensionAlternatively, you can manually delete the extension directory:
rm -rf ~/.gemini/extensions/gemini-screenshot-extension