Screenshot-to-AI assistant for Linux (Wayland). Bind it to a hotkey, select a region of your screen, ask a question, and get an AI-powered answer in a floating window. Like Circle to Search, but for your desktop.
- Press your hotkey
- Select a screen region (using slurp)
- A floating window opens with a preview of your screenshot
- Type a question about what you captured and hit Enter
- The AI streams a response in real-time
- Ask follow-up questions in the same session
git clone https://github.com/cube-oakley/glint.git
cd glint
bash install.shThe installer will:
- Check all dependencies
- Ask which AI provider you want (xAI or OpenRouter)
- Prompt for your API key (or you can add it to the config file later)
- Install Glint to
~/.local/share/glint/ - Add
glintto~/.local/bin/(make sure it's on your PATH)
Hyprland (~/.config/hypr/hyprland.conf):
bind = SUPER SHIFT, S, exec, glintSway (~/.config/sway/config):
bindsym $mod+Shift+s exec glint
Config file: ~/.config/glint/config.toml
[ai]
provider = "xai" # "xai" or "openrouter"
base_url = "https://api.x.ai"
model = "grok-4.20-0309-reasoning"
api_key_env = "XAI_API_KEY"
api_key = "" # Or set directly here
[ui]
show_preview = true
width = 520
height = 640
[screenshot]
tool = "grim"You can store credentials for both providers and switch by changing the provider field:
[ai]
provider = "openrouter" # <-- change this to switch
base_url = "https://openrouter.ai/api"
model = "x-ai/grok-4.20"
api_key_env = "OPENROUTER_API_KEY"
api_key = "sk-or-..."
reasoning = true # Enable reasoning (default: true, OpenRouter only)
[ai.xai]
base_url = "https://api.x.ai"
model = "grok-4.20-0309-reasoning"
api_key_env = "XAI_API_KEY"
api_key = "xai-..."
[ai.openrouter]
base_url = "https://openrouter.ai/api"
model = "x-ai/grok-4.20"
api_key_env = "OPENROUTER_API_KEY"
api_key = "sk-or-..."When provider = "xai", Glint uses the top-level [ai] fields plus any overrides in [ai.xai]. Same for openrouter.
You can provide your API key in three ways (checked in order):
api_keyin the config fileapi_keyin the provider-specific section (e.g.[ai.xai])- Environment variable specified by
api_key_env
System packages:
grim— Wayland screenshot toolslurp— Wayland region selectorpython3(3.11+)python-gobject— PyGObject GTK4 bindingslibadwaita— Adwaita widget librarygtk4
Python packages:
httpx— HTTP client with streaming
Arch Linux:
sudo pacman -S grim slurp python python-gobject libadwaita gtk4
pip install httpxDebian/Ubuntu:
sudo apt install grim slurp python3 python3-gi libadwaita-1-dev libgtk-4-dev
pip install httpxrm -rf ~/.local/share/glint
rm ~/.local/bin/glint
rm -rf ~/.config/glintMIT