id: 1dcd5ff21cac4b60a0ba15a10d36cee8
parent_id: 
item_type: 1
item_id: e1ac40fc541d4e96b9dc50f53a0dfb7d
item_updated_time: 1764345639336
title_diff: "[{\"diffs\":[[1,\"我和Gemini CLI共创万字使用指南（建议收藏）\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":26}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>我和Gemini CLI共创万字使用指南（建议收藏）</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"45285\\\"></a>\\\r\\\n<h1>我和Gemini CLI共创万字使用指南（建议收藏）</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzk1NzQzOTE0OQ==&amp;mid=2247484707&amp;idx=1&amp;sn=c778a2bc84f5b85df2058375ed727762&amp;chksm=c2897259f84695fdcc6f238cbaa2a0fd2212943fe1e069e57ce13fae207851eefdc1cddf11a4&amp;mpshare=1&amp;scene=1&amp;srcid=0730YbCPm1yjHMgSGmr1wwTN&amp;sharer_shareinfo=37b4f8d1f95475b6dd662a77c7429e3f&amp;sharer_shareinfo_first=37b4f8d1f95475b6dd662a77c7429e3f#rd\\\"><span>https://mp.weixin.qq.com/s?__biz=Mzk1NzQzOTE0OQ==&amp;mid=224748...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> 我和Gemini CLI共创万字使用指南（建议收藏）</h1><div><span style=\\\"position:relative\\\">原创</span><span> 子来 </span><span><a style=\\\"position:relative\\\"> 子来AI探索 </a></span><span><em></em></span></div><div style=\\\";\\\"><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:0;color:rgb(10,10,10);font-family:ui-sans-serif,system-ui,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;,&quot;Noto Color Emoji&quot;;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:0;line-height:0\\\"><span> </span></p><div style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(10, 10, 10);font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;\\\"><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:0 8px 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span><a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzk1NzQzOTE0OQ==&amp;mid=2247484698&amp;idx=1&amp;sn=0f2f6afe85663b446f9d83e78c530d8d&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">上一篇文章</a>我给大家安利了</span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>Gemini CLI</span></strong><span>这个神器，但当时只是简单演示了一下安装过程。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>今天我让Gemini CLI去了解自己的项目内容，一起共创一个使用指南。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>首先得把项目从GitHub上克隆下来，然后选个习惯的IDE打开项目，比如VS Code、Cursor和IDEA。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>为什么用IDE呢？因为它们不仅能让我方便地查看文件结构，</span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>最重要的是能直接打开终端</span></strong><span>！这样我就可以一边在终端里执行Gemini CLI命令，一边在编辑器里实时查看文章输出的内容，简直不要太爽！</span></p><div style=\\\"text-align: center;\\\"><img src=\\\":/47b972edd11c432e83b0a7ec5a0da907\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;height: auto !important;\\\"/></div><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>面对Gemini CLI项目里那一堆文档（全在docs目录下），而且还都是英文的，我的第一反应不是自己一个个去啃，而是让它帮我读一下@docs/目录下的文档，然后给我整个使用指南的大纲出来！</span></p><div style=\\\"text-align: center;\\\"><img src=\\\":/863ee23ec9764b7d8588e93ff6b728e4\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;height: auto !important;\\\"/></div><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>有了大纲，接下来就是正戏了。我新建了一个空白的</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>使用指南.md</span></code><span>文档，然后使用Gemini CLI先完成第一部分的内容。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>有意思的是，当它完成第一部分后，后自动完成第二部分，直到全部完成，我就刷刷手机等着就好了。</span></p><div style=\\\"text-align: center;\\\"><img src=\\\":/278eefe944fa4af8895091b8024e5cc1\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;height: auto !important;\\\"/></div><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span><br/></span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>当然，AI写的东西不可能一次就完美。比如在写</span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>内置工具</span></strong><span>那一部分时，只是简单罗列了一下工具名称，完全没有深入介绍，那再要求它修改下。</span></p><div style=\\\"text-align: center;\\\"><img src=\\\":/6ab03056caff49f5a1758308cf6040a5\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;height: auto !important;\\\"/></div><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span><br/></span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>最后，这份和Gemini CLI共创的使用指南基本成型了。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>飞书文档也保存了一份，欢迎大家当工具查阅：</span></p><p style=\\\"margin:0\\\"><span>https://xzg7bivhn3.feishu.cn/docx/RrNhd9MM6oUJxIxmw74c8h9Pngg</span></p><h1 style=\\\"box-sizing:border-box;border-width:0 0 2px;border-style:solid;border-color:rgb(229,229,229) rgb(229,229,229) rgb(0,152,116);font-size:22.4px;font-weight:bold;margin:2em auto 1em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.5em 1em;color:rgb(63,63,63);text-shadow:rgba(0,0,0,0.05) 1px 1px 3px\\\"><span>Gemini CLI 使用指南</span></h1><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>1. Gemini CLI 简介</span></h2><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>Gemini CLI 是什么？</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 是一个功能强大的工具，它将 Google 的 Gemini 模型带入您的终端，提供一个交互式的命令行（REPL）环境。它允许您直接通过命令行与先进的 AI 模型进行对话、提问和协作。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>从高层架构来看，Gemini CLI 由两个核心部分组成：</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>客户端 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>packages/cli</span></code><span>)</span></strong><span>: 这是您直接与之交互的用户界面。它负责处理您的输入、显示模型的答复以及管理整体的终端用户体验。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>本地服务器 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>packages/core</span></code><span>)</span></strong><span>: 作为 CLI 的后端，它负责管理与 Gemini API 的通信，协调各种工具的执行，并将最终结果返回给客户端。</span></div></li></ul><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这种设计使得 Gemini CLI 不仅仅是一个简单的聊天机器人，更是一个能够理解您本地开发环境并与之互动的智能助手。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>核心功能</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 的核心功能旨在提升您的开发效率和创造力：</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>与强大的人工智能模型互动</span></strong><span>: 您可以像与人交谈一样，向 Gemini 提出复杂的问题、寻求代码建议、或者进行头脑风暴。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>利用工具与本地环境交互</span></strong><span>: Gemini CLI 内置了一系列工具，使其能够读取、写入、搜索您的本地文件，执行 shell 命令，甚至访问网络资源。这意味着您可以让它帮您“阅读”一个文件后进行总结，或者“运行”一个测试脚本并分析结果。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>使响应基于您项目的上下文</span></strong><span>: 通过读取您项目中的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span> 配置文件，您可以为 Gemini 提供特定的背景信息、编码规范或项目指南。这使得模型的回答能够更加贴合您项目的实际情况，而不是给出通用的答案。</span></div></li></ul><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>2. 安装与设置</span></h2><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>先决条件</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>在安装 Gemini CLI 之前，请确保您的系统已安装 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;color: rgb(87, 107, 149);\\\"><span>Node.js</span></span><span> (推荐使用最新的 LTS 版本) 和 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;color: rgb(87, 107, 149);\\\"><span>npm</span></span><span> (通常随 Node.js 一起安装)。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>您可以通过在终端运行以下命令来检查它们是否已安装以及当前版本：</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>node -v</span><span><br/></span><span>npm -v</span></div></pre><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>安装方法</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>您可以根据自己的需求选择以下任一方法来安装和运行 Gemini CLI。</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>推荐：全局安装</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于日常使用者，我们推荐将 Gemini CLI 进行全局安装。这会将 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gemini</span></code><span> 命令添加到您的系统路径中，让您可以从任何目录直接启动它。</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>npm install -g @google/gemini-cli</span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>安装完成后，您可以随时通过运行 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gemini</span></code><span> 命令来启动交互式会话。</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>即时执行 (npx)</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>如果您希望在不永久安装包的情况下试用或执行 Gemini CLI，可以使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>npx</span></code><span>。</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>npx</span></code><span> 是一个 npm 包运行器，它会下载最新版本的包，执行它，然后在执行完毕后清理，不会在您的系统中留下任何痕迹。</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>npx @google/gemini-cli</span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>当您需要运行特定版本的 Gemini CLI 或者只是想快速执行一个一次性命令而不想污染全局安装列表时，这是一个绝佳的选择。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>贡献者指南</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>如果您希望为 Gemini CLI 的开发做出贡献，您需要从源代码运行它。请按照以下步骤操作：</span></p><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>克隆仓库</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>git </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>clone</span></span><span> https://github.com/google/gemini-cli.git</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>进入项目目录</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>cd</span></span><span> gemini-cli</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>安装依赖</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>npm install</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>4. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>从源代码运行</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>npm run start</span></div></pre></div></li></ol><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>此命令将使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>ts-node</span></code><span> 实时编译并运行 TypeScript 源码，让您可以立即看到自己所做更改的效果。</span></p><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>3. 身份验证：连接到 Google</span></h2><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>为何需要</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>为了使用 Gemini 模型的强大功能，Gemini CLI 需要访问 Google 的人工智能服务。因此，在首次启动时，您必须配置一种身份验证方法。这确保了只有经过授权的用户才能使用服务。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>身份验证方法</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 提供了多种身份验证方式，以适应不同的用户和使用场景。您只需选择其中一种即可：</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>1. 使用 Google 登录 (Gemini Code Assist)</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这是最推荐个人和 Google Workspace 账户使用者的方法。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>工作原理</span></strong><span>: 首次运行时，CLI 会自动在您的默认浏览器中打开一个 Google 登录页面。您只需登录您的 Google 账户并授权，凭据便会自动缓存到本地，后续启动将不再需要手动登录。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>特殊情况</span></strong><span>: 如果您是 Google Workspace 用户、通过 Google 开发者计划获得 Code Assist 许可，或者在部分地区使用，您可能需要额外设置一个 Google Cloud 项目 ID。详情请参阅</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;color: rgb(87, 107, 149);\\\"><span>相关文档</span></span><span>。</span></div></li></ul><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>2. Gemini API 密钥</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于希望快速开始或进行原型设计的开发者来说，使用 API 密钥是最简单的方法。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>获取密钥</span></strong><span>: 您可以从 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;color: rgb(87, 107, 149);\\\"><span>Google AI Studio</span></span><span> 免费获取您的 API 密钥。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>配置</span></strong><span>: 获取密钥后，您需要将其设置为环境变量 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI_API_KEY</span></code><span>。</span></div></li></ul><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>3. Vertex AI</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于 Google Cloud 用户，特别是企业级应用开发者，我们推荐使用 Vertex AI 进行身份验证。这种方法提供了更强大的企业级功能和管理能力。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>设置</span></strong><span>: 您需要先通过 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gcloud</span></code><span> 工具登录并设置应用默认凭据 (Application Default Credentials)。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>配置</span></strong><span>: 之后，设置 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GOOGLE_CLOUD_PROJECT</span></code><span>、</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GOOGLE_CLOUD_LOCATION</span></code><span> 和 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GOOGLE_GENAI_USE_VERTEXAI=true</span></code><span> 等环境变量。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>配置</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>配置身份验证凭据最常见的方法是使用环境变量。这不仅安全，而且非常灵活。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>临时设置</span></strong><span>: 您可以在当前的 shell 会话中临时设置环境变量。例如：</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>export</span></span><span> GEMINI_API_KEY=</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;YOUR_GEMINI_API_KEY&quot;</span></span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>永久设置</span></strong><span>: 为了方便长期使用，您可以将环境变量添加到您的 shell 配置文件中（如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>~/.bashrc</span></code><span>, </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>~/.zshrc</span></code><span>）或是在您的项目根目录创建一个 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.env</span></code><span> 文件。</span><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.env</span></code><span> 文件 (推荐)</span></strong><span>:</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>在您的项目根目录创建一个名为 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.env</span></code><span> 的文件，并添加如下内容：</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>GEMINI_API_KEY=&quot;YOUR_GEMINI_API_KEY&quot;</span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>或者，如果您使用 Vertex AI:</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>GOOGLE_CLOUD_PROJECT=&quot;YOUR_PROJECT_ID&quot;</span><span><br/></span><span>GOOGLE_CLOUD_LOCATION=&quot;YOUR_PROJECT_LOCATION&quot;</span><span><br/></span><span>GOOGLE_GENAI_USE_VERTEXAI=true</span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 会自动加载这些变量，无需手动执行 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>source</span></code><span> 命令，这使得配置管理更加便捷和清晰。</span></p></div></li></ul><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>4. 基本用法：您的第一个提示</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>完成安装和身份验证后，您就可以开始与 Gemini 互动了。本节将介绍启动 CLI、发送您的第一个提示以及如何退出会话的基础知识。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>启动交互式 CLI</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>要开始一个交互式会话，只需在您的终端中运行 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gemini</span></code><span> 命令：</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>gemini</span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>成功启动后，您会看到一个欢迎界面和 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt;</span></code><span> 提示符，表示 Gemini 已准备好接收您的输入。现在，您可以开始输入您的问题或指令了。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>非交互式模式</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于自动化任务和脚本编写，Gemini CLI 提供了强大的非交互式模式。您无需进入完整的 REPL 环境即可获得答案。</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 15.84px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>--prompt</span></code><span> 标志</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>您可以使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>--prompt</span></code><span> (或其缩写 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-p</span></code><span>) 标志直接将单个问题传递给 CLI。Gemini 会处理该问题，将答案直接输出到标准输出，然后退出。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例：</span></strong></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>gemini -p </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;法国的首都是哪里？&quot;</span></span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这对于快速查询信息或将 Gemini CLI 集成到您的 shell 脚本中非常有用。</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>管道输入</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 也支持通过标准输入 (stdin) 管道传递上下文。您可以将 any 命令的输出通过管道传送给 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gemini</span></code><span>，并让它对输入内容进行处理。</span></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例：</span></strong></p><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>假设您有一个名为 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>report.txt</span></code><span> 的文件，您想让 Gemini 为您总结其内容。</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>cat</span></span><span> report.txt | gemini -p </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;总结一下你读到的内容&quot;</span></span></div></pre><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>在这个例子中，</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>cat report.txt</span></code><span> 的输出内容会成为 Gemini 的上下文，然后它会根据您的提示（&quot;总结一下...&quot;）来完成任务。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>退出 CLI</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>当您在交互式模式下完成会话后，可以通过以下任一命令优雅地退出 CLI：</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/quit</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/exit</span></code></div></li></ul><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>输入其中任一命令并按 Enter 键，即可关闭会话并返回到您的常规终端提示符。</span></p><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>5. 核心命令：掌握界面</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 包含一套丰富的命令，用于与本地文件系统交互、执行 shell 命令、管理会话以及获取帮助。这些命令以特殊前缀（</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>@</span></code><span>、</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span> 和 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/</span></code><span>）开头，为您提供了超越简单对话的强大能力。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>与文件交互 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 17.28px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>@</span></code><span> 命令)</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>@</span></code><span> 命令是 Gemini CLI 与您的项目文件进行交互的核心。它允许您将一个或多个文件的内容作为上下文注入到您的问题中，让 Gemini 能够“看到”您的代码或文档。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>引用单个文件</span></strong><span>: 只需在文件路径前加上 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>@</span></code><span>。</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>&gt;&gt; @src/components/Button.tsx 帮我为这个 React 组件写一些测试。</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>引用整个目录</span></strong><span>: 您也可以引用一个目录，CLI 会递归地读取该目录下的所有文件。</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>&gt;&gt; @docs/ 总结一下这个目录里的所有文档。</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>Git 感知过滤</span></strong><span>: 为了效率和相关性，</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>@</span></code><span> 命令默认是 git 感知的。它会自动忽略 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.gitignore</span></code><span> 文件中列出的文件和目录（例如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>node_modules</span></code><span>、</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>dist/</span></code><span>），确保只有相关的项目文件被用作上下文。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>执行 Shell 命令 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 17.28px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span> 命令)</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span> 命令为您提供了一个直接从 CLI 内部访问系统 shell 的通道，无需离开当前会话即可执行终端命令。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>运行单个命令</span></strong><span>: 在任何您想执行的 shell 命令前加上 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span>。</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>&gt;&gt; !ls -la</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>切换持久 Shell 模式</span></strong><span>: 如果您需要执行一系列 shell 命令，只需输入一个单独的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span> 即可进入“Shell 模式”。在此模式下，您输入的任何内容都将直接作为 shell 命令执行。再次输入 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>!</span></code><span> 或按 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>Esc</span></code><span> 键即可退出该模式。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>管理对话</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这些命令帮助您管理当前的对话历史，使其保持整洁和高效。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/clear</span></code><span> (快捷键: </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>Ctrl+L</span></strong><span>): 清空当前屏幕，为您提供一个干净的界面，但会保留完整的对话历史以供参考。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/chat save &lt;tag&gt;</span></code><span>: 将当前的对话分支保存为一个带标签的快照。这在您想探索一个不同的思路但又不想丢失当前对话时非常有用。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/chat resume &lt;tag&gt;</span></code><span>: 恢复之前用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/chat save</span></code><span> 保存的对话。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/compress</span></code><span>: 当对话历史变得过长时，此命令会将其压缩成一个简洁的摘要，从而在后续的交互中节省大量的 token，同时保留对话的核心上下文。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>获取帮助和信息</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>当您需要帮助或想了解会话状态时，可以使用以下命令：</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/help</span></code><span>: 显示所有可用的命令及其用法。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/stats</span></code><span>: 查看当前会话的详细统计信息，包括已使用的 token 数量、通过缓存节省的 token 数量以及会话持续时间。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/tools</span></code><span>: 列出当前模型可用的所有工具的完整列表。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/about</span></code><span>: 显示版本和调试信息，这在您需要报告问题时非常有用。</span></div></li></ul><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>6. 高级用法：释放工具的力量</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 的真正威力在于其“工具使用”能力。工具是赋予 Gemini 模型与您本地环境（文件系统、shell、网络等）进行交互的特殊功能。这使得 Gemini 不再仅仅是一个语言模型，而是一个能够执行操作、获取信息并完成实际任务的智能代理。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>工具如何工作</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>工具的使用过程是全自动且透明的：</span></p><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>模型决策</span></strong><span>: 当您提出一个请求时（例如，“重构 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>main.py</span></code><span> 文件，将所有 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>print</span></code><span> 语句替换为日志记录”），Gemini 模型会分析您的意图。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>请求工具</span></strong><span>: 如果模型确定需要与您的环境交互才能完成任务，它会生成一个“工具调用”请求，指明需要使用哪个工具（例如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>replace</span></code><span>）以及需要哪些参数（例如文件名、要查找的字符串和替换字符串）。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用户确认</span></strong><span>: 出于安全考虑，对于任何可能修改文件或执行命令的工具，CLI 都会向您显示一个清晰的确认提示，详细说明将要执行的操作。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>4. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>CLI 执行</span></strong><span>: 在您批准后，CLI 会在您的本地环境中安全地执行该工具。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>5. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>返回结果</span></strong><span>: 工具的执行结果（例如，“成功替换了 5 个实例”）会被返回给模型。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>6. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>生成最终答案</span></strong><span>: 模型会利用这个结果来形成最终的、更完整和上下文感知的回答（例如，“我已经成功将 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>main.py</span></code><span> 中的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>print</span></code><span> 语句重构为日志记录。”）。</span></div></li></ol><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>关键内置工具</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 配备了一套强大的内置工具，涵盖了常见的开发任务。下面详细介绍每个工具的用法和示例。</span></p><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>文件系统工具</span></h4><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这些工具让 Gemini 能够像您一样浏览和编辑您的项目文件。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>read_file</span></code></strong><span>: 读取单个文件的内容。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>read_file(absolute_path: '/path/to/file.txt')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 给我总结一下 @src/main.ts 的内容。</span></code><span> (CLI 会自动调用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>read_file</span></code><span>)</span></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>write_file</span></code></strong><span>: 向指定文件写入内容，如果文件已存在则会覆盖。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>write_file(file_path: '/path/to/file.txt', content: '新的内容')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 创建一个名为 'hello.txt' 的文件，内容是 'Hello, World!'。</span></code></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>list_directory</span></code></strong><span>: 列出指定目录下的文件和子目录。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>list_directory(path: '/path/to/dir')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 列出 </span></code><span>src</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span> 目录下的所有文件。</span></code></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>glob</span></code></strong><span>: 使用 glob 模式查找文件。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>glob(pattern: 'src/**/*.ts')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 找到所有以 </span></code><span>.test.ts</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span> 结尾的测试文件。</span></code></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>replace</span></code></strong><span>: 在文件中查找并替换文本。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>replace(file_path: '/path/to/file.txt', old_string: '要被替换的文本', new_string: '新的文本')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 在 </span></code><span>package.json</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>文件中，将</span></code><span>react</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>的版本号改为</span></code><span>18.2.0</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>。</span></code></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>search_file_content</span></code></strong><span>: 在文件中搜索正则表达式。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>search_file_content(pattern: 'function\\\\s+myFunction', include: '*.js')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 在所有 JavaScript 文件中搜索函数 </span></code><span>myFunction</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>。</span></code></div></li></ul></ul><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>Shell 工具</span></h4><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>run_shell_command</span></code></strong><span>: 执行终端命令。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>run_shell_command(command: 'ls -la', description: '列出文件')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; !npm install react@latest</span></code><span> (CLI 会自动调用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>run_shell_command</span></code><span>)</span></div></li></ul></ul><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>网络工具</span></h4><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>web_fetch</span></code></strong><span>: 从一个或多个 URL 获取内容并进行处理。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>web_fetch(prompt: '总结一下 https://example.com 的内容')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 总结一下这个页面的内容：https://gemini.google.com/</span></code></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>google_web_search</span></code></strong><span>: 使用 Google 搜索获取信息。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>google_web_search(query: '最新的 AI 进展')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 最近有什么关于 AI 的新闻？</span></code></div></li></ul></ul><h4 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:17.6px;font-weight:bold;margin:2em 8px 0.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;color:rgb(0,152,116);border-radius:6px\\\"><span>内存工具</span></h4><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>save_memory</span></code></strong><span>: 让 Gemini “记住”一个事实，以便在未来的对话中使用。</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>用法</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>save_memory(fact: '我喜欢使用 pnpm 而不是 npm')</span></code></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>示例</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&gt;&gt; 记住，我的项目使用 TypeScript。</span></code></div></li></ul></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>工具安全与确认</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>安全是工具设计的核心原则。您始终是最终的控制者。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>明确提示</span></strong><span>: 在执行任何具有潜在风险的操作（如写入文件、执行命令）之前，CLI 都会暂停并请求您的明确批准。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>沙箱隔离</span></strong><span>: 为了提供额外的保护层，您可以在沙箱模式下运行 CLI，将工具的执行环境与您的主系统隔离开来。这可以有效防止意外的或恶意的操作。</span></div></li></ul><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>7. 配置与自定义</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>Gemini CLI 提供了丰富的配置选项，让您可以根据自己的工作流程和偏好来定制其行为和外观。您可以通过配置文件、命令行参数和内置命令来调整设置。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>配置文件 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 17.28px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span>)</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>持久化配置的核心是 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span> 文件。CLI 会在两个位置查找此文件，并按层级合并配置：</span></p><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>全局设置</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>~/.gemini/settings.json</span></code></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• 这个文件位于您的用户主目录下，其中的配置会应用到您所有的 Gemini CLI 会话中。适合存放通用偏好，如主题、编辑器等。</span></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>项目特定设置</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.gemini/settings.json</span></code></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• 您可以在项目的根目录下创建一个 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.gemini</span></code><span> 文件夹，并在其中放置一个 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span> 文件。这里的配置仅对该项目生效，并且会覆盖全局设置中的同名配置。这对于定义项目独有的工具或上下文非常有用。</span></div></li></ul></ol><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>自定义体验</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>您可以通过以下命令轻松调整 CLI 的外观和感觉：</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/theme</span></code><span>: 弹出一个对话框，让您可以从多个内置的视觉主题（如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>Default</span></code><span>, </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GitHub</span></code><span>, </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>Dracula</span></code><span> 等）中进行选择，以匹配您的终端配色方案。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/editor</span></code><span>: 设置您偏好的代码编辑器。当工具执行了文件修改（例如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>replace</span></code><span>）后，CLI 会使用您选择的编辑器来展示清晰的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>diff</span></code><span> 视图，让您在确认更改前一目了然。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>提供指令性上下文 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 17.28px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span>)</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>这是 Gemini CLI 最强大的功能之一。通过在您的项目中创建一个 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span> 文件，您可以为模型提供关于您项目的“记忆”或“指令”。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>工作原理</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span> 是一个简单的 Markdown 文件，您可以在其中定义项目的编码规范、架构概览、库使用偏好、或任何您希望 Gemini 在提供回答时遵守的规则。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>分层加载</span></strong><span>: CLI 会智能地从多个位置加载这些上下文文件，并将其内容合并：</span></div></li><ol style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>1. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>主目录</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>~/.gemini/GEMINI.md</span></code><span> (全局规则)</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>2. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>项目根目录</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>your-project/.gemini/GEMINI.md</span></code><span> 或 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>your-project/GEMINI.md</span></code><span> (项目级规范)</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>3. </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>子目录</span></strong><span>: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>your-project/src/feature/GEMINI.md</span></code><span> (特定模块的详细说明)</span></div></li></ol><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>管理上下文</span></strong><span>: 您可以使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/memory show</span></code><span> 命令查看当前加载的所有上下文内容，或者使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/memory refresh</span></code><span> 强制重新加载所有 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span> 文件，以确保 Gemini 拥有最新的指令。</span></div></li></ul><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>通过精心配置 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GEMINI.md</span></code><span>，您可以将 Gemini 训练成一个真正理解您项目需求的专家，从而获得高度定制化和精准的辅助。</span></p><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>8. 高级用户功能</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于需要更高安全性、可恢复性和可扩展性的高级用户，Gemini CLI 提供了一系列强大的功能。这些功能允许您在隔离的环境中工作，轻松撤销更改，并集成自定义工具。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>检查点与恢复 (</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 17.28px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/restore</span></code><span>)</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>检查点功能是您的安全网。当您让 Gemini 使用工具对您的文件进行修改时，它能让您毫无顾虑地进行实验。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>它是什么？</span></strong><span>: 在任何文件修改工具（如 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>write_file</span></code><span> 或 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>replace</span></code><span>）执行之前，CLI 会自动创建一个“检查点”。这个检查点是您项目当前状态的一个快照，包括所有文件和当前的对话历史。这个快照被安全地存储在一个独立的 git 仓库中（</span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>~/.gemini/history/&lt;project_hash&gt;</span></code><span>），完全不影响您自己的项目仓库。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如何启用</span></strong><span>: 您可以通过在启动时添加 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>--checkpointing</span></code><span> 标志，或在 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span> 中将 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>checkpointing.enabled</span></code><span> 设置为 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>true</span></code><span> 来启用此功能。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如何使用</span></strong><span>: 如果您对工具所做的更改不满意，只需运行 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/restore</span></code><span> 命令。CLI 会列出所有可用的检查点。然后，运行 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>/restore &lt;checkpoint_file&gt;</span></code><span> 即可将您的项目文件和对话历史瞬间恢复到修改之前的状态。</span></div></li></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>安全沙箱</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>为了最大程度地保护您的系统，Gemini CLI 可以在一个隔离的沙箱环境中执行所有工具。这可以防止 AI 意外执行破坏性命令或访问项目目录之外的文件。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>为何使用？</span></strong><span>: 当您处理不熟悉的代码、运行复杂的 shell 命令或只是想增加一层额外的安全保障时，沙箱是理想的选择。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如何启用</span></strong><span>: 通过 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>--sandbox</span></code><span> (或 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-s</span></code><span>) 标志启动 CLI，或在 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span> 中设置 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>&quot;sandbox&quot;: true</span></code><span>。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>方法</span></strong><span>: Gemini CLI 支持多种沙箱技术：</span></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>macOS Seatbelt</span></strong><span>: 在 macOS 上，CLI 可以利用系统内置的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>sandbox-exec</span></code><span> 功能，提供一个轻量级的隔离环境。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>Docker/Podman</span></strong><span>: 对于需要完全隔离的跨平台解决方案，CLI 可以使用容器技术。它会自动使用一个预构建的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>gemini-cli-sandbox</span></code><span> 镜像，或者您也可以在项目的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>.gemini/sandbox.Dockerfile</span></code><span> 中提供一个自定义的 Dockerfile 来安装项目特定的依赖项。</span></div></li></ul></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>使用 MCP 服务器进行扩展</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>对于希望将 Gemini CLI 与自己的工具、API 或服务集成的团队和开发者，模型上下文协议（MCP）服务器提供了无限的可能性。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>它是什么？</span></strong><span>: MCP 是一个开放标准，允许您创建一个服务来向 Gemini CLI “宣告”您的自定义工具。您可以编写一个简单的 HTTP 服务器，它能响应工具发现和执行的请求。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如何配置</span></strong><span>: 在 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>settings.json</span></code><span> 的 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>mcpServers</span></code><span> 部分，您可以配置一个或多个服务器。您需要提供启动服务器的命令、工作目录以及任何必要的环境变量。</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>&quot;mcpServers&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>:</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>{</span></span><span><br/></span><span>  </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>&quot;myPythonServer&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>:</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>{</span></span><span><br/></span><span>    </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>&quot;command&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>:</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;python&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>,</span></span><span><br/></span><span>    </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>&quot;args&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>:</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>[</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;mcp_server.py&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>]</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>,</span></span><span><br/></span><span>    </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>&quot;cwd&quot;</span></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>:</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;./mcp_tools/python&quot;</span></span><span><br/></span><span>  </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>}</span></span><span><br/></span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);\\\"><span>}</span></span></div></pre></div></li></ul><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>配置完成后，Gemini CLI 会自动连接到您的服务器，发现您定义的工具，并将它们与内置工具一样提供给模型使用。这为您创建高度定制化的、与您的特定工作流程深度集成的 AI 助手打开了大门。</span></p><h2 style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);font-size:20.8px;font-weight:bold;margin:4em auto 2em;text-align:center;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;display:table;padding:0.3em 1.2em;color:rgb(255,255,255);background:rgb(0,152,116);border-radius:8px 24px;box-shadow:rgba(0,0,0,0.06) 0 2px 6px\\\"><span>9. 故障排除与卸载</span></h2><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>本节提供常见问题的解决方案和卸载 Gemini CLI 的说明。</span></p><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>常见问题</span></h3><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>错误: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>Failed to login. Message: Request contains an invalid argument</span></code></strong></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>原因</span></strong><span>: 拥有 Google Workspace 帐户或与 Gmail 关联的 Google Cloud 帐户的用户可能无法激活 Gemini Code Assist 的免费套餐。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>解决方案</span></strong><span>: 对于 Google Cloud 帐户，可以通过设置 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>GOOGLE_CLOUD_PROJECT</span></code><span> 环境变量为您的项目 ID 来解决。或者，您可以从 </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;color: rgb(87, 107, 149);\\\"><span>AI Studio</span></span><span> 获取一个 API 密钥，该密钥也包含一个独立的免费套餐。</span></div></li></ul><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>错误: </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>Command not found</span></code></strong></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>原因</span></strong><span>: Gemini CLI 未正确安装或未在系统的 PATH 中。</span></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>解决方案</span></strong><span>: 确保您已成功全局安装了该软件包，并检查您的 npm 全局二进制文件目录是否在系统的 PATH 环境变量中。</span></div></li></ul></ul><h3 style=\\\"box-sizing:border-box;border-width:1px 1px 1px 4px;border-style:solid;border-color:color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) color-mix(in srgb,rgb(0,152,116) 10%,transparent) rgb(0,152,116);font-size:19.2px;font-weight:bold;margin:2em 8px 0.75em 0;text-align:left;line-height:2.4em;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;padding-left:12px;color:rgb(63,63,63);border-radius:6px;background:color-mix(in srgb,rgb(0,152,116) 8%,transparent)\\\"><span>卸载</span></h3><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>卸载方法取决于您的安装方式。</span></p><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如果使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>npm install -g</span></code><span> 安装</span></strong><span>:</span><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><span>使用 npm 的 uninstall 命令并带上 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>-g</span></code><span> 标志即可完全移除。</span></p><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>npm uninstall -g @google/gemini-cli</span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>如果使用 </span><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>npx</span></code><span> 运行</span></strong><span>:</span><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:1.5em 8px;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;letter-spacing:0.1em;color:rgb(63,63,63)\\\"><code style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;text-align: left;line-height: 1.75;color: rgb(221, 17, 68);background: rgba(27, 31, 35, 0.05);padding: 3px 5px;border-radius: 4px;\\\"><span>npx</span></code><span> 在执行后不会永久安装软件包。但是，它会将包缓存在一个临时目录中。要完全移除，您需要清空 npx 的缓存。</span></p></div></li><ul style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);list-style:none;margin:0;padding:0 0 0 1.5em;text-align:left;line-height:1.75;font-family:-apple-system-font,BlinkMacSystemFont,&quot;Helvetica Neue&quot;,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei UI&quot;,&quot;Microsoft YaHei&quot;,Arial,sans-serif;font-size:16px;color:rgb(63,63,63)\\\"><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>macOS / Linux</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>rm</span></span><span> -rf </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(201, 209, 217);\\\"><span>$(npm config get cache)</span></span><span>/_npx&quot;</span></span></div></pre></div></li><li style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 16px;text-indent: -1em;display: block;margin: 0.5em 8px;color: rgb(63, 63, 63);\\\"><div><span>• </span><strong style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);font-weight: bold;text-align: left;line-height: 1.75;font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: inherit;color: rgb(0, 152, 116);\\\"><span>Windows (PowerShell)</span></strong><span>:</span><pre style=\\\"box-sizing: border-box;border: 1px solid rgba(0, 0, 0, 0.04);font-family: -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-feature-settings: normal;font-variation-settings: normal;font-size: 14.4px;margin: 10px 8px;color: rgb(201, 209, 217);background: rgb(13, 17, 23);text-align: left;line-height: 1.5;overflow-x: auto;border-radius: 8px;padding: 0px !important;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);display: flex;padding: 10px 14px 0px;\\\"><span><span></span><span></span><span></span></span></span><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>Remove-Item</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>-Path</span></span><span> (</span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(255, 166, 87);\\\"><span>Join-Path</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>$env:LocalAppData</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(165, 214, 255);\\\"><span>&quot;npm-cache\\\\_npx&quot;</span></span><span>) </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>-Recurse</span></span><span> </span><span style=\\\"box-sizing: border-box;border-width: 0px;border-style: solid;border-color: rgb(229, 229, 229);color: rgb(121, 192, 255);\\\"><span>-Force</span></span></div></pre></div></li></ul></ul></div><p style=\\\"box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(229,229,229);margin:0;color:rgb(10,10,10);font-family:ui-sans-serif,system-ui,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;,&quot;Segoe UI Symbol&quot;,&quot;Noto Color Emoji&quot;;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:0;line-height:0\\\"><span> </span></p><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":305157}]"
metadata_diff: {"new":{"id":"e1ac40fc541d4e96b9dc50f53a0dfb7d","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348854798,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:35.949Z
created_time: 2025-11-28T21:04:35.949Z
type_: 13