Lazy is a simple and intelligent CLI tool designed to make your life easier by automating repetitive tasks. It uses OpenAI's GPT-3.5-turbo to provide commit message suggestions based on your staged changes. lazy commit
is the first tool in the Lazy suite, with more tools to come in the future.
- Automated Commit Message Suggestions: Uses OpenAI's GPT-3.5-turbo to suggest commit messages based on your staged changes.
- Emoji Commit Format: Provides commit messages in a format that includes emojis for better visibility and categorization.
- Interactive Selection: Allows you to choose from multiple suggested commit messages using a simple interactive prompt.
To install LazyCommit, use the following command:
go install github.com/jasonbirchall/lazy@latest
-
Set Up API Key: Ensure you have an OpenAI API key. You can set it as an environment variable:
export OPENAI_TOKEN=your_openai_api_key
Alternatively, you can store it in a configuration file at
~/.lazycommit.yaml
: you can runlazy init
to create the configuration fileopenai_api_key: your_openai_api_key
-
Stage Your Changes: Use
git add
to stage the changes you want to commit. -
Run LazyCommit: Execute the following command to get commit message suggestions:
lazy commit
-
Select a Commit Message: Choose a commit message from the suggestions provided.
-
Commit Your Changes: LazyCommit will automatically commit your changes with the selected message.
Here's an example of how to use LazyCommit:
git add .
lazy commit
# Output:
# > 🚀 Added a new feature to improve user experience
# 🐛 Fixed a bug that caused the application to crash
# 📝 Updated the documentation to reflect the latest changes
# 🎨 Refactored the code to improve readability
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.