Keys: Prompt Hotkey CLI
keys is a lightweight CLI tool that binds system-wide hotkeys to prompts and dispatches them to LLM CLIs or other tools. Perfect for rapid text transformation workflows.
Quick Start
# Set your prompts directory (e.g., markdown files with prompts)
keys prompts ~/my-prompts
# Register a hotkey
keys add ctrl+shift+f fix.md
# List your keys
keys list
# Show a prompt or pipe text through it
keys show fix.md
echo "bad code" | keys show fix.md
Installation
pip install keys-cli
Or with poetry:
poetry add keys-cli
Setup
-
Create a prompts directory with markdown files:
~/my-prompts/ ├── fix.md ├── commit.md └── refactor.md -
Set the prompts directory:
keys prompts ~/my-prompts
-
Register hotkeys:
keys add ctrl+shift+f fix.md keys add cmd+shift+j commit.md # macOS keys add win+alt+r refactor.md # Windows
-
Start the daemon:
keys start -
Use your hotkeys - select text anywhere and press your key combination. The text gets piped to your prompt and the result goes to clipboard.
Commands
keys prompts <path> # Set prompts directory
keys add <key> <prompt_name> # Register a hotkey
keys list # Show all hotkeys
keys remove <key> # Unregister a hotkey
keys show <prompt_name> # Display prompt content or pipe input
keys start # Start the hotkey daemon
keys stop # Stop the daemon
Key Combinations
Supports: ctrl, shift, alt, cmd (macOS), win (Windows), option (macOS = alt)
Examples:
ctrl+shift+f- All platformscmd+shift+j- macOSwin+alt+x- Windowsoption+shift+k- macOS (option = alt)
Prompt Files
Create simple markdown files with your prompt templates:
fix.md:
Fix the syntax errors in this code:
commit.md:
Generate a conventional commit message for this code change:
The text you select or pipe will be appended to the prompt.
How It Works
Daemon Mode (Primary)
- Run
keys startin the background - Select text anywhere on your system
- Press your registered hotkey
- Selected text + prompt gets sent to
claudeCLI - Result copied to clipboard
CLI Mode (Secondary)
Pipe text through prompts directly:
echo "def foo( ): return 1" | keys show fix.md
Configuration
Config file: ~/.keys/config.yaml
prompts_dir: ~/my-prompts
hotkeys:
ctrl+shift+f: fix.md
cmd+shift+j: commit.md
That's it. No targets, no actions, no bloat.
Requirements
- Python 3.10+
- For clipboard support on Linux:
xcliporxsel - A CLI tool that accepts piped input (e.g.,
claude,gpt-cli)
Why Keys?
- Simple - Just prompts + hotkeys. No complex config.
- Fast - Pure functions, minimal overhead.
- Flexible - Works with any CLI tool, any text editor.
- Cross-platform - macOS, Linux, Windows support.
License
MIT
Release files for keys-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keys_cli-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keys_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / keys_cli-0.1.0.tar.gz
| Download URL | keys_cli-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5087684b22ccce5418aaf5d6249567b1711e280a374787a2ef09f84aaafb10f
|
|
BLAKE2b-256 checksum How to use checksums |
ceade058c3985d4d9f7dd35f12fa93b59aeed5971038face57fb0e4e05ec3402
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0
|
Release files / keys_cli-0.1.0-py3-none-any.whl
| Download URL | keys_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad8cf65c3cc5339d334d00b842a15c4b620f702bcb94904a1fe7758189418fd7
|
|
BLAKE2b-256 checksum How to use checksums |
6d62c670a56769ecbdaedb1e09788e36eef0db6186da8e6c00f1286a0a7548d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0
|