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.2.tar.gz (11.3 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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 11.3 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.2.tar.gz
Algorithm Hash digest
SHA256 a358c93cd9c1303f5687918cba0fff080ebe83a10912f90479e7c9f0cac7ae22
MD5 aba6f4495888afc946abb1298428ba59
BLAKE2b-256 d0494b7c95bcdfdb03bca6c3ae2150bcb1059dcf0ad9db97a5858d6035bf5c24

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7b177a41b35259e393bb49437d448678661ab5083755e548c4781fd56433d028
MD5 46b6e1bcd70e30f5ee65b938d8afc100
BLAKE2b-256 2f815d81e31819457c5c5d95712bdd756ed952fa6fdc468d40d8b6815399cc67

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