Overseas access: www.kdjingpai.com
Ctrl + D Favorites

Gen CLI 是基于 Google 的 Gemini CLI 分叉的开源命令行工具,托管在 GitHub 上,专为开发者设计。它通过终端提供 AI 功能,支持 DeepSeek 等 AI 模型,允许用户使用自然语言生成代码、自动化开发任务或与 AI 交互。Gen CLI 继承了 Gemini CLI 的核心功能,并增加了对 DeepSeek 模型的支持,提升了代码生成和任务处理的灵活性。它兼容 macOS、Windows 和 Linux,适合希望高效开发和自动化的程序员。用户可通过 GitHub 参与社区贡献,获取最新版本或反馈问题。

 

Function List

  • Generate code snippets or full applications using DeepSeek or other AI models.
  • Automate development tasks, such as querying the code base or performing Git operations.
  • Supports integration with external tools and AI models for enhanced scalability.
  • Provides an interactive chat mode to talk to the AI at the endpoint.
  • Support for custom commands to streamline workflow for repetitive tasks.
  • Provides a Web UI mode to operate AI functions through a browser.
  • Compatible with macOS, Windows and Linux running on multiple platforms.

 

Using Help

Installation process

To use Gen CLI, you need to install Node.js (recommended version 20 or higher) as the runtime environment. The following are the detailed installation steps:

  1. Installing Node.js::
    • Visit the official Node.js website (https://nodejs.org) and download the appropriate installer for your operating system.
    • Windows and macOS users can run the installer, and Linux users install using a package manager. For example, Ubuntu users run it:
      sudo apt update
      sudo apt install nodejs npm
      
    • (of a computer) run node -v cap (a poem) npm -v Check the version to make sure the installation was successful.
  2. Clone Gen CLI repository::
    • Run the following command in a terminal to clone the source code:
      git clone https://github.com/gen-cli/gen-cli.git
      
    • Go to the project catalog:
      cd gen-cli
      
  3. Installation of dependencies::
    • Run in the project directory:
      npm install
      
    • This will install all dependent packages.
  4. Configuring API Keys::
    • Gen CLI supports DeepSeek and other models, you need to configure the corresponding API key. After getting the key, set it as an environment variable. For example:
      export DEEPSEEK_API_KEY=你的API密钥
      
    • Windows users run it:
      set DEEPSEEK_API_KEY=你的API密钥
      
    • Or follow the documentation to set the key in the configuration file.
  5. Running the Gen CLI::
    • Run the following command to start:
      npm start
      
    • If using Web UI mode, run:
      npm start --ui
      
    • Once started, follow the terminal prompts to complete the login or configuration.

Usage

The Gen CLI is based on the Gemini CLI and extends support for DeepSeek models with code generation, task automation, and interactive dialog capabilities. Below is a flow of how the main features operate:

  1. Generate Code::
    • Call DeepSeek to generate code by entering natural language commands in the terminal. Example:
      gen > 使用 DeepSeek 创建一个 Python Django 应用,包含用户认证功能
      
    • The generated code is saved to the specified directory, and the path can be specified:
      gen > 使用 DeepSeek 创建一个 React 组件,保存到 ./components
      
    • DeepSeek's code generation capabilities are suitable for complex applications where the output contains comments and structure.
  2. Automated workflows::
    • The Gen CLI automates development tasks such as querying code commits or handling Git operations. For example:
      gen > 列出最近的 Git 提交记录
      
    • or perform complex operations:
      gen > 将 dev 分支变基到 main 分支
      
    • command invokes the Git utility and returns the results, reducing the need for manual work.
  3. Interactive chat mode::
    • (of a computer) run gen chat Go into interactive mode and talk to models like DeepSeek:
      gen chat
      
    • May ask questions or request help, for example:
      用户:解释这段 Python 代码的功能
      AI:请分享代码,我会详细分析并说明其功能
      
    • Ideal for debugging or learning.
  4. Customized commands::
    • Defining exclusive commands simplifies the task. For example, create commands to generate test cases:
      gen config add-command test "使用 DeepSeek 生成单元测试"
      
    • afterwards gen test Test code can be generated.
  5. Web UI mode::
    • Run the following command to start the web interface:
      gen --ui
      
    • The browser opens a local web server for users unfamiliar with the terminal to operate AI functions.
  6. Multi-platform support::
    • The Gen CLI is compatible with macOS, Windows, and Linux, and can be used across platforms by ensuring that environment variables and API keys are properly configured.

caveat

  • Ensure that the network connection is stable and that models such as DeepSeek are accessed via an API.
  • Refer to the official documentation (https://github.com/gen-cli/gen-cli) or README.md Solve common problems.
  • Periodically update the Gen CLI:
    git pull origin main
    npm install
  • DeepSeek API keys should be obtained from the DeepSeek official website, following its terms of use.

 

application scenario

  1. Rapid Prototyping
    • Developers need to prototype web applications quickly. Using the DeepSeek model of the Gen CLI, type in "Create a Django and React-based blogging system" to generate complete code and save development time.
  2. Code Review Automation
    • In team development, run "Use DeepSeek to check the coding specification of the code base" and Gen CLI will generate a review report and provide optimization suggestions.
  3. Learning and debugging
    • Beginners ask questions in interactive mode, such as "Explain this JavaScript asynchronous function", DeepSeek will explain in detail, suitable for learning or debugging.
  4. CI/CD Integration
    • DevOps engineers integrate the Gen CLI into the CI/CD process and run "Generate Kubernetes Deployment Scripts with DeepSeek" to get the configuration files available.

 

QA

  1. What is the difference between Gen CLI and Gemini CLI?
    • The Gen CLI is a fork of the Gemini CLI that adds support for models such as DeepSeek and provides a wider selection of AI models with similar functionality and operation.
  2. How are DeepSeek models configured?
    • Get the API key from the DeepSeek website, set it as an environment variable or set it in a configuration file, refer to the Gen CLI documentation.
  3. Is the Gen CLI free?
    • Gen CLI itself is open source and free, but models such as DeepSeek may require a paid API key, refer to the DeepSeek website for specific costs.
  4. How can I contribute code or give feedback on an issue?
    • Go to https://github.com/gen-cli/gen-cli and press CONTRIBUTING.md Submit a Pull Request or provide feedback on the Issues page.
0Bookmarked
1kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

inbox

Contact Us

Top

en_USEnglish