Skip to content

Brenton-Keats/commit-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommitPlus

Enhanced git commit workflow with conventional commit prompts and AI-powered reviews.

Features

  • 🎯 Conventional Commit Prompts - Interactive prompts for all commit aspects
  • 🤖 AI-Powered Reviews - Optional OpenCode integration for commit quality checks
  • 📦 Smart Staging - Automatically offers to stage unstaged changes
  • Commit Validation - Ensures commit message quality

Installation

# Clone and install
git clone <repository-url>
cd commitplus
npm install

# Make the CLI executable
chmod +x bin/commitplus.js

Usage

Basic Usage

# Run the enhanced commit workflow
npm run commit

With AI Reviews (Optional)

Set your OpenCode API key to enable AI-powered commit reviews:

export OPENCODE_API_KEY=your_api_key_here

Workflow

  1. Stage Changes - Automatically detects and offers to stage unstaged changes
  2. Commit Prompts - Interactive prompts for:
    • Type (feat, fix, docs, style, etc.)
    • Scope (optional)
    • Subject (short description)
    • Body (detailed description)
    • Breaking changes (optional)
    • Issue references (optional)
  3. AI Review - Sends diff and commit info to OpenCode for quality review
  4. Final Review - Shows commit preview and AI review for final approval
  5. Commit - Creates the commit with the conventional format

Conventional Commit Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files

Environment Variables

  • OPENCODE_API_KEY - Your OpenCode API key for AI reviews (optional)

Scripts

  • npm run commit - Run the enhanced commit workflow

Files

  • src/commit.js - Main commit workflow orchestrator
  • src/commit-prompt.js - Conventional commit prompts
  • src/opencode-review.js - OpenCode API integration
  • bin/commitplus.js - CLI entry point

License

MIT

About

AI-powered conventional commit helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors