A command-line tool for analyzing images using OpenRouter API with multimodal models.
3G-CLI Suite: Glean (text analysis) | Glimpse (image analysis) | Graft (image generation and editing)
- Clone this repository
- Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt
Create a ~/.glimpse_cfg file in your home directory with the following format:
[openrouter]
# Required setting
api_key = your_api_key_here
# Optional settings (defaults shown)
model = google/gemini-2.5-flash
temperature = 0.4 # Controls randomness (0.0 to 1.0, lower is more deterministic)Only the API key is mandatory. If model or temperature are not specified, default values will be used.
./glimpse.py path/to/image.jpg
With a custom prompt:
./glimpse.py path/to/image.png --prompt "Identify all objects in this image"
Override the model (instead of using the one from .env):
./glimpse.py path/to/image.jpg --model mistralai/mistral-medium-3
Override the temperature setting:
./glimpse.py path/to/image.jpg --temperature 0.8
Combining options:
./glimpse.py path/to/image.jpg -m openai/o4-mini -t 0.2 -p "What brand is this?"
Or using the short form:
./glimpse.py path/to/image.jpg -p "What's happening in this scene?"
- JPEG/JPG
- PNG