项目地址
https://github.com/jianshuo/ccline
类别
Shell
项目标题
ccline——在 zsh 命令行直接输入自然语言,获得 AI 回答并一键执行命令
项目描述
ccline 劫持了 zsh 的 command_not_found_handler:当你在终端输入的不是命令而是一句话,它会自动调用 Claude 或 Codex 获取回答,渲染成 Markdown 输出。如果回答里有 shell 命令,会弹出交互式菜单,用方向键选择后按 Enter 直接在当前 shell 执行(cd、export 等也能生效)。
$ how do I find files bigger than 100MB here
find . -maxdepth 1 -type f -size +100M
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
一行安装:curl -fsSL https://raw.githubusercontent.com/jianshuo/ccline/v0.2.2/install.sh | bash
亮点
- 无感接入:不需要新开窗口、不需要前缀,在日常工作的终端里直接问问题
- 零依赖:只需要 zsh + claude CLI 或 codex CLI(自动检测,claude 优先)
- 命令可执行:选中的命令在 live shell 里运行,
cd 等状态变更会真正生效
- 单词不触发:输入一个单词(打错命令)当普通 typo 处理,不消耗 API
项目地址
https://github.com/jianshuo/ccline
类别
Shell
项目标题
ccline——在 zsh 命令行直接输入自然语言,获得 AI 回答并一键执行命令
项目描述
ccline 劫持了 zsh 的
command_not_found_handler:当你在终端输入的不是命令而是一句话,它会自动调用 Claude 或 Codex 获取回答,渲染成 Markdown 输出。如果回答里有 shell 命令,会弹出交互式菜单,用方向键选择后按 Enter 直接在当前 shell 执行(cd、export等也能生效)。一行安装:
curl -fsSL https://raw.githubusercontent.com/jianshuo/ccline/v0.2.2/install.sh | bash亮点
cd等状态变更会真正生效