Gemini CLI 是谷歌官方推出的开源AI命令行工具,它将强大的Gemini AI能力直接集成到你的终端中。这个工具旨在连接你的开发工具,理解你的代码,并加速你的工作流程。
项目地址: https://github.com/google-gemini/gemini-cli
npx https://github.com/google-gemini/gemini-cli
npm install -g @google/gemini-cli
当提示时,使用个人Google账户登录,这将为你提供:
如果需要使用特定模型或更高的请求容量:
export GEMINI_API_KEY="YOUR_API_KEY"
$ cd new-project/
$ gemini
> Write me a Gemini Discord bot that answers questions using a FAQ.md file I will provide
$ git clone https://github.com/google-gemini/gemini-cli
$ cd gemini-cli
$ gemini
> Give me a summary of all of the changes that went in yesterday
> Describe the main pieces of this system's architecture.
> What security mechanisms are in place?
> Implement a first draft for GitHub issue #123.
> Help me migrate this codebase to the latest version of Java. Start with a plan.
> Make me a slide deck showing the git history from the last 7 days, grouped by feature and team member.
> Make a full-screen web app for a wall display to show our most interacted-with GitHub issues.
> Convert all the images in this directory to png, and rename them to use dates from the exif data.
> Organise my PDF invoices by month of expenditure.
Gemini CLI 代表了AI与开发工具集成的新趋势,它不仅仅是一个简单的AI聊天工具,而是一个完整的AI驱动的开发环境。通过将Gemini的强大AI能力直接集成到命令行中,开发者可以:
Gemini CLI 项目体现了谷歌在AI工具实用化方面的努力,为开发者社区提供了一个强大而灵活的AI编程助手。