OpenCode
约 118 字小于 1 分钟
2026-02-27
OpenCode
安装 brew install anomalyco/tap/opencode
配置模型 opencode auth loginx
启动 opencode
模型切换 /models
终止对话 Ctrl + C
退出 Ctrl + D
注意
测试终端是否和谷歌连通
curl -I https://generativelanguage.googleapis.com
临时代理配置:
export https_proxy=http://127.0.0.1:7890
export http_proxy=http://127.0.0.1:7890
永久代理配置:
vi ~/.zshrc
alias proxy='export https_proxy=http://127.0.0.1:7890; export http_proxy=http://127.0.0.1:7890; echo "Proxy ON"'
alias unproxy='unset https_proxy; unset http_proxy; echo "Proxy OFF"'
source ~/.zshrc
先输入proxy,再使用opencode
