gemini-flow is an open source AI-driven development tool based on the Google Gemini CLI build, adapted from rUvnet's Claude-Flow project. It enables efficient code development, system design and enterprise-level optimization through multi-intelligence collaboration (supporting up to 66 specialized intelligences). The project uses the A2A (Agent-to-Agent) protocol and the MCP (Model Context Protocol) protocol to support seamless communication and model coordination between intelligences. gemini-flow offers both lightweight and enterprise-class operation, and is suitable for scenarios ranging from rapid prototyping to complex system migration. The code is hosted on GitHub under the MIT license and is suitable for developers, teams, and enterprise users.
Function List
- Supports up to 66 specialized intelligences working together, covering architecture design, code writing, testing and optimization.
- Implement A2A protocol to support real-time communication between intelligences with latency below 25ms.
- integrated (as in integrated circuit) MCP protocols to ensure model context synchronization and knowledge sharing across intelligences.
- Lightweight CLI mode (with only 15MB of boot memory) and enterprise mode (supporting complex functionality) are available.
- Supports multi-language development, including TypeScript, JavaScript, Python and Go.
- Built-in Byzantine fault tolerance ensures that the 33% intelligences will continue to operate normally in the event of a failure.
- Provides VSCode extensions and integrates Gemini Code Assist to enhance the development experience.
- Supports real-time performance monitoring and SQLite operation speeds of up to 396,610 operations/second.
- Includes a comprehensive test suite covering unit testing, integration testing and end-to-end testing.
Using Help
Installation process
gemini-flow relies on Node.js and the Gemini CLI, is easy to install and supports multiple authentication methods. Here are the detailed steps:
- Installing Node.js
Ensure that Node.js is installed on your system (recommended version 20 or higher). Visit the official Node.js website to download and install it. Run the following command to verify:node --version
- Installing the Gemini CLI
Run the following command in a terminal to globally install the Gemini CLI:npm install -g @google/gemini-cli
After installation, run
gemini --version
Confirm the version. - Install gemini-flow
gemini-flow has been released to npm and can be installed with the following command:npm install -g @clduab11/gemini-flow
After installation, run
gemini-flow --version
Check for success. - Configuring Authentication
gemini-flow supports two authentication methods:- Google Account Login : Run the following command and log in as prompted:
gemini-flow init --protocols a2a,mcp
This method provides free access to Gemini 2.5 Pro (with a limit of 60 requests per minute, 1000 per day).
- API key authentication : from Google AI Studio gain Gemini API key, set environment variables:
export GEMINI_API_KEY="your-api-key-here"
API keys are suitable for high concurrency or enterprise level requirements.
- Initialization Project
Run in the project directory:gemini-flow init --protocols a2a,mcp --topology hierarchical
This generates the configuration file
.gemini-flow/config.ts
, which is used to set the number of intelligences, protocols and topology.
Usage
gemini-flow offers a variety of features covering code generation, system migration and performance optimization. The following is a detailed guide to the main features:
1. Code generation and development
gemini-flow supports collaborative code generation through intelligences. For example, generating a React Applications:
gemini-flow hive-mind spawn --objective "build a React app" --agents "coder,tester" --protocols a2a,mcp
- procedure ::
- Enter a goal, such as "Build a React app".
- Specify the type of intelligentsia (e.g. coder and tester) and protocol (A2A and MCP).
- The system calls the coder intelligence to generate code and the tester intelligence to automatically generate test cases.
- The output is saved in the specified directory (e.g.
src/app/
).
- draw attention to sth. : To improve the quality of the code, the command can be appended with a
--specialization full-stack
Designation of Specialized Intelligentsia.
2. System migration
gemini-flow specializes in migrating legacy systems to modern architectures. For example, migrating Java monolithic applications to microservices:
gemini-flow sparc orchestrate --mode migration --source "legacy-java" --target "kubernetes-microservices" --agents 50
- procedure ::
- Specify the migration mode (
migration
), source code (legacy-java
) and target architecture (kubernetes-microservices
). - The system assigns 50 intelligences to collaboratively analyze the code, design the microservices architecture, and generate deployment scripts.
- The output consists of the Kubernetes configuration file and the microservice code, saved in the
output/
Catalog.
- Specify the migration mode (
- take note of : To ensure a clear directory structure of the source code, it is recommended to clean up useless files in advance.
3. Performance optimization and monitoring
gemini-flow provides real-time performance monitoring capabilities. For example, optimizing database queries:
gemini-flow optimize database --target "sqlite" --protocols mcp
- procedure ::
- Specify the optimization target (e.g. SQLite database).
- The system analyzes query performance and generates optimization recommendations (such as index additions or query rewrites).
- (of a computer) run
gemini-flow monitor --performance
View real-time performance data (SQLite operation speed, latency, etc.).
- draw attention to sth. : Use
--log-level debug
Turn on detailed logging for easy troubleshooting.
4. VSCode integration
gemini-flow provides VSCode extensions to enhance the development experience. Installation steps:
- Search the VSCode Extended Marketplace
gemini-flow
or manual installation:npm install -g @clduab11/gemini-flow-vscode
- Run the command in VSCode
Gemini Flow: Initialize
Configure the project. - Use extensions (e.g., code completion, test generation):
- Open the file and press
Ctrl+Shift+P
importationGemini Flow: Generate Tests
Generate test cases. - utilization
Gemini Flow: Optimize Code
Optimize selected code.
- Open the file and press
5. A2A and MCP protocol operation
The A2A protocol supports inter-intelligent body communication and the MCP protocol ensures model context synchronization. For example, running a multi-intelligent body task:
gemini-flow hive-mind spawn --objective "enterprise digital transformation" --agents "architect,coder,analyst" --protocols a2a,mcp
- procedure ::
- Specify the mission goal and the type of intelligences.
- The A2A protocol coordinates intelligent body communication, and the MCP protocol synchronizes context (e.g., architectural design and code implementation).
- The output includes design documentation, code, and optimization reports saved in the
docs/
cap (a poem)src/
Catalog.
- take note of : Ensure that the configuration
.gemini-flow/config.ts
The protocol parameters in thea2a.messageTimeout
cap (a poem)mcp.contextSyncInterval
The
6. Customized configuration
Developer editable .gemini-flow/config.ts
Adjust the settings. Example:
export default {
protocols: {
a2a: { enabled: true, messageTimeout: 5000, encryption: 'AES-256-GCM' },
mcp: { enabled: true, contextSyncInterval: 100, modelCoordination: 'intelligent' }
},
swarm: { maxAgents: 66, topology: 'hierarchical', consensus: 'byzantine-fault-tolerant' }
}
- procedure ::
- modifications
maxAgents
Adjusts the number of intelligences (max 66). - set up
topology
because ofhierarchical
(hierarchy) ormesh
(mesh). - Save and run
gemini-flow init
Application Configuration.
- modifications
Other considerations
- Logging and Debugging : Run
gemini-flow monitor --log-level debug
View detailed logs, which are saved in thelogs/
Catalog. - Backup and Recovery : Configuration files and session data are stored in the
.gemini-flow/
The backups are done regularly to avoid loss. - Community Contributions : To submit a PR or issue via GitHub, see
CONTRIBUTING.md
Understanding Contribution Guidelines.
application scenario
- Enterprise Code Migration
Enterprises need to migrate legacy Java systems to Kubernetes microservices. gemini-flow reduces deployment time by 67% with 50 intelligences collaboratively analyzing code, designing architecture, and generating deployment scripts. - Rapid Prototyping
Startup teams are required to develop FinTech MVPs within 48 hours. gemini-flow utilizes A2A and MCP protocols to orchestrate a full-stack of intelligences to generate code, testing, and market analytics to accelerate product launch. - System Performance Optimization
Developers optimize database performance. gemini-flow analyzes SQLite queries, provides indexing recommendations and monitors real-time performance to ensure 396,610 operations/second. - Education and learning
Students learn microservice design using gemini-flow. Intelligentsia generates architecture documentation and code samples to help understand complex system development.
QA
- What programming languages does gemini-flow support?
Supports TypeScript, JavaScript, Python, Go and more, covering 17 languages for front-end, back-end and full-stack development. - What is the role of the A2A and MCP protocols?
The A2A protocol enables low-latency communication (<25ms) between intelligences, and the MCP protocol synchronizes the model context to ensure knowledge sharing and task consistency. - Do I need to pay to use gemini-flow?
Access is free with a Google Account login (limits apply). Enterprise features are available through Google AI Studio Obtaining an API key may incur a fee. - How do I handle runtime errors?
(of a computer) rungemini-flow monitor --log-level debug
View logs, check configuration files and dependencies. Community support is available through GitHub Issues.