ccli-prompt
Cursor's Cmd+K inline prompt, but for your zsh terminal.
Press Cmd+K at your prompt, type what you want ("kill port 9090", "find files bigger than 100mb", "tar this folder"), hit Enter, and a ready-to-run shell command lands on your command line. Review it, Enter to run it.
Fast because there's no claude CLI boot per call: a tiny Python daemon runs in the background, holds one open HTTPS connection to api.anthropic.com, and reuses the OAuth token you already have from Claude Code (or a plain Anthropic API key). Typical latency: ~500 ms on warm connection + Haiku inference.
Install
pipx install ccli-prompt # recommended (isolated venv)
# or: pip install ccli-prompt
ccli-prompt install # runs the interactive wizard (auth + model pick)
The wizard:
- Authentication — auto-discover from Claude Code credentials, or paste a key (accepts both
sk-ant-api03-...andsk-ant-oat01-...). - Model — lists live models from
/v1/models. Haiku 4.5 is the default.
Requirements: macOS or Linux, zsh 5.x+, Python 3.10+. The daemon has zero dependencies (stdlib only).
Trigger it
Two ways — pick either:
Esc then K — works immediately, no terminal config needed. Press Esc, then K (sequence, not chord).
Cmd+K / Ctrl+K — remap it in your terminal to send ESC+k:
| Terminal | How |
|---|---|
| iTerm2 | Settings → Profiles → Keys → + · Shortcut ⌘K · Action Send Escape Sequence · Esc+: k |
| Terminal.app | Settings → Profiles → Keyboard → + · ⌘ + K · Send Text · Ctrl+V then Esc, then k |
| Ghostty | keybind = cmd+k=text:\x1bk in ~/.config/ghostty/config |
| Warp | Settings → Keyboard → bind ⌘K → Send Text · \x1bk |
| Alacritty | [[keyboard.bindings]] with key = "K", mods = "Control", chars = "\u001bk" |
| Kitty | map ctrl+k send_text all \x1bk in ~/.config/kitty/kitty.conf |
| WezTerm | {key="k", mods="CTRL", action=wezterm.action.SendString("\x1bk")} |
How it works
ccli-prompt install— copies a zsh widget to~/.ccli-prompt/ccli.zsh, appends asourceline to your~/.zshrc, and runs the wizard.- The widget (bound to
^[k— what Esc+K and remapped Cmd+K send) reads your query viaread-from-minibuffer, sends it over a Unix socket to the daemon, and places the response into$BUFFERso nothing runs until you press Enter. - The daemon (
python3 -m ccli_prompt.daemon, auto-spawned on first use) reads auth from: env var →~/.ccli-prompt/config→ macOS Keychain →~/.claude/.credentials.json. It opens oneHTTPSConnectiontoapi.anthropic.comand keeps it warm, POSTs to/v1/messages(Bearer+OAuth-beta orx-api-keydepending on token prefix), caches the system prompt, and exits after 30 minutes of idleness.
Configuration
Environment variables (override the config file; set in ~/.zshrc before the source line):
export ANTHROPIC_API_KEY="sk-ant-..." # API key or OAuth token
export CCLI_MODEL="claude-haiku-4-5"
export CCLI_MAX_TOKENS=400
export CCLI_IDLE_TIMEOUT=1800
export CCLI_SYSTEM_PROMPT_FILE="$HOME/.ccli-prompt/prompt.md"
Re-run the wizard at any time: ccli-prompt configure.
Edit the system prompt at ~/.ccli-prompt/prompt.md (copied from the package on install).
Manual daemon control
# status
[[ -S /tmp/ccli-$USER.sock ]] && echo "running" || echo "not running"
# stop
pkill -f ccli_prompt.daemon; rm -f /tmp/ccli-$USER.sock
# start manually (normally auto-starts on first Cmd+K)
python3 -m ccli_prompt.daemon &
Safety
- Daemon's Unix socket is
0600, scoped to your user. - Responses only land in
$BUFFER— nothing executes until you press Enter. - The default system prompt refuses destructive commands (
rm -rf /,dd, disk formatting, force-push tomain, etc.) unless you request them in those exact terms.
Uninstall
ccli-prompt uninstall
pipx uninstall ccli-prompt # or: pip uninstall ccli-prompt
License
MIT
Metadata
Release files for ccli-prompt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ccli_prompt-0.1.1.tar.gz | 13.1 kB | With provenance | Details for ccli_prompt-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ccli_prompt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ccli_prompt-0.1.1-py3-none-any.whl |
Total release size: 29.7 kB
Release files / ccli_prompt-0.1.1.tar.gz
| Download URL | ccli_prompt-0.1.1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19ad16c87d2c5d953cdb8368c3205156d612d29e1988e5c88578301d73ea21cf
|
|
BLAKE2b-256 checksum How to use checksums |
491cf754dd8e7635ac6182ca23e866ed74ffc6ebac721982ae5cc8c7dfbf386d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2026.
Transparency logRelease files / ccli_prompt-0.1.1-py3-none-any.whl
| Download URL | ccli_prompt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bacdb4b9bbaa00cc36d5117cf285e2100e01e5ae3c69fd779f2db874993e926
|
|
BLAKE2b-256 checksum How to use checksums |
b071efa066e527f534280c6dbc8ed914522d61fe89cfe4d67a24efdd54824518
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2026.
Transparency logSecurity for ccli-prompt 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ccli_prompt-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.