← all repositories
jasonjmcghee/plock

Your LLM, now living in every text field

A system-wide hotkey that replaces selected text with streaming script output, no browser required.

plock
Velocity · 7d
+0.6
★ / day
Trend
steady
star history

What it does

Plock is a background utility (Rust + Tauri) that hijacks your keyboard: select text anywhere you can type, hit a shortcut, and watch it get replaced by live output from a shell script or local LLM. A second shortcut feeds your clipboard as context. It streams token-by-token, not paste-and-pray.

The interesting bit

The author isn’t hard-coding “ask ChatGPT.” He’s built a trigger engine: shortcuts fire processes (Ollama, bash scripts, whatever) with prompts that interpolate $SELECTION, $CLIPBOARD, or custom env vars, then chain “next steps”—stream to screen, save to variable, trigger another job. It’s RPA for developers, disguised as a text expander.

Key highlights

  • 100% local by default (Ollama); API calls are opt-in via user-provided shell scripts
  • Cross-platform shortcuts: Cmd/Ctrl+Shift+. for replace, Cmd/Ctrl+Shift+/ for context-aware replace
  • Configurable via settings.json with process lists, prompt templates, and multi-step chains
  • Escape key stops streaming mid-generation
  • Windows and Linux support exists but is explicitly marked untested

Caveats

  • OCR screenshot feature is half-baked: author admits rusty-tesseract disappointed and left it buried
  • Linux needs X11 libs and tray icon extras; Windows can’t use Ollama yet (no Windows build)
  • Project is a solo effort actively begging for contributors

Verdict

Grab this if you live in text editors, terminals, and Slack and want LLM assistance without context-switching. Skip it if you need polished Windows support or aren’t willing to hand-edit JSON to wire up your workflows.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.