Skip to main content

Ctrl+Space AI search bar for Linux — 200+ models via OpenCode, slash commands, frameless overlay

Project description

Spotlight AI

A macOS Spotlight-style AI search bar for Linux — press Ctrl+Space, ask anything, get answers inline. Powered by OpenCode CLI with 200+ free and paid models.

demo


What it looks like

  • Frameless dark glass bar appears at the center of your screen
  • Type your question, press Enter
  • Answer streams in below — window expands smoothly
  • Press Esc to dismiss

Features

  • Global hotkey Ctrl+Space — works system-wide via GNOME shortcut
  • 200+ models via OpenCode — DeepSeek, Gemini, Claude, Qwen, Kimi, GLM, and more
  • Slash commands to switch models on the fly
  • Persistent model config saved to ~/.spotlight/config.json
  • Zero latency UI — shows "thinking..." instantly, answer appears when ready
  • Draggable — click and drag anywhere on the bar to reposition

Slash Commands

/help                     show all commands
/model                    show currently active model
/models                   list all available models (fetched live from opencode)

/<model-alias>            switch model
/<model-alias> <prompt>   switch model AND run prompt immediately

Examples

/gemini-2.5-flash
/deepseek-v4-flash-free explain async/await in 3 lines
/kimi-k2-instruct
/claude-sonnet-4.6 write a regex for email validation

Aliases are auto-generated from model IDs — the last path segment in lowercase. No hardcoded list. When OpenCode adds new models, they appear automatically.


Setup

1. Install dependencies

# OpenCode CLI
curl -fsSL https://opencode.ai/install | bash

# Python deps
pip install PyQt5

2. Clone

git clone https://github.com/santhoshkammari/spotlight.git
cd spotlight

3. Register Ctrl+Space hotkey (GNOME)

# Creates a GNOME custom shortcut
SCRIPT_PATH="$(pwd)/app.py"
PYTHON_PATH="$(which python3)"

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings \
  "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"

gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ \
  name 'Spotlight AI'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ \
  command "$PYTHON_PATH $SCRIPT_PATH"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ \
  binding '<Control>space'

4. Press Ctrl+Space


How it works

Ctrl+Space
    └─▶ app.py launches PyQt5 window
            └─▶ on Enter: opencode run --format json -m <model> "<prompt>"
                    └─▶ streams JSON events → extracts text → displays in UI

Slash commands are parsed before sending to OpenCode. Model state persists in ~/.spotlight/config.json.


Files

app.py        entry point
ui.py         PyQt5 window — search bar + result area + animations
opencode.py   subprocess wrapper around opencode CLI
slash.py      slash command parser — dynamic model list, persistent config

Requirements

  • Linux with GNOME (or any WM — hotkey setup differs)
  • Python 3.10+
  • PyQt5
  • OpenCode CLI

Why not just use the terminal?

Because Ctrl+Space → type → read is 5x faster than switching to a terminal, typing a long command, and scrolling through output. This stays on top, answers inline, and disappears with Esc.


Built with OpenCode + PyQt5. Inspired by macOS Spotlight and Raycast.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotlight_ai-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotlight_ai-0.1.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file spotlight_ai-0.1.1.tar.gz.

File metadata

  • Download URL: spotlight_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for spotlight_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eff291c126da77e556a49068b15839fe311efc4fdf523e6f2adffd18bdffeaa7
MD5 ae341e836f4bb7093b000c9d4b60d780
BLAKE2b-256 7be0afeedae394a6f883e78b77905acde21d406bc2f52216407b76144bfe22c5

See more details on using hashes here.

File details

Details for the file spotlight_ai-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: spotlight_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for spotlight_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d7adcdef4971418178c61319adf8c91fd7796f253d1b62361a911aeadbd9678
MD5 b3f56670149eb156f3c81042a5612d90
BLAKE2b-256 dc0dc68d7fa90ea06bbf3cd44e13ac99975e59436acaaeb8353dc8e23ea2f263

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page