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

git_smart

v1.0.1

Published

A package to generate git commit messages using Google AI

Downloads

13

Readme

Git Smart

Git Smart is an AI-powered Git commit message generator that helps you create meaningful, well-structured commit messages effortlessly. It uses Google's Generative AI to analyze your code changes and generate appropriate commit messages following Git best practices and Gitmoji conventions.

Features

  • AI-generated commit messages based on your staged changes
  • Gitmoji integration for visual categorization of commits
  • Interactive editing of generated commit messages
  • Easy-to-use command-line interface
  • Customizable with your own commit message input

Installation

To install Git Smart globally, run:

npm install -g git_smart

Prerequisites

  • Node.js (version 14.0.0 or higher)
  • Git installed and accessible from the command line
  • A Google API key for accessing the Generative AI model

Setup

  1. Obtain a Google API key from the Google AI Studio.

  2. Set the API key as an environment variable:

    For Unix-based systems (Linux, macOS):

    export GOOGLE_API_KEY=your_api_key_here

    For Windows:

    set GOOGLE_API_KEY=your_api_key_here

Alternatively, you can add this to your shell configuration file (e.g., .bashrc, .zshrc) for persistence.

Usage

  1. Navigate to your Git repository in the terminal.

  2. Stage your changes using git add.

  3. Run the following command:

    git_smart

  4. The tool will analyze your staged changes and generate a commit message.

  5. You'll have the option to edit the generated message or proceed with the commit.

Custom Commit Message

If you want to provide your own commit message or additional context, you can pass it as an argument:

git_smart "Your custom message or additional context"

The AI will incorporate your input into the final commit message.

Troubleshooting

If you encounter any issues:

  1. Ensure your GOOGLE_API_KEY is correctly set and valid.
  2. Verify that Git is installed and accessible from the command line.
  3. Check that you're running the command from within a Git repository.
  4. Make sure you have staged changes before running git_smart.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Acknowledgments

  • Thanks to the Google Generative AI team for providing the AI model.
  • Inspired by the Gitmoji project for commit message emojis.

Disclaimer

This tool uses AI to generate commit messages. While it strives for accuracy, always review the generated messages to ensure they accurately represent your changes before committing.