Skip to content

Latest commit

 

History

History
executable file
·
87 lines (59 loc) · 1.45 KB

File metadata and controls

executable file
·
87 lines (59 loc) · 1.45 KB

RustCode 安装指南

方式一:npm 全局安装(仅 TUI)

npm install -g rustcode

这条安装链路只安装 TUI,并会下载当前平台的预编译二进制。 不会打包 GUI / Tauri 桌面版,也不要求本地安装 Rust toolchain。

方式二:直接本地安装

cargo install --path .

安装完成后:

rustcode --help

方式三:先构建再手动拷贝

cargo build --release

产物位置:

  • Linux/macOS: target/release/rustcode
  • Windows: target/release/rustcode.exe

方式四:使用仓库脚本

Linux/macOS:

./scripts/install-linux.sh

Windows:

.\scripts\install-windows.ps1

初始配置

推荐直接启动:

rustcode

首次启动会自动进入全屏 TUI,并在未完成配置时自动弹出 onboarding。

如果你想随时重新进入交互式引导:

rustcode config onboard

手动配置示例:

rustcode config set provider deepseek
rustcode config set api_key "your-api-key"
rustcode config set model deepseek-chat

自定义 provider:

rustcode config set provider custom
rustcode config set protocol anthropic
rustcode config set base_url https://api.example.com
rustcode config set model claude-3-5-sonnet-20241022

fallback:

rustcode config set fallback.enabled true
rustcode config set fallback.chain "deepseek:deepseek-chat,openai:gpt-4.1-mini"