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

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 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.0.tar.gz
Algorithm Hash digest
SHA256 4cd765611ee22709a3c9a2e131d62e00edd34b277e6dd896a1d5f56de125b329
MD5 b71256dd889cb60a67af879b96ae1650
BLAKE2b-256 cc04eed56cc6116f2ab822a12801805ac6a6fc0f2400da69ce728327b0769d3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotlight_ai-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce11bdab5a8ca6ac57d3dccf8f35c3f140da702f110480e339b42bdabaa2c5e9
MD5 7a35d0499bb99ea641100e803a237bba
BLAKE2b-256 d7df3c94724e5bee994aa84ee371f78b447538dad8066611127fe42802e59859

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