Type a thought directly at the prompt — no command, no prefix. ccline sends it to Claude or Codex, renders the answer as Markdown, and lets you run any suggested command in your live shell.
curl -fsSL https://raw.githubusercontent.com/jianshuo/ccline/v0.2.2/install.sh | bash
How it works
command_not_found_handlerWhen zsh can't find a command, ccline intercepts. One word? Normal "command not found" — fast. Two or more words? Sent straight to your LLM CLI.
Uses glow for beautiful Markdown rendering if installed. Falls back to a built-in perl renderer with no extra dependency required.
Any shell commands in the answer appear in an arrow-key menu. Hit Enter to run, q to cancel — or run all of them at once.
The command executes via eval in your actual shell session — so cd, export, aliases, and history all persist exactly as if you typed it.
Features
Single-word inputs (gti) still show the normal "command not found" message instantly — no LLM roundtrip, no latency.
Prefers claude if installed. Falls back to codex automatically. Override anytime with CCLINE_BACKEND.
Headings, bold, inline code, bullets, colorized code blocks — rendered with glow or a zero-dependency perl fallback.
cd, export, aliases, functions — everything persists. The selected command runs via eval, not a subprocess.
Commands extracted from the answer appear in an interactive menu. ↑/↓ to choose, Enter to run, q to cancel, or run them all.
Puts ccline in ~/.local/bin, sources automatically from ~/.zshrc. Uninstall by removing two paths.
Requirements
The default shell on macOS. ccline hooks into zsh's command_not_found_handler — no other shells supported.
claude CLI (preferred) or codex CLI — authenticated and on your PATH. ccline auto-detects which one to use.
glow for beautiful terminal Markdown rendering. If not installed, a built-in perl renderer handles it — no extra dep needed.
Configuration
claude or codex. Default is auto-detect (claude preferred, codex fallback).claude-opus-4-8. Passed as --model to whichever backend is active.The claude backend defaults to claude-sonnet-4-6 — the fastest model for short interactive prompts.
No config file. No JSON. Just set env vars in your ~/.zshrc before the source line.
Re-running the install script is safe — it won't duplicate the source line.
One command. Works immediately. No config required.