S04: Command Interface 命令接口
"The command line is the artist's brush" -- 命令行是艺术家的画笔。
🎯 问题
如何设计一个既强大又易用的命令行接口?
💡 CLI 架构
# 基本用法
claude [prompt] [options]
# 交互模式
claude
# 管道模式
echo "fix bugs" | claude -p
# 指定模型
claude --model claude-sonnet-4-6
🔑 核心选项
-p, --print | 管道模式输出 |
-d, --debug | 调试模式 |
--model | 指定模型 |
-c, --continue | 继续上次会话 |
-r, --resume | 恢复会话 |