Gissy is an open source command line tool designed to be a personal Git assistant for developers, which simplifies workflow by automating repetitive Git tasks. The tool's core feature is the use of Artificial Intelligence (AI) technology, specifically through the integration of various AI providers such as OpenAI, Google Gemini, and Addis AI, to automatically generate meaningful, specification-compliant Git commits.Gissy provides an intelligent file monitor that automatically detects file changes in the code repository and triggers a series of pre-defined quality check processes, such as running tests and code specification checks. Once the checks are complete, it can automate the entire process of staging, committing, and even pushing to a remote repository. The tool is built in JavaScript, supports cross-platform (Windows, macOS, Linux), and can be used out-of-the-box without complex configuration, while also providing a wealth of configuration options that allow developers to deeply customize according to project needs.
Function List
- Intelligent Document Monitor: Automatically monitor file changes in the code repository to trigger subsequent automated processes.
- Multi-AI service provider support: Integration with OpenAI, Google Gemini, and Addis AI to automatically select and generate high-quality Git commits based on the user's API key configuration.
- Automated workflows: The ability to automatically run tests, perform code specification checks, staging files, committing changes, and ultimately pushing code to remote repositories.
- SSH key auto-configuration: Provides commands to generate SSH keys with one click and automatically configure them to the user's GitHub account, simplifying preparation before the first code push.
- Highly configurable: The project can be accessed from the root directory via the
.gissyrc.json
file for detailed configuration, such as specifying the target branch, whether to enable testing, push and AI features, etc. - out-of-the-box: Gissy works fine with a reasonable set of default settings without a configuration file, lowering the barrier for first-time users.
- Enhanced Git Commands: Provides more informative and aesthetically pleasing alternatives to Git commands, such as
gissy status
,gissy info
cap (a poem)gissy branch
The - cross-platform compatibility: Based on Node.js development, it ensures that it works well on major operating systems such as Windows, macOS and Linux.
Using Help
Gissy is a powerful command line tool designed to streamline your Git workflow through automation and AI technology. Below you will find details on how to install, configure and use it.
mounting
Gissy is based on a Node.js environment, so make sure you have Node.js and npm installed on your computer.
1. Global installation (recommended)
To make it easy to use in any project, thegissy
command, a global installation is recommended. Open your terminal or command line tool and enter the following command:
npm install -g gissy
Once the installation is complete, you will be able to use it directly from any pathgissy
Ordered.
2. Using npx (no installation required)
If you don't want to install Gissy locally, you can also use thenpx
to run it directly.npx
is a package runner that comes with npm, it will temporarily download and execute the specified package without leaving any files on your system.
# 例如,使用npx运行status命令
npx gissy status
# 使用npx启动文件监视器
npx gissy watch
Basic Configuration
While Gissy works right out of the box, it can be made to better fit your project's needs with simple configuration.
Create a file in the root directory of your project named.gissyrc.json
file and add the following configuration items as needed:
{
"branch": "main",
"runTests": true,
"runLint": true,
"useAI": false,
"autoCommit": false,
"autoPush": false,
"testCommand": "npm test",
"lintCommand": "npm run lint",
"watchIgnore": [
"*.tmp",
"build/**",
"dist/**",
"node_modules/**",
".git/**",
"*.log"
]
}
Configuration item description:
branch
: Specify the target branch for code pushes, defaults to"main"
TherunTests
: Whether or not to run tests before committing, defaults totrue
TherunLint
: Whether to run code specification checks before committing, defaults totrue
TheuseAI
: Whether to use AI to generate the commit message, defaults tofalse
TheautoCommit
: Whether or not to skip the pre-submission confirmation session, defaults tofalse
TheautoPush
: Whether to skip the pre-push confirmation session, defaults tofalse
ThetestCommand
: Defines the specific command to run the test, defaults to"npm test"
ThelintCommand
: Defines the command to run the code specification check, defaults to"npm run lint"
ThewatchIgnore
: Defines the file or directory patterns to be ignored by the file monitor.
AI Service Provider Configuration
One of the most powerful features of Gissy is the automatic generation of submission messages by AI. To enable this feature, you need to configure the API key for your AI service provider.
- Create a file in the project root directory called
.env
of the document. - Depending on the API key you have, add the appropriate environment variables:
# OpenAI API密钥 (默认优先使用)
OPENAI_API_KEY=your_openai_api_key_here
# Google Gemini API密钥
GEMINI_API_KEY=your_gemini_api_key_here
# Addis AI API密钥 (支持本地语言)
ADDIS_AI_API_KEY=your_addis_ai_api_key_here
Gissy will followOpenAI
> Google Gemini
> Addis AI
s priority order automatically detects and uses the available API keys. If no key is provided, it falls back to the standard, non-AI submission message mode.
Core Functions Used
1. Check the status of the warehouse (gissy status
)
This command provides a more efficient and effective way than the nativegit status
A clearer, more colorful view of warehouse status lets you quickly see which files are modified, staged, or untracked.
gissy status
2. View warehouse information (gissy info
)
Displays detailed information about the current repository, including the remote repository URL, recent commits, and branches.
gissy info
3. Management branch (gissy branch
)
Used to list branches. It will highlight the current branch.
# 列出所有本地分支
gissy branch
# 列出所有远程分支
gissy branch --remote
# 列出所有本地和远程分支
gissy branch --all
4. Automatic configuration of SSH (gissy ssh
)
Configuring SSH keys is a common hurdle for first-time users pushing code to GitHub. This command automatically checks for, generates a new SSH key, and walks you through adding it to your GitHub account for password-less authentication of thegit push
The
gissy ssh
5. Launch the Smart File Monitor (gissy watch
)
This is the core automation feature of Gissy. After running this command, Gissy continuously monitors file changes in your project.
gissy watch
When you save a file, thewatch
The workflow will start:
- Detection of changes: Gissy will immediately notice that the file has changed.
- Operational checks: If the configuration
runTests
cap (a poem)runLint
because oftrue
It's going to be executed.testCommand
cap (a poem)lintCommand
. If the check fails, the process aborts and an error message is output to the console. - Generating Submission Information:: If the check passes and
useAI
because oftrue
Gissy analyzes the code differences using your configured AI service provider and generates a canonical commit message. - Staging and submission: Automatically add all changed files to the staging area and commit them using the generated information.
- Push Code: Finally, push the commit to the remote branch you specified in the configuration.
You can also create a customized version of thewatch
command adds parameters to override the default configuration:
# 启动监视器并启用AI,同时输出详细日志
gissy watch --use-ai --verbose
# 临时忽略某些文件
gissy watch --ignore "*.tmp" "dist/**"
application scenario
- Initializing a new project
When starting a new project, developers need to configure the.gitignore
file, initialize the Git repository, and make the first commit. Committing to a Git repository is done using thegissy ssh
GitHub access can be quickly configured.gissy watch
Then subsequent commits and pushes can be handled automatically during the coding process, greatly simplifying the project startup process. - Daily development and coding
In day-to-day development, developers often need to frequently switch between coding, testing, staging, committing, and pushing. gissy does this through thegissy watch
The command automates this series of operations so that developers only need to focus on writing code and saving the file triggers a complete quality check and version control process, thus reducing context switching and improving development efficiency. - Code review and teamwork
Uniform commit message specification is critical in team collaboration, and Gissy utilizes AI to generate commits that conform to Conventional Commits, ensuring clarity and consistency in commit history. This makes code reviews more efficient and team members more likely to understand the purpose of each change. - Refactoring or large feature development
When doing large refactoring or developing complex features, a large number of file modifications are involved. Managing these commits manually is both cumbersome and error-prone.gissy watch
It can run continuously in the background, automatically submitting small steps in the development process in batches to form a clear, atomized commit record that is easy to trace and roll back at a later stage.
QA
- What technology is Gissy built with?
Gissy is built primarily in JavaScript (ES modules) and utilizes several popular Node.js libraries such asCommander.js
for building command-line interfaces.Chokidar
for file monitoring.Chalk
Used to beautify the terminal output. - Do I have to pay to use Gissy's AI features?
Gissy itself is free and open source. However, it relies on third-party AI service providers, such as OpenAI or Google Gemini, for its AI functionality. using these services usually requires you to have the corresponding API key and may incur a fee, depending on the service provider's pricing strategy and your usage. - Will Gissy still work if I haven't configured any API keys for AI?
Can. Gissy will still work even if no API key is configured. In this case, when a commit message is required, it will fall back to a simple, standardized commit message based on a list of file changes, or prompt you to enter it manually. All non-AI related features such as file monitoring, automated testing, and push will be unaffected. - Is Gissy leaking my code?
When the AI feature is enabled, Gissy takes the code snippet you modified (thegit diff
content) to the third-party AI service provider you have configured (e.g., OpenAI) to generate submission information. You should adhere to your company's or project's security policies and be aware of the data privacy policies of the appropriate AI service providers.Gissy itself does not store or send your code anywhere else.