dotninth/xenogit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dotninth/xenogit

Composer 安装命令:

composer create-project dotninth/xenogit

包简介

Your CLI buddy for instant Git commit messages.

README 文档

README

Stand With Ukraine


Xenogit Repository Xenogit Repository

Your CLI buddy for instant Git commit messages.

Latest Stable Version PHP Version MIT License


Introduction

Xenogit is your helpful command-line assistant that uses Google Gemini to quickly create commit messages. Stop spending time writing commits and start managing your Git repository effortlessly!


️Getting Started

Installing

There are two ways to install Xenogit:

  1. Using Composer: Run the following command to install Xenogit globally:
composer global require dotninth/xenogit
  1. Downloading from GitHub: Visit the Releases page on GitHub and download the appropriate binary.

Usage

After installing Xenogit, you can all available options by simply launcing the program:

$ xenogit

  Xenogit  v2.6.0

  USAGE:  <command> [options] [arguments]

  commit         Automatically generate commit messages

  config:api-key Configure the API key in the .env file
$ xenogit help commit

Description:
  Automatically generate commit messages

Usage:
  commit [options]

Options:
  -m, --model[=MODEL]              Set the ID of the model to use (optional). Default: gemini-2.5-flash-lite
  -t, --temperature[=TEMPERATURE]  Set the temperature (optional). Default: 0
  -k, --tokens[=TOKENS]            Set the maximum number of tokens to use (optional). Default: 100
      --thinking[=THINKING]        Set the thinking level for Gemini 3 models (optional)
  -h, --help                       Display help for the given command. When no command is given display help for the list command
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi|--no-ansi             Force (or disable --no-ansi) ANSI output
  -n, --no-interaction             Do not ask any interactive question
      --env[=ENV]                  The environment the command should run under
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Currently available models

You can use the following models from Google with the -m flag:

  • Gemini 2.5 Flash - gemini-2.5-flash
  • Gemini 2.5 Flash Lite - gemini-2.5-flash-lite
  • Gemini 2.5 Pro - gemini-2.5-pro
  • Gemini 3 Flash - gemini-3-flash-preview
  • Gemini 3.1 Pro - gemini-3.1-pro-preview
  • Gemini 3.1 Flash-Lite - gemini-3.1-flash-lite
  • Gemini 3.5 Flash - gemini-3.5-flash

Note

Note that Gemini 2.5 Pro and Gemini 3.1 Pro models take longer and cost more to generate a commit. But if you have a huge set of changes (huge commit), they work best.


API Key

Xenogit needs an API key from Google AI Studio to work properly. There are two options to provide the API key:

  1. Use the command xenogit config:api-key <your-api-key>.

  2. Using environment variable: Create an environment variable called API_KEY that contains your Gemini API key.

  3. Create a file named .env in the directory where the Xenogit binary is located. This file will be used to store your environment variables. To the .env file, add the following line, replacing <YOUR_API_KEY> with your actual Gemini API key:

API_KEY=<YOUR_API_KEY>

Payment

Using Xenogit will cost you money for every request you make to the Gemini API. Xenogit uses the official Gemini 2.5 Flash Lite (gemini-2.5-flash-lite) model, which is the best model in terms of price/quality ratio. At least for the task Xenogit solves.

You can also use Free Tier for Gemini. Be sure to check for limitations and be aware that Google will use your data to improve their products.

To find out more about the price for using Google's services, please check their pricing page at Gemini Pricing page.


Bash aliases example

To simplify common workflows, such as adding files to git and committing them, I recommend creating bash aliases.

Here are mine (sort of a mnemonic for aliases):

alias xc="xenogit commit"
alias axc="git add . && xc"
alias xcp="xc && git push"
alias axcp="axc && git push"

Contribute

You are welcome to contribute to Xenogit! For a smooth collaboration, please follow these guidelines when contributing to the project:

  1. Fork the repository and clone it to your local machine.
  2. Create a new branch for your contribution: git checkout -b my-contribution.
  3. Make your changes, making sure the code follows the project's coding style and conventions.
  4. Test your changes thoroughly.
  5. Commit your changes with a descriptive commit message.
  6. Push your branch to your forked repository: `git push origin my-contribution'.
  7. Open a pull request against the `main' branch of the Xenogit repository.
  8. Provide a clear and detailed description of your changes in the pull request, along with any relevant information or context.

Please note that by contributing to Xenogit, you agree to release your contributions under the MIT License.


License

Xenogit is released under the MIT License. Feel free to modify and distribute it according to your needs.

dotninth/xenogit 适用场景与选型建议

dotninth/xenogit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 30 次下载、GitHub Stars 达 10, 最近一次更新时间为 2023 年 08 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cli」 「git」 「console」 「message」 「commit」 「Gemini」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dotninth/xenogit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dotninth/xenogit 我们能提供哪些服务?
定制开发 / 二次开发

基于 dotninth/xenogit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 32
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-07