こんにちは、たねやつです。
Google製のAIチャットCLIツールであるgemini-cliの新しいバージョン、v0.4.0がリリースされました。
このアップデートでは、セキュリティ機能の強化、CLIの使いやすさの向上、UI/UXの改善など、多くの新機能や改善、バグ修正が含まれています。
この記事では、gemini-cli v0.4.0の主な変更点を、リリースノートを元に詳しく解説していきます。
この記事でわかること
gemini-cliv0.4.0 の新機能gemini-cliv0.4.0 での改善点gemini-cliv0.4.0 で修正されたバグ
主な変更点
信頼性(Trust)機能の強化
セキュリティと信頼性に関する多くの修正と改善が行われました。作業ディレクトリや拡張機能の読み込み元が信頼できるかどうかを検証する機能が強化されています。
- 信頼できないソースからの
process.cwd()の読み込みを拒否fix(trust): Refuse to load from untrusted process.cwd() sources; Add tests by @richieforeman in #7323
- 信頼できないワークスペースからの拡張機能の読み込みを拒否
fix(trust): Refuse to load extensions from untrusted workspaces by @richieforeman in #7342
useFolderTrustが有効な場合、信頼できないディレクトリからのコマンドを無効化Fix(trust) - Disable commands from untrusted directories when useFolderTrust is enabled by @shishu314 in #7341
- 信頼できないフォルダでのMCPサーバー接続をスキップ
Skip MCP server connections in untrusted folders by @shrutip90 in #7358
GEMINI.mdを読む際にフォルダの信頼設定を尊重fix(trust): Respect folder trust setting when reading GEMINI.md by @richieforeman in #7409
- フォルダ信頼の確認時に親フォルダ名を表示
fix: show parent name in trust folder confirmation by @hritan in #7331
- フォルダ信頼設定の変更時に
gemini-cliを再起動Fix(Cli) - Restart gemini cli on folder trust settings changes by @shishu314 in #7413
- FolderTrust機能フラグを削除
Fix(cli) - Remove Foldertrust Feature Flag by @shishu314 in #7420
- IDE内でVSCodeワークスペースの信頼設定をGemini CLIの信頼設定で上書き
Override Gemini CLI trust with VScode workspace trust when in IDE by @shrutip90 in #7433
CLIの使いやすさ向上
CLIとしての利便性を高めるための機能追加や改善が行われています。
- コマンドのあいまい一致(fuzzy matching)機能を追加
fzfを直接の依存関係として追加し、コマンド入力の際に柔軟な検索が可能になりました。feat(cli): add fuzzy matching for command suggestions by @dracic in #6633
fix(deps): Add fzf as a direct dependency to CLI by @mattKorwel in #7658
--session-summaryフラグを追加- セッションの要約を表示するためのフラグが追加されました。
feat: Add a --session-summary flag by @leehagoodjames in #7347
Ctrl+Backspaceによる単語削除をサポートfeat(cli): Add support for Ctrl+Backspace to delete a word backward by @davideast in #7162
- 新しいバージョンの通知と更新機能
- 拡張機能に新しいバージョンがある場合にユーザーに通知し、更新を促す機能が追加されました。
feat(extension) - Notify users when there is a new version and update it by @shishu314 in #7408
- プロンプトの引数を位置引数として追加
feat: Add positional argument for prompt by @allenhutchison in #7668
- 冗長なCLIフラグを非推奨に
feat(cli): deprecate redundant CLI flags by @allenhutchison in #7360
/clearコマンド実行後も入力履歴を保持fix(cli): preserve input history after /clear command by @flowernotfound in #5890
UI/UXの改善
ユーザー体験を向上させるためのUI改善が行われています。
- 引用(Citations)を各ターンの最後に表示
Show citations at the end of each turn by @scidomino in #7350
- MCP初期化時のローディングインジケーターを追加
Add MCP loading indicator when initializing Gemini CLI by @swissspidy in #6923
- スクリーンリーダーの更新
Screen reader updates by @chrstnb in #7307
- 入力コマンドやファイルパスのハイライト表示
/で始まるコマンドや@で始まるファイルパスがハイライトされるようになりました。Add highlights for input /commands and @file/paths by @miguelsolorio in #7165
- フッター設定の追加
Add footer configuration settings by @miguelsolorio in #7419
- 矢印キーの修正とKittyプロトコルの堅牢性向上
Fix Arrow Keys and make Kitty Protocol more robust by @deepankarsharma in #7118
設定と構成の管理
設定や構成の管理に関する改善です。
- トークンをファイルに保存するためのベースクラスを作成
feat(cli) - Create base class for handling tokens stored in files by @shishu314 in #7240
- 異なる設定ソースからの一般設定のマージ
Merge general settings from different configuration sources by @bbiggs in #7528
- 設定移行の改善
refactor(setting): Improve settings migration and tool loading by @galz10 in #7445
allowedToolsからtools.allowedへの後方互換性を修正Fix backwards-compatibility for allowedTools -> tools.allowed by @werdnum in #7384
バグ修正と安定性向上
多くのバグ修正と安定性向上が図られています。
- Windowsでのプロセス処理を
wmicからpowershellに置き換えfix(process-utils): replace wmic with powershell for windows process by @dracic in #7087
- ストリーム検証を改良し、不要なリトライを防止
Refine stream validation to prevent unnecessary retries by @mrcabbage972 in #7278
- UTF16/32 BOM付きファイルをテキストとして正しくデコード
fix(core): treat UTF16/32 BOM files as text and decode correctly by @tayyab3245 in #6081
- 不正な形式のファイルパスを
GitIgnoreParserで処理する際のクラッシュを防止fix(gitIgnore): prevent crash/error when processing malformed file paths in GitIgnoreParser by @lifefloating in #7553
- ネストされた
.gitignoreファイルの処理に対応feat: handle nested gitignore files by @gsquared94 in #7645
- Google OAuthのエラーハンドリングを改善
fix(auth): improve Google OAuth error handling and prevent empty error messages by @bulkypanda in #7539
oauth_creds.jsonのパーミッションを修正fix(core): Fix permissions for oauth_creds.json by @xplo1t-sec in #6662
開発者向け改善
開発体験を向上させるための改善も含まれています。
- 拡張機能の設定で環境変数を解決
feat(extension): resolve environment variables in extension configuration by @skal88 in #7213
- テレメトリの追加
- diff統計に文字数を追加したり、ファイル操作イベントのOTelロギングが追加されました。
feat(telemetry): Add character counts to diff stats by @kiranani in #7619
add(telemetry): Add OTel logging for FileOperationEvent by @kiranani in #7082
- テストの信頼性向上
- 統合テストやE2Eテストの安定性向上が図られています。
fix(int-tests): fix failing integration tests by @galz10 in #7516
chore(e2e): Stabilize e2e test by adding a more descriptive prompt by @adamfweidman in #7599
最後に
gemini-cli v0.4.0では、セキュリティ、使いやすさ、安定性など、多岐にわたる改善が行われました。特に、信頼性(Trust)機能の強化は、より安全にgemini-cliを利用するための重要なステップと言えるでしょう。
コマンドのあいまい検索や入力補完の強化など、日々の開発体験を向上させる細かな改善も嬉しいポイントです。
ぜひ新しいバージョンを試してみてください。