8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gemini CLIとAntigravityのGEMINI.mdを使い分ける

8
Posted at

はじめに

Gemini CLIAntigravityを併用していると両ツールともに~/.gemini/GEMINI.mdを読み込んでいるため、例えばGemini CLIで使うSubagentsの設定などを書いているとAntigravity側で不要な場面でも使用してしまいます。そこでGemini CLIとAntigravityでGEMINI.mdを使い分ける方法を書いていきます。

環境

Gemini CLI:0.36.0
Google Antigravity:1.107.0

手順

  • 読み込むコンテキストファイル名を定義する
  • Gemini CLI側のコンテキストファイル名を変更する
  • Antigravity用のGEMINI.mdを用意する

読み込むコンテキストファイル名を定義する

Gemini CLIが読み込むコンテキストファイル名は~/.gemini/setting.jsonで定義できるので、以下の内容を追記します。※今回はAGENTS.mdとしています。

{
  "context": {
    "fileName": ["AGENTS.md"]
  }
}

Gemini CLI側のコンテキストファイル名を変更する

~/.gemini/setting.jsonに記載した内容通りにコンテキストファイル名を変更します。

~/.gemini/AGENTS.md

Antigravity用のGEMINI.mdを準備する

こちらの準備方法は自由で良いのですが、自分は元々のGEMINI.mdをコピーしてAntigravityにも使える部分だけ残しました。

以上

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?