npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

commit-wizard

v1.1.0

Published

Automagically generate commit messages using OpenAI.

Downloads

170

Readme

🧙‍♂️ Commit Wizard

Build Status npm downloads GitHub Release Date npm package NPM License GitHub Repo stars

Automagically generate clear and concise commit messages using OpenAI and Git. Perfect for keeping your Git history clean, organized, and magical! ✨

Commit Wizard Screenshot

🚀 Features

  • AI-powered: Uses OpenAI to generate meaningful commit messages based on your staged changes.
  • 💻 CLI tool: Simple command-line interface for fast and efficient workflow.
  • 📋 Consistent formatting: Ensures your commit history follows best practices.
  • 🎯 Customizable prompts: Option to print the prompt without sending it to the AI, giving you full control over the commit message generation process.
  • 📝 Custom messages: Add a custom message to include in the AI-generated prompt, allowing for more personalized commit messages.
  • 🗂 Exclude files: Easily exclude specific files from being considered when generating the commit message.

📦 Installation

You can install Commit Wizard globally using npm:

npm install -g commit-wizard

Or use it directly with npx without installation:

npx commit-wizard

🔑 API Key Setup

To use Commit Wizard, you will need to set up your OpenAI API key. This is required to enable AI-powered commit message generation.

  1. Obtain your OpenAI API key:

    • Go to the OpenAI platform and sign up or log in.
    • Navigate to the API section and create a new API key.
  2. Set your API key as an environment variable: Add the API key to your environment by setting the OPENAI_API_KEY variable:

    export OPENAI_API_KEY="your-api-key-here"

    Or, you can add it to your .bashrc, .zshrc, or other shell configuration files to automatically set it for future sessions.

Add API Key to Your Shell Configuration (Optional)

To avoid having to set the API key manually each time, you can add it to your shell configuration file:

  1. For Bash users: Open your .bashrc file and add the following line:

    echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.bashrc

    Then, apply the changes:

    source ~/.bashrc
  2. For Zsh users: Open your .zshrc file and add the following line:

    echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.zshrc

    Then, apply the changes:

    source ~/.zshrc

After this, your API key will be set automatically each time you open a new terminal session.


⚙️ Usage

Once installed, you can use the tool in any git repository.

  1. Stage your changes as usual:

    git add .
  2. Run Commit Wizard:

    commit-wizard

    Or, with npx:

    npx commit-wizard
  3. Confirm the commit message: After generating the commit message, you'll be asked to confirm if you want to proceed with the commit.

    Commit Wizard Screenshot


🛠️ Options

  • Custom Prompt: You can customize the AI prompt by passing the --message or -m flag.

    commit-wizard --message "Explain what changed in the codebase"
  • Exclude Files: Exclude specific files from the commit message generation.

    commit-wizard --exclude "README.md"

📸 Demo

Check out how easy it is to use Commit Wizard:

Commit Wizard Demo


🧑‍💻 Contributing

We welcome contributions! To get started:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Submit a pull request!

👩‍🚀 Author

Made with ❤️ by Ivan Gonzalez.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.