yzcode-cli
v1.5.32
Published
YZcode - AI编程助手命令行工具
Downloads
10,365
Readme
YZcode
YZcode - AI 编程助手命令行工具
安装
推荐:使用 bun 安装
# 安装 bun(如果还没安装)
curl -fsSL https://bun.sh/install | bash
# 安装 yzcode
bun install -g yzcode-cli备选:使用 npm 安装
npm install -g yzcode-cli
# 然后需要 bun 运行时
bun yzcode ...注意:由于项目依赖复杂,推荐使用 bun 安装以获得最佳体验。
配置 API Key
首次运行会自动进入配置向导:
yzcode手动配置
方式 1:配置文件
macOS:
mkdir -p ~/Library/Preferences/yzcode-nodejs
cat > ~/Library/Preferences/yzcode-nodejs/config.json << 'EOF'
{
"authToken": "your-api-token",
"baseUrl": "https://open.bigmodel.cn/api/anthropic"
}
EOFLinux:
mkdir -p ~/.config/yzcode-nodejs
cat > ~/.config/yzcode-nodejs/config.json << 'EOF'
{
"authToken": "your-api-token",
"baseUrl": "https://open.bigmodel.cn/api/anthropic"
}
EOF方式 2:环境变量
export ANTHROPIC_AUTH_TOKEN="your-token"
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"使用方法
# 直接运行(交互模式)
yzcode
# 单次提问
yzcode "解释这段代码"API Key 获取
- 智谱 AI: https://open.bigmodel.cn/usercenter/apikeys
- Anthropic: https://console.anthropic.com/
