命令行 shutong

在终端里选模型、流式对话,默认开启平台记忆。单文件、零依赖,需要 Node.js 18 以上。

安装

# macOS / Linux(需要 Node 18 以上)
mkdir -p ~/.shutong ~/.local/bin
curl -fsSL https://shutong.ai/shutong.mjs -o ~/.shutong/shutong.mjs
chmod +x ~/.shutong/shutong.mjs
ln -sf ~/.shutong/shutong.mjs ~/.local/bin/shutong
export PATH="$HOME/.local/bin:$PATH"   # 建议同时写进 ~/.zshrc 或 ~/.bashrc

shutong login   # 填写服务地址 https://shutong.ai 和你的密钥

配置保存在本机 ~/.shutong/config.json,仅当前用户可读。

使用

shutong                                  # 交互对话
shutong "帮我写一条请假消息"                # 问一次就退出
cat error.log | shutong "这段报错是什么原因"  # 把管道内容一起发送
shutong -m qwen-plus "翻译成英文:……"       # 指定模型

对话内命令

/model切换模型
/new开始新会话
/history查看并继续历史会话
/memory开关平台记忆
/help查看帮助
/exit退出