Nexevo.aiNexevo.ai
← All examples
Connect Agent / CLI tools

OpenCode(终端 CLI)

OpenCode 是开源 Claude Code 替代品,支持 OpenAI-compat 多 provider 切换。

curl
bash
# 1) 安装(参 OpenCode 官方文档)
# pnpm i -g @opencode/cli   或   curl -fsSL https://opencode.dev/install | sh

# 2) 用 OpenAI provider 切到 Nexevo
export OPENAI_API_KEY="sk-xc-你的-Nexevo-key"
export OPENAI_BASE_URL="https://api.nexevo.ai/v1"

# 也可写到 ~/.opencode/config.toml:
# [provider.openai]
# base_url = "https://api.nexevo.ai/v1"
# api_key  = "sk-xc-..."
# default_model = "nexevo-auto"

# 3) 启动 OpenCode
opencode
# 在 prompt 里 /model nexevo-auto 切默认模型
OpenCode(终端 CLI) — Nexevo Cookbook | Nexevo.ai