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-sensei

v1.0.6

Published

This CLI tool helps developers generate concise and meaningful commit messages for their projects

Downloads

24

Readme

Commit Message Generator CLI

This CLI tool helps developers generate concise and meaningful commit messages for their projects. Leveraging the power of Google Generative AI, it suggests commit messages based on the diff of staged changes. The tool ensures adherence to best practices for commit messages, including proper formatting and optional inclusion of emojis.

Features

  • AI-Powered Commit Messages: Generates commit messages using Google Generative AI.
  • Rate Limiting: Adheres to API rate limits to prevent overuse.
  • Configuration Management: Stores and manages API keys securely.
  • Emoji Support: Automatically adds relevant emojis based on the commit type.
  • Interactive Editing: Allows users to review and edit the generated commit message before finalizing the commit.

Installation

To install Commit Sensei globally, use the following command:

npm install -g commit-sensei

Usage

  1. Set Configuration: Configure the tool with your Google Generative AI API key.

    commit-sensei set-config

    This command prompts you to enter your API key, which is then saved to a .genai-config.json file in your project's root directory.

  2. Generate Commit Message: Generate a commit message based on your staged changes.

    commit-sensei generate

    This command analyzes the staged changes, generates a commit message, and allows you to edit the message before committing.

Notes

  • .gitignore Configuration: Ensure that .genai-config.json and .genai-usage.json are included in your .gitignore file to avoid committing sensitive information.
  • Node.js Version: Commit Sensei requires Node.js version 18 or higher.

Configuration

The tool stores configuration details in a .genai-config.json file in the project's root directory. The file includes the API key needed to access Google Generative AI services.

Rate Limiting

To comply with the API's rate limits, the tool tracks usage and ensures that the following limits are not exceeded:

  • 15 Requests Per Minute (RPM)
  • 1 Million Tokens Per Minute (TPM)
  • 1,500 Requests Per Day (RPD)

Emoji Mapping

The tool supports the following conventional commit types with corresponding emojis:

  • feat (new feature): ✨
  • fix (bug fix): 🐛
  • docs (documentation): 📚
  • style (formatting, missing semi-colons, etc.): 💎
  • refactor (code change that neither fixes a bug nor adds a feature): 🔨
  • perf (performance improvement): 🚀
  • test (adding missing tests or correcting existing tests): 🚨
  • build (changes that affect the build system or external dependencies): 📦
  • ci (changes to CI configuration files and scripts): 👷
  • chore (other changes that don't modify src or test files): 🔧

Future Roadmap

1. Batch Processing

  • Handle multiple commits or large diffs by summarizing changes or generating multiple commit messages.

2. Extended Emoji Support

  • Expand emoji options to cover more commit types and scenarios.

3. Customizable Prompts

  • Allow users to customize prompts and commit message formats according to their team's conventions.

4. Localization

  • Add support for multiple languages, enabling internationalization of commit messages.

5. Enhanced Configuration Management

  • Provide more robust configuration options, such as environment-based settings and secure storage.

6. Advanced Rate Limiting

  • Implement more sophisticated rate limiting strategies, including user-specific limits and real-time monitoring.

7. Integration with CI/CD

  • Integrate the tool with popular CI/CD pipelines to automate commit message generation.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss improvements or report bugs.

License

This project is licensed under the MIT License.