貢献ガイド

このプロジェクトへのパッチと貢献を喜んで受け入れます。始め方と最初の貢献の仕方を学びましょう。

始める前に

貢献前の重要な要件

Sign the CLA

Contributions must be accompanied by a Contributor License Agreement (CLA). You retain the copyright to your contribution.

Sign the CLA →

Community Guidelines

This project follows Google's Open Source Community Guidelines. Please review them before contributing.

Read Guidelines →

貢献方法

Gemini CLIプロジェクトに貢献する方法はたくさんあります

コード貢献

Fix bugs, add features, improve performance

  • バグ修正とパッチ
  • 新しいCLIコマンド
  • パフォーマンス最適化
  • コードリファクタリング
  • テスト改善
  • エラーハンドリング強化

ドキュメント

Improve docs, add examples, create tutorials

  • ドキュメントエラーの修正
  • 使用例の追加
  • APIドキュメントの改善
  • チュートリアルとガイドの作成
  • READMEファイルの更新
  • コードコメントの追加

問題報告

Report bugs, suggest features, provide feedback

  • 再現手順付きのバグレポート
  • 機能リクエストと提案
  • パフォーマンス問題レポート
  • セキュリティ脆弱性レポート
  • ユーザーエクスペリエンスフィードバック
  • 互換性問題

コミュニティサポート

Help users, participate in discussions

  • Issueでの質問回答
  • トラブルシューティングの支援
  • Pull Requestのレビュー
  • ベータ版のテスト
  • 使用例の共有
  • 新しい貢献者の指導

Pull Requestガイドライン

これらのガイドラインに従って、PRの迅速なレビューとマージにご協力ください

1

既存のIssueにリンク

All PRs should be linked to an existing issue. For bug fixes, link to the bug report. For features, link to an approved feature request.

2

小さく集中的に保つ

Create small, atomic PRs that address a single issue. Don't bundle multiple unrelated changes.

3

進行中の作業にはドラフトPRを使用

Use GitHub's Draft Pull Request feature for early feedback before formal review.

4

すべてのチェックが通ることを確認

Run npm run preflight before submitting to ensure all tests, linting, and style checks pass.

5

ドキュメントを更新

If your PR introduces user-facing changes, update the relevant documentation in the /docs directory.

6

明確なコミットメッセージを書く

Follow Conventional Commits standard for your commit messages and PR descriptions.

開発環境セットアップ

開発環境をセットアップするためのステップバイステップガイド

1

前提条件

Set up your development environment

# Install Node.js ~20.19.0 (required for development)
# Use nvm to manage Node.js versions
nvm install 20.19.0
nvm use 20.19.0
2

Clone and Setup

Get the source code and install dependencies

git clone https://github.com/google-gemini/gemini-cli.git
cd gemini-cli
npm install
npm run build
3

Enable Sandboxing (Optional)

Set up sandboxing for enhanced security

# Add to your ~/.env file
echo "GEMINI_SANDBOX=true" >> ~/.env
# Build with sandbox container
npm run build:all
4

Run and Test

Start the CLI and run tests

# Start Gemini CLI from source
npm start
# Run all tests
npm run test
# Run integration tests
npm run test:e2e
5

Quality Checks

Ensure code quality before submitting

# Run all quality checks
npm run preflight
# Format code
npm run format
# Lint code
npm run lint

デバッグとテスト

貢献をデバッグ・テストするためのツールと技術

VS Code デバッグ

VS CodeでF5またはデバッグ設定を使用してCLIを対話的にデバッグします。

# デバッグモードで開始
npm run debug

# またはVS Code F5キーを使用
# "Attach"設定で

React DevTools

React DevTools 4.xを使用してCLIのReactベースUIをデバッグします。

# 開発モードで開始
DEV=true npm start

# React DevToolsをインストール
npm install -g react-devtools@4.28.5
react-devtools

サンドボックスデバッグ

セキュリティ関連の開発のためにサンドボックスコンテナ内でデバッグします。

# サンドボックス内でデバッグ
DEBUG=1 gemini

# サンドボックスデバッグを有効化
GEMINI_SANDBOX=true npm start

テストの種類

変更が正しく動作することを確認するために、さまざまな種類のテストを実行します。

# ユニットテスト
npm run test

# 統合テスト
npm run test:e2e

# すべての品質チェック
npm run preflight

貢献する準備はできましたか?

これらのリソースで貢献の旅を始めましょう

追加リソース

貢献者向けの有用なリンクとドキュメント

アーキテクチャドキュメント

プロジェクトの構造とアーキテクチャについて学ぶ

アーキテクチャを読む →

統合テスト

統合テストフレームワークについて学ぶ

テストガイド →

AI開発

AI支援開発のガイドライン

GEMINI.md →