AI Agent Hub
AI エージェント / プラグイン情報メディア
← 一覧へ
Gemini CLI
OTHER

Gemini CLI

Gemini CLI

Google Gemini をターミナルから操作する公式 CLI。コードのリファクタリングや解説、各種ツール呼び出しに対応し、Apache-2.0 で公開されている。

原文: An open-source AI agent that brings the power of Gemini directly into your terminal.
#CLI#公式#Google#ai#ai-agents#cli#gemini#gemini-api#mcp-client#mcp-server
REPO STATS

リポジトリ統計

⭐ Stars
103.3k
🍴 Forks
13.5k
⚠️ Open Issues
2475
🌿 Language
TypeScript
📄 License
Apache-2.0
🕒 最終更新
2026.05.07 (今日)
📅 公開日
2025.04.18
🌿 Branch
main
README

ドキュメント

— AI による自動翻訳 (2026.05.07 更新)

Gemini CLI

Gemini CLI CI Gemini CLI E2E (チェーン) バージョン ライセンス Code Wikiを表示

Gemini CLIスクリーンショット

Gemini CLIは、Geminiの強力な機能をターミナルに直接もたらすオープンソースのAIエージェントです。Geminiへの軽量なアクセスを提供し、プロンプトからモデルまでの最短パスを実現します。

Gemini CLIについてのすべてを、ドキュメントで学ぶことができます。

🚀 なぜGemini CLIなのか?

  • 🎯 無料枠:個人用Googleアカウントで、1分あたり60リクエスト、1日あたり1,000リクエスト。
  • 🧠 強力なGemini 3モデル:改善された推論と100万トークンのコンテキストウィンドウへのアクセス。
  • 🔧 組み込みツール:Google Searchグラウンディング、ファイル操作、シェルコマンド、ウェブ取得。
  • 🔌 拡張可能:カスタム統合のためのMCP(Model Context Protocol)サポート。
  • 💻 ターミナルファースト:コマンドラインで作業する開発者向けに設計。
  • 🛡️ オープンソース:Apache 2.0ライセンス。

📦 インストール

推奨システム仕様と詳細なインストールガイドについては、Gemini CLI のインストール、実行、リリースを参照してください。

クイックインストール

npx で即座に実行

# インストール不要で npx を使用して実行
npx @google/gemini-cli

npm でグローバルにインストール

npm install -g @google/gemini-cli

Homebrew でグローバルにインストール (macOS/Linux)

brew install gemini-cli

MacPorts でグローバルにインストール (macOS)

sudo port install gemini-cli

Anaconda でインストール(制限された環境用)

# 新しい環境を作成して有効化
conda create -y -n gemini_env -c conda-forge nodejs
conda activate gemini_env

# 環境内で npm 経由で Gemini CLI をグローバルにインストール
npm install -g @google/gemini-cli

リリースチャネル

詳細はリリースをご覧ください。

プレビュー

新しいプレビュー リリースは毎週火曜日の UTC 23:59 に公開されます。これらのリリースは完全にテストされていない可能性があり、リグレッションや他の未解決の問題を含む場合があります。preview タグでテストとインストールをお手伝いください。

npm install -g @google/gemini-cli@preview

安定版

  • 新しい安定版リリースは毎週火曜日の UTC 20:00 に公開されます。これは先週の preview リリースの完全なプロモーション + バグ修正と検証になります。latest タグを使用してください。
npm install -g @google/gemini-cli@latest

ナイトリー

  • 新しいリリースは毎日 UTC 00:00 に公開されます。これはリリース時点での main ブランチのすべての変更が含まれます。検証保留中の問題がある可能性があると想定してください。nightly タグを使用してください。
npm install -g @google/gemini-cli@nightly

📋 主な機能

コードの理解と生成

  • 大規模なコードベースをクエリして編集する
  • マルチモーダル機能を使用して PDF、画像、またはスケッチから新しいアプリを生成する
  • 自然言語を使用して問題をデバッグし、トラブルシューティングする

オートメーションと統合

  • プルリクエストのクエリや複雑なリベースの処理など、運用タスクを自動化する
  • MCP サーバーを使用して、Imagen、Veo、または Lyria を使用したメディア生成を含む新しい機能を接続する
  • ワークフロー自動化のためにスクリプトで非対話的に実行する

高度な機能

  • 組み込みのGoogle Search でリアルタイム情報をクエリに組み込む
  • 複雑なセッションを保存および再開するための会話チェックポイント
  • プロジェクトの動作をカスタマイズするためのカスタムコンテキスト ファイル (GEMINI.md)

GitHub 統合

Gemini CLI GitHub Action を使用して、Gemini CLI を GitHub ワークフローに直接統合します:

  • プルリクエスト レビュー:コンテキストに応じたフィードバックと提案を含む自動コード レビュー
  • Issue のトリアージ:コンテンツ分析に基づいた GitHub Issue の自動ラベル付けと優先順位付け
  • オンデマンド サポート:デバッグ、説明、またはタスク委譲のヘルプについては、Issue とプルリクエストで @gemini-cli をメンションしてください
  • カスタム ワークフロー:チームのニーズに合わせてカスタマイズされた自動化、スケジュール、およびオンデマンド ワークフローを構築する

🔐 認証オプション

ニーズに最適な認証方法を選択してください。

オプション 1: Google でサインイン(Google アカウントを使用した OAuth ログイン)

✨ 最適な対象: 個別開発者および Gemini Code Assist ライセンスを持つすべての方。(詳細はクォータ制限とサービス利用規約を参照してください)

メリット:

  • 無料ティア: 1 分あたり 60 リクエスト、1 日あたり 1,000 リクエスト
  • Gemini 3 モデル(1M トークンコンテキストウィンドウ付き)
  • API キー管理不要 - Google アカウントでサインインするだけです
  • 最新モデルへの自動更新

Gemini CLI を起動し、Google でサインインを選択して、プロンプトが表示されたらブラウザ認証フローに従ってください

gemini

組織から提供された有料の Code Assist ライセンスを使用している場合は、Google Cloud Project を設定することを忘れないでください

# Set your Google Cloud Project
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
gemini

オプション 2: Gemini API キー

✨ 最適な対象: 特定のモデル制御または有料ティアアクセスが必要な開発者

メリット:

  • 無料ティア: Gemini 3(flash と pro のミックス)での 1 日あたり 1,000 リクエスト
  • モデル選択: 特定の Gemini モデルを選択できます
  • 使用量ベースの課金: 必要に応じて上限を引き上げるためにアップグレードできます
# Get your key from https://aistudio.google.com/apikey
export GEMINI_API_KEY="YOUR_API_KEY"
gemini

オプション 3: Vertex AI

✨ 最適な対象: エンタープライズチームおよび本番ワークロード

メリット:

  • エンタープライズ機能: 高度なセキュリティとコンプライアンス
  • スケーラブル: 課金アカウント付きの高いレート制限
  • 統合: 既存の Google Cloud インフラストラクチャと連携します
# Get your key from Google Cloud Console
export GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
gemini

Google Workspace アカウントおよびその他の認証方法については、認証ガイドを参照してください。

🚀 はじめに

基本的な使用方法

現在のディレクトリで開始する

gemini

複数のディレクトリを含める

gemini --include-directories ../lib,../docs

特定のモデルを使用する

— GitHub から取得した原文(一部省略の場合あり)

Gemini CLI

Gemini CLI CI Gemini CLI E2E (Chained) Version License View Code Wiki

Gemini CLI Screenshot

Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.

Learn all about Gemini CLI in our documentation.

🚀 Why Gemini CLI?

  • 🎯 Free tier: 60 requests/min and 1,000 requests/day with personal Google account.
  • 🧠 Powerful Gemini 3 models: Access to improved reasoning and 1M token context window.
  • 🔧 Built-in tools: Google Search grounding, file operations, shell commands, web fetching.
  • 🔌 Extensible: MCP (Model Context Protocol) support for custom integrations.
  • 💻 Terminal-first: Designed for developers who live in the command line.
  • 🛡️ Open source: Apache 2.0 licensed.

📦 Installation

See Gemini CLI installation, execution, and releases for recommended system specifications and a detailed installation guide.

Quick Install

Run instantly with npx

# Using npx (no installation required)
npx @google/gemini-cli

Install globally with npm

npm install -g @google/gemini-cli

Install globally with Homebrew (macOS/Linux)

brew install gemini-cli

Install globally with MacPorts (macOS)

sudo port install gemini-cli

Install with Anaconda (for restricted environments)

# Create and activate a new environment
conda create -y -n gemini_env -c conda-forge nodejs
conda activate gemini_env

# Install Gemini CLI globally via npm (inside the environment)
npm install -g @google/gemini-cli

Release Channels

See Releases for more details.

Preview

New preview releases will be published each week at UTC 23:59 on Tuesdays. These releases will not have been fully vetted and may contain regressions or other outstanding issues. Please help us test and install with preview tag.

npm install -g @google/gemini-cli@preview

Stable

  • New stable releases will be published each week at UTC 20:00 on Tuesdays, this will be the full promotion of last week's preview release + any bug fixes and validations. Use latest tag.
npm install -g @google/gemini-cli@latest

Nightly

  • New releases will be published each day at UTC 00:00. This will be all changes from the main branch as represented at time of release. It should be assumed there are pending validations and issues. Use nightly tag.
npm install -g @google/gemini-cli@nightly

📋 Key Features

Code Understanding & Generation

  • Query and edit large codebases
  • Generate new apps from PDFs, images, or sketches using multimodal capabilities
  • Debug issues and troubleshoot with natural language

Automation & Integration

  • Automate operational tasks like querying pull requests or handling complex rebases
  • Use MCP servers to connect new capabilities, including media generation with Imagen, Veo or Lyria
  • Run non-interactively in scripts for workflow automation

Advanced Capabilities

  • Ground your queries with built-in Google Search for real-time information
  • Conversation checkpointing to save and resume complex sessions
  • Custom context files (GEMINI.md) to tailor behavior for your projects

GitHub Integration

Integrate Gemini CLI directly into your GitHub workflows with Gemini CLI GitHub Action:

  • Pull Request Reviews: Automated code review with contextual feedback and suggestions
  • Issue Triage: Automated labeling and prioritization of GitHub issues based on content analysis
  • On-demand Assistance: Mention @gemini-cli in issues and pull requests for help with debugging, explanations, or task delegation
  • Custom Workflows: Build automated, scheduled and on-demand workflows tailored to your team's needs

🔐 Authentication Options

Choose the authentication method that best fits your needs:

Option 1: Sign in with Google (OAuth login using your Google Account)

✨ Best for: Individual developers as well as anyone who has a Gemini Code Assist License. (see quota limits and terms of service for details)

Benefits:

  • Free tier: 60 requests/min and 1,000 requests/day
  • Gemini 3 models with 1M token context window
  • No API key management - just sign in with your Google account
  • Automatic updates to latest models

Start Gemini CLI, then choose Sign in with Google and follow the browser authentication flow when prompted

gemini

If you are using a paid Code Assist License from your organization, remember to set the Google Cloud Project

# Set your Google Cloud Project
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
gemini

Option 2: Gemini API Key

✨ Best for: Developers who need specific model control or paid tier access

Benefits:

  • Free tier: 1000 requests/day with Gemini 3 (mix of flash and pro)
  • Model selection: Choose specific Gemini models
  • Usage-based billing: Upgrade for higher limits when needed
# Get your key from https://aistudio.google.com/apikey
export GEMINI_API_KEY="YOUR_API_KEY"
gemini

Option 3: Vertex AI

✨ Best for: Enterprise teams and production workloads

Benefits:

  • Enterprise features: Advanced security and compliance
  • Scalable: Higher rate limits with billing account
  • Integration: Works with existing Google Cloud infrastructure
# Get your key from Google Cloud Console
export GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
gemini

For Google Workspace accounts and other authentication methods, see the authentication guide.

🚀 Getting Started

Basic Usage

Start in current directory

gemini

Include multiple directories

gemini --include-directories ../lib,../docs