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

@alexiej/ai-cmd

v1.2.1

Published

AI command-line tool with configuration and git commit features

Downloads

291

Readme

AI Command-line tool

Version: 1.2.1

asciicast

The AI Command-line Tool enhances your Git workflow by using AI models to automatically generate high-quality commit messages. Currently, it supports OpenAI, with plans to expand support to other models in future releases. It helps streamline the commit process by providing tailored, insightful messages based on the changes in your repository, saving you time and ensuring consistent commit formats.

With the AI Command-line Tool, you can:

  • Automatically generate conventional commit messages.
  • Easily configure and switch between models.
  • Show nice diff for changed files.

Features

  • AI-powered commit messages: Automatically generate detailed commit messages based on code changes.
  • Support for multiple AI models: Easily switch between OpenAI models.
  • Integrated with Git: Seamless interaction with Git for streamlined commit workflows.

Installation

To install the CLI tool globally, ensure you have Node.js installed, then run the following command:

npm i @alexiej/ai-cmd

Usage

Config Command

To configure the AI model run:

ai-cmd config

This will prompt you to select the AI model you want

Commit Command

To automatically generate a commit message and commit changes:

ai-cmd commit

This will analyze the changes in your Git repository, generate a commit message using the selected AI model, and commit the changes.

Example generated commit message:

feat: Add user authentication to the application

- Implemented OAuth2 login flow.
- Added user session management.
- Fixed bugs related to session expiration.

Closes #123

Diff Command

Show a Git diff of staged and unstaged changes with custom highlighting.

ai-cmd diff -u src/**/*.ts

Command Line Help

AI Command-line tool
-----------------------------
This software enhances Git with AI-powered commit message generation
using OpenAI, Claude, and Ollama. Automatically create tailored,
insightful commit messages to streamline your development process.

 Version: 	 1.2.0
 Model: 	 Ollama mistral
		 [Ollama is live - 3 models available]

 Examples: 	 ai-cmd diff -u src/**/*.ts
 	 	 ai-cmd commit

Options:
  -V, --version             output the version number
  -h, --help                display help for command

Commands:
  config                    Configure model
  diff [options] [args...]  Show a Git diff of staged and unstaged changes with custom
                            highlighting
  commit                    Generate a Git commit based on the current staged changes and
                            AI-suggested commit message
  help [command]            display help for command

Future improvements:

  • Support for more AI models: Expand support to other AI models beyond OpenAI, Claude, and Ollama.

  • review process for code: Implement a feature that allows the AI to review code changes and suggest improvements.

  • summary process for code: Implement a summary for the code

  • feature process for code: Implement a feature implementaation, when you can ask AI what to do, and it will generate the code

  • Image generation: Add functionality for generating images .

LICENCE

MIT License

Copyright (c) 2024 alexiej

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.