Overseas access: www.kdjingpai.com
Bookmark Us

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.jsonfile 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 asgissy statusgissy infocap (a poem)gissy branchThe
  • 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, thegissycommand, 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 pathgissyOrdered.

2. Using npx (no installation required)
If you don't want to install Gissy locally, you can also use thenpxto run it directly.npxis 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.jsonfile 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"The
  • runTests: Whether or not to run tests before committing, defaults totrueThe
  • runLint: Whether to run code specification checks before committing, defaults totrueThe
  • useAI: Whether to use AI to generate the commit message, defaults tofalseThe
  • autoCommit: Whether or not to skip the pre-submission confirmation session, defaults tofalseThe
  • autoPush: Whether to skip the pre-push confirmation session, defaults tofalseThe
  • testCommand: Defines the specific command to run the test, defaults to"npm test"The
  • lintCommand: Defines the command to run the code specification check, defaults to"npm run lint"The
  • watchIgnore: 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.

  1. Create a file in the project root directory called.envof the document.
  2. 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 AIs 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 statusA 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 pushThe

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, thewatchThe workflow will start:

  • Detection of changes: Gissy will immediately notice that the file has changed.
  • Operational checks: If the configurationrunTestscap (a poem)runLintbecause oftrueIt's going to be executed.testCommandcap (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 anduseAIbecause oftrueGissy 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 thewatchcommand adds parameters to override the default configuration:

# 启动监视器并启用AI,同时输出详细日志
gissy watch --use-ai --verbose
# 临时忽略某些文件
gissy watch --ignore "*.tmp" "dist/**"

application scenario

  1. Initializing a new project
    When starting a new project, developers need to configure the.gitignorefile, initialize the Git repository, and make the first commit. Committing to a Git repository is done using thegissy sshGitHub access can be quickly configured.gissy watchThen subsequent commits and pushes can be handled automatically during the coding process, greatly simplifying the project startup process.
  2. 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 watchThe 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.
  3. 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.
  4. 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 watchIt 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

  1. What technology is Gissy built with?
    Gissy is built primarily in JavaScript (ES modules) and utilizes several popular Node.js libraries such asCommander.jsfor building command-line interfaces.Chokidarfor file monitoring.ChalkUsed to beautify the terminal output.
  2. 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.
  3. 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.
  4. Is Gissy leaking my code?
    When the AI feature is enabled, Gissy takes the code snippet you modified (thegit diffcontent) 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.
0Bookmarked
0kudos

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.

Top

en_USEnglish