gemini-cli 安装使用

Claude code 收费
要么用claude code router改成其他llm模型
要么暂时用gemini-cli
需要上网环境

  1. 官方github
  2. 确保node版本在20以上 nodejs
  3. 安装命令
npx https://github.com/google-gemini/gemini-cli

或者

npm install -g @google/gemini-cli

环境配置Proxy
C:\Users\Admin
这里admin是用户文件夹,一般是你用户名
创建.env文件

GEMINI_API_KEY=your_api_key
http_proxy=http://localhost:10808
https_proxy=http://localhost:10808
  1. your_api_key换成你aistudio上的key
  2. 配置proxy或者开启tun模式

到项目下面命令行运行

gemini

选择google登录或者apikey模式,这里我们使用的是apikey模式
在这里插入图片描述

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐