安装cc-agent
mkdir -p ~/cc-agent && cd ~/cc-agent
curl -LO https://github.com/xuzhougeng/agent-control/releases/latest/download/cc-agent-linux-amd64
mv cc-agent-linux-amd64 cc-agent
chmod +x cc-agent
./cc-agent -version
使用deepseek配置
# DeepSeek key (cheapest to start; swap providers later)
echo 'sk-xxxxxxxx' > ~/.cc-agent-key && chmod 600 ~/.cc-agent-key
CC_AGENT_API_KEY="$(cat ~/.cc-agent-key)" \
CC_AGENT_BASE_URL="https://api.deepseek.com" \
./cc-agent -provider deepseek -model deepseek-chat \
-cwd ~/cc-agent/yard \
-skills-dir ~/cc-agent/skills.d \
-memory ~/cc-agent/sessions.db
使用方法很简单,就是对话
you> what's the kernel version on this box?
▶ bash {command=uname -r}
✓ exit_code=0 6.6.87.2-microsoft-standard-WSL2
Kernel version: 6.6.87.2-microsoft-standard-WSL2
对于一些危险命令,会有提示,让你解决
you> 用 rm -rf 删除 ~/cc-agent/yard 下所有文件
[approval] rm -rf ~/cc-agent/yard (reason: recursive rm)
approve? [y/N]
对于一些比较的操作,你可以让他沉淀下来。
