在Ubuntu中安装 Google Gemini AI 的命令行工具
這是開發者常用的AI編程助手工具。
安裝步驟
- 安裝依賴
1 | sudo apt update |
- 安裝 Node.js(Gemini CLI需要)
1 | curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - |
- 安裝 Gemini CLI
1 | npm install -g @google/gemini-cli |
- 配置API密鑰或使用Google登入
1 | gemini config |
獲取API密鑰:訪問 Google AI Studio 免費申請 (自行申請)
本篇使用Google登入


授權成功

本部落格所有文章除特別聲明外,均採用CC BY-NC-SA 4.0 授權協議。轉載請註明來源 X Workshop|量測自動化 × 嵌入式 × AI 開發實戰!