New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

komt

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

komt

AI-powered git commit message generator

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

Komt - AI-Powered Git Commit Tool

Generate conventional commit messages using AI

Komt analyzes your git changes and automatically creates well-formatted conventional commit messages using AI (Claude, OpenAI, or Gemini).

Features

  • AI-powered semantic analysis of code changes
  • Conventional Commits format (type, scope, description)
  • Two modes: simple (single commit) and compose (multi-commit grouping)
  • Multi-provider support: Claude, OpenAI, and Gemini
  • Automatic chunking for large changesets
  • Interactive preview with editor integration
  • Built with TypeScript + Bun

Installation

# Using bun
bun install -g komt

# Using npm
npm install -g komt

Quick Start

  • Initial Setup
komt config

Follow the prompts to configure your AI provider and API key.

  • Generate a Commit
# Stage your changes
git add .

# Generate and create commit
komt commit

Usage

Simple Mode (Default)

Generates a single commit message for all staged changes:

komt commit

Options:

  • -a, --all - Stage all changes before committing
  • -e, --edit - Open editor to modify commit message
  • -y, --yes - Skip confirmation prompt

Compose Mode

Intelligently groups changes into multiple logical commits:

komt commit --compose

Komt will analyze your changes and propose multiple commits, grouping related changes together.

Stashing Behavior:

  • With -a flag: All files are committed, no stashing occurs
  • Without -a flag: Unstaged files are safely stashed before creating commits, then automatically restored afterward. This preserves your work-in-progress while committing only staged changes.

Configuration

# Interactive configuration
komt config

# Show current configuration
komt config --show

# Change provider
komt config --set provider=claude

# Test API connection
komt config --test

Configuration File

Configuration is stored at ~/.komt/config.json:

{
  "provider": "claude",
  "providers": {
    "claude": {
      "apiKey": "sk-ant-...",
      "model": "claude-3-7-sonnet-20250219"
    },
    "openai": {
      "apiKey": "sk-...",
      "model": "gpt-4o"
    },
    "gemini": {
      "apiKey": "...",
      "model": "gemini-2.0-flash-exp"
    }
  }
}

Environment Variables

Override configuration with environment variables:

  • KOMT_PROVIDER - Provider name (claude/openai/gemini)
  • KOMT_API_KEY - Generic API key
  • KOMT_CLAUDE_API_KEY - Claude-specific key
  • KOMT_OPENAI_API_KEY - OpenAI-specific key
  • KOMT_GEMINI_API_KEY - Gemini-specific key

Conventional Commits

Komt generates commits following the Conventional Commits specification:

<type>(<scope>): <description>

[optional body]

Types:

  • feat: New feature or functionality
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code formatting only (whitespace, semicolons, indentation) - NOT UI/CSS styling
  • refactor: Code restructuring without changing behavior
  • test: Adding or updating tests
  • chore: Build process, dependencies, tooling

Note: UI/CSS styling improvements should use feat or fix, not style.

Examples

Simple commit:

feat(auth): implement JWT authentication

- Add JWT token generation and validation
- Implement password hashing with bcrypt
- Add authentication middleware

Multiple commits (compose mode):

[1/3] feat(auth): implement JWT authentication
[2/3] test(auth): add authentication tests
[3/3] docs: update API documentation

Development

# Install dependencies
bun install

# Run tests
bun test

# Run CLI locally
bun run src/index.ts

# Type check
bunx tsc --noEmit

License

MIT

Credits

Built with Bun and powered by AI.

Keywords

git

FAQs

Package last updated on 31 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts