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

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.3.tar.gz
  • Upload date:
  • Size: 11.6 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.3.tar.gz
Algorithm Hash digest
SHA256 96f1ba94d18f84027c3cd251a6ab90592f8ee1fe1c5212d99d16b919fea97d37
MD5 3f8b715f17c0a849b78ccb62ab8c1b30
BLAKE2b-256 a225af62cf6d30c479ed7470b9107cf5af7ec82c9e62d50bfe3a250df0f77c40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c3820bf96f7ca892731981d53535141b2c3c6b6c3524604efbb2fe9f2a182e82
MD5 2a94c729af916340c7da95e1356ab82d
BLAKE2b-256 f302414f55ef89ea86c75f54b54ece4522674e0164a6df7d666578a86e0e2ec6

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