最近AI编辑器势头发展的很火啊,我最开始使用的是WindSurf
,由于是初始股享受了10$/mon的优惠,回来这玩意不行了经常出问题,转战到Cursor
。
目前使用的主力编辑器就是 Cursor
, 最近它的定价策略在变动,摸索一下新的方案。
试用了一下 Gemini Cli
分享一下经验。
Github地址: https://github.com/google-gemini/gemini-cli
可以直接通过npm全局安装:
npm install -g @google/gemini-cli
登录的时候选择 Google 鉴权,出现网络问题需要提前设置命令行的代理。
cmd下的命令为:
set http_proxy=http://127.0.0.1:7890
set httpx_proxy=http://127.0.0.1:7890
由于是Cli形式的,和Cursor这种命令行的使用方式不一样,借助编辑器插件可以进行增强。
然后下载一个 Vscode 或 vsc forks都支持的 Gemini CLI Companion。
/ide enable
进行cli与编辑器关联。
增强项如下:
- Open Editor File Context: Gemini CLI gains awareness of the files you have open in your editor, providing it with a richer understanding of your project's structure and content.
- Selection Context: Gemini CLI can easily access your cursor's position and selected text within the editor, giving it valuable context directly from your current work.
- Native Diffing: Seamlessly view, modify, and accept code changes suggested by Gemini CLI directly within the editor.
- Launch Gemini CLI: Quickly start a new Gemini CLI session from the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) by running the "Gemini CLI: Run" command.
引用
- IDE 整合 Gemini Cli: https://gemini-cli.gh.miniasp.com/ide-integration.html
评论 (0)