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

@eudalabs/aic

v1.1.0

Published

AI-powered CLI tool for git commit summaries

Downloads

187

Readme

AIC (AI Commit)

AIC is a powerful CLI tool that leverages AI to help you create meaningful git commit messages and understand code changes. It supports multiple AI providers and offers a seamless git workflow integration.

Features

  • 🤖 Multiple AI Provider Support: OpenAI, Claude, Groq, Phind, and Ollama integration
  • 📝 Conventional Commit Message Generation
  • 🔍 Code Change Analysis and Explanation
  • 🎯 Interactive Commit History Browser
  • 💡 Intelligent Context-Based Suggestions
  • 🚀 High-Performance Local Processing via Ollama
  • ✨ Automatic Change Categorization and Batch Commits
  • 📋 Automatic Clipboard Support
  • 🗂️ Smart File Categorization

Installation

# Using npm
npm install -g @eudalabs/aic

# Using yarn
yarn global add @eudalabs/aic

# Using pnpm
pnpm add -g @eudalabs/aic

Usage

Generate Commit Message

# Generate message for staged changes
aic draft

# Add context for better understanding
aic draft --context "Fixing the login timeout issue"

Explain Changes

# Explain current changes
aic explain --diff

# Explain staged changes
aic explain --diff --staged

# Explain a specific commit
aic explain abc123f

# Ask specific questions about changes
aic explain --diff --query "What files were modified?"

Batch Commit Changes

# Automatically categorize and commit changes
aic batch

# With specific provider
aic --provider ollama --model qwen2.5-coder:7b batch

View File Categories

# Show suggested categorization for current changes
aic categorize

# Show categorization for staged changes
aic categorize --staged

Browse and Explain Commits

# Interactive commit browser (requires fzf)
aic list

Configuration

Environment Variables

# Set default provider
export AIC_AI_PROVIDER=openai

# Set API key
export AIC_API_KEY=your_api_key

# Set specific model
export AIC_MODEL=gpt-4

Command Line Options

# Use specific provider
aic --provider openai draft

# Use specific model
aic --model gpt-4 explain --diff

# Provide API key directly
aic --api-key your_key explain --diff

# Enable debug mode
aic --debug batch

Supported Providers

| Provider | Authentication | Default Model | Local/Cloud | |----------|---------------|---------------|-------------| | OpenAI | API Key | gpt-4-turbo | Cloud | | Claude | API Key | claude-3-sonnet| Cloud | | Groq | API Key | mixtral-8x7b | Cloud | | Phind | None | Phind-70B | Cloud | | Ollama | None | (Required) | Local |

Requirements

  • Node.js >= 18.0.0
  • Git
  • fzf (required for list command)
    • Windows: Install via Chocolatey (choco install fzf)
    • macOS: Install via Homebrew (brew install fzf)
    • Linux: Use your package manager (apt install fzf or equivalent)
  • Ollama (optional, for local AI processing)

Features in Detail

Smart Categorization

Files are automatically grouped by:

  • API endpoints
  • Core services
  • AI providers
  • Type definitions
  • Configuration files
  • Documentation
  • Utilities
  • And more...

Batch Commit

The batch command automatically:

  • Analyzes all changes in your repository
  • Groups related files together
  • Generates appropriate commit messages for each group
  • Creates separate commits with proper conventional commit format
  • Handles complex changes intelligently

File Categorization

The categorize command:

  • Shows logical grouping of changed files
  • Helps understand code organization
  • Suggests file categories based on purpose
  • Supports both staged and unstaged changes

Technical Stack

  • TypeScript
  • Commander.js (CLI framework)
  • nanospinner (Elegant terminal spinners)
  • Various AI Provider APIs

Error Handling

AIC provides detailed error messages and hints:

  • Missing dependencies
  • Git repository issues
  • API authentication problems
  • Network connectivity issues
  • Invalid commit hashes
  • GPG signing issues
  • Provider-specific errors

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT

Acknowledgments

  • Built with TypeScript and modern Node.js features
  • Uses various AI models for intelligent suggestions
  • Inspired by conventional commit standards