zsh plugin · v0.2.2

Ask your shell
anything.

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.

One-line install
$ curl -fsSL https://raw.githubusercontent.com/jianshuo/ccline/v0.2.2/install.sh | bash
Requires claude or codex CLI · macOS / zsh · MIT license
~ / projects / myapp

One handler.
Infinite answers.

01

Hijacks command_not_found_handler

When 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.

02

Renders the answer

Uses glow for beautiful Markdown rendering if installed. Falls back to a built-in perl renderer with no extra dependency required.

03

Pick a command to run

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.

04

Runs in your live shell

The command executes via eval in your actual shell session — so cd, export, aliases, and history all persist exactly as if you typed it.

Signal flow
⌨️
You type at the prompt Two or more words, not a real command
🔀
zsh command_not_found_handler ccline intercepts the call
🤖
claude or codex CLI Auto-detected, or set CCLINE_BACKEND
📋
Markdown-rendered answer glow or built-in perl renderer
▶️
eval in your live shell cd, export, aliases persist

Designed to stay
out of your way.

Zero overhead for typos

Single-word inputs (gti) still show the normal "command not found" message instantly — no LLM roundtrip, no latency.

🔌

Auto-detects your CLI

Prefers claude if installed. Falls back to codex automatically. Override anytime with CCLINE_BACKEND.

🖥️

Beautiful Markdown output

Headings, bold, inline code, bullets, colorized code blocks — rendered with glow or a zero-dependency perl fallback.

🏠

Runs in your live shell

cd, export, aliases, functions — everything persists. The selected command runs via eval, not a subprocess.

🎯

Arrow-key command picker

Commands extracted from the answer appear in an interactive menu. ↑/↓ to choose, Enter to run, q to cancel, or run them all.

🔧

One-line install & uninstall

Puts ccline in ~/.local/bin, sources automatically from ~/.zshrc. Uninstall by removing two paths.

What you need
to get started.

Required

zsh

The default shell on macOS. ccline hooks into zsh's command_not_found_handler — no other shells supported.

Required — pick one

claude or codex

claude CLI (preferred) or codex CLI — authenticated and on your PATH. ccline auto-detects which one to use.

Optional

glow

glow for beautiful terminal Markdown rendering. If not installed, a built-in perl renderer handles it — no extra dep needed.

Two env vars.
That's it.

CCLINE_BACKEND
Force the LLM CLI: claude or codex. Default is auto-detect (claude preferred, codex fallback).
CCLINE_MODEL
Override the model, e.g. claude-opus-4-8. Passed as --model to whichever backend is active.

Sensible defaults

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.

Start asking
your shell.

One command. Works immediately. No config required.

View on GitHub Copy install command