Type a thought directly at your shell prompt — no command, no prefix — and get an answer. If the answer contains shell commands, confirm once and run them.
$ how do I find files bigger than 100MB here
find . -maxdepth 1 -type f -size +100M (rendered, colorized)
This lists files in the current directory only.
Commands found — ↑/↓ to choose, Enter to run, q to cancel:
❯ find . -maxdepth 1 -type f -size +100M
find . -type f -size +100M
➤ Run all of them
✗ Cancel
$ find . -maxdepth 1 -type f -size +100M
./big.iso
The answer is rendered as Markdown (headings, bold, inline code, bullets, and colorized code blocks) when printed to a terminal.
You're in the terminal and need to remember a command. Your options:
- Leave the terminal to Google it, copy, paste back
- Open a new Claude window, ask, copy, paste back
- Open a new terminal tab, run
claude -p "...", copy
With ccline: just type the question where you already are. The answer appears
inline, and if there's a runnable command, one keypress executes it in your live
shell — cd, export, history and all.
It hijacks zsh's command_not_found_handler. When you type something that
isn't a real command, zsh hands the whole line to ccline:
- One word (
gti) → treated as a normal typo:zsh: command not found: gti. - Two or more words → treated as a thought, sent to your LLM CLI. The answer
is rendered as Markdown. Any runnable commands are shown in an arrow-key menu —
↑/↓ to move, Enter to run the highlighted command (or "Run all of
them"), q to cancel. When stdout isn't a terminal (piped/redirected), it
falls back to a typed prompt (
1-N,a=all, Enter=none).
It uses the claude CLI if installed
(preferred), otherwise the codex CLI —
auto-detected. Force one with CCLINE_BACKEND=claude or CCLINE_BACKEND=codex.
Markdown rendering uses glow if it's
installed; otherwise a built-in perl renderer (no extra dependency).
- zsh (the macOS default shell)
- One of these on your
PATH, authenticated:
Homebrew (recommended for macOS):
brew install jianshuo/tap/cclineThen add to ~/.zshrc:
source $(brew --prefix)/share/ccline/ccline.zshOne-line install script:
curl -fsSL https://raw.githubusercontent.com/jianshuo/ccline/v0.2.2/install.sh | bashFrom a clone:
git clone https://github.com/jianshuo/ccline.git
cd ccline && ./install.shThe install script puts ccline in ~/.local/bin, ccline.zsh in ~/.config/ccline/,
and adds one source line to your ~/.zshrc. Re-running it is safe. Then open a
new terminal (or source ~/.zshrc).
CCLINE_BACKEND— force the LLM CLI:claudeorcodex. Default is auto-detect (claude preferred, codex fallback).CCLINE_MODEL— override the model. The claude backend defaults toclaude-sonnet-4-6(fastest end-to-end for these short prompts); set this to use another, e.g.export CCLINE_MODEL=claude-opus-4-8. Passed as--modelto whichever backend is used.
When you trigger ccline by typing at the prompt (the normal path), the chosen
command runs in your live shell — so cd, export, aliases, functions, and
history all work and persist, exactly as if you'd typed it. (ccline writes the
selection to a temp file and the zsh handler evals it.)
Running ccline … directly as a command instead runs the selection in a
subprocess, so shell-state changes like cd won't persist there.
- A bare
*in a thought can glob-expand against the current directory. (A trailing?is handled — the integration setsno_nomatch.) - Single-word thoughts won't reach Claude — by design, so typos stay fast.
rm -f ~/.local/bin/ccline
rm -rf ~/.config/cclineThen remove the # ccline block from ~/.zshrc.
bash tests/test_ccline.sh