PonoPush is a command-line application designed to assist developers in making better Git commit messages using AI. It leverages the OpenAI API to generate detailed commit messages based on the changes made to the codebase. PonoPush ensures that commit messages are informative, well-structured, and easy to understand.
- Automatic Commit Message Generation: Uses OpenAI API to create detailed and structured commit messages.
- Customizable Prompts: Users can customize the prompt used for generating commit messages.
- Integration with Default Editor: Opens the suggested commit message in the user's default editor for review and modification.
- Configuration Management: Allows setting API configurations such as
api.token
,api.url
,api.model
, andapi.max_tokens
. - GPG Signing: Option to sign commits with GPG, controlled by the
gpg.enabled
configuration. - User-Provided Context: Developers can provide additional context for the AI by using the
-m
flag.
- Rust toolchain installed (use rustup).
- An OpenAI API token.
-
Clone the repository:
git clone https://github.com/yourusername/ponopush.git cd ponopush
-
Build the project:
cargo build --release
-
Install the binary:
sudo cp target/release/ponopush /usr/local/bin/
-
Ensure the configuration directory and file exist:
sudo mkdir -p /etc/ponopush sudo touch /etc/ponopush/ponopush.conf
-
Populate
/etc/ponopush/ponopush.conf
with your desired prompt template. Example:
You can set the API configuration using the following commands:
ponopush config api.token YOUR_API_TOKEN
ponopush config api.url YOUR_API_URL
ponopush config api.model YOUR_API_MODEL
ponopush config api.max_tokens YOUR_API_MAX_TOKENS
ponopush config gpg.enabled true
After making changes to your code, you can run:
ponopush
The application will generate a commit message, open it in your default editor for review, and commit the changes upon saving the file.
You can provide additional context for the AI by using the -m
flag:
ponopush -m "User feedback demands that the users are allowed to provide a generic and non-professional reason on why the commit was made so that the AI can use the information to improve its response"
If the -m
flag is not provided, the application will use the prompt from /etc/ponopush/ponopush.conf
as usual.