Codex CLI #
ubuntu server 使用 codex cli #
ssh config 配置代理 #
vim ~/.ssh/config
Host hhht-211
HostName 1.180.13.251
User root
IdentityFile ~/.ssh/id_rsa
Port 211
# 代理
RemoteForward 127.0.0.1:1080 127.0.0.1:1080
本地电脑的 127.0.0.1:1080 有 http 代理,可以科学上网(访问 openai codex)
部署配置 #
ssh 登录远程服务器
# apt update
# apt install npm -y
npm i -g @openai/codex
cat << 'EOF' >> ~/.bashrc
alias codex='http_proxy=http://127.0.0.1:1080 https_proxy=http://127.0.0.1:1080 codex'
EOF
. ~/.bashrc
叶王 © 2013-2024 版权所有。如果本文档对你有所帮助,可以请作者喝饮料。