JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q42059F
  • License MIT

A smart CLI tool that generates AI-powered, context-aware Git commit messages using OpenRouter LLMs. Automate your workflow and write meaningful commits effortlessly.

Package Exports

  • openrouter-commit
  • openrouter-commit/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openrouter-commit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Вот обновленный README.md с новым названием openrouter-commit:


openrouter-commit - AI-powered Git Commit Messages 🚀

openrouter-commit is a CLI tool that helps you write clear, concise, and AI-generated commit messages using OpenRouter's LLM models.

Installation & Usage

Run without installation

You can use openrouter-commit immediately with npx:

npx openrouter-commit

Install globally

If you use it frequently, install it globally:

npm install -g openrouter-commit
openrouter-commit

Configuration

Before using openrouter-commit, set up your OpenRouter API key and model.

  1. Create a .env.openrouter file in your project's root:

    OPENROUTER_API_KEY=your-api-key
    OPENROUTER_MODEL=deepseek/deepseek-r1
  2. Or set the environment variables manually:

    export OPENROUTER_API_KEY=your-api-key
    export OPENROUTER_MODEL=deepseek/deepseek-r1

How It Works

When you run openrouter-commit, the script will:

  1. Check your Git status and show modified files.
  2. Prompt you to stage all changes (if they are not staged).
  3. Generate a commit message based on the Git diff using OpenRouter AI.
  4. Allow you to confirm, modify, or manually enter a commit message.
  5. Automatically commit and push your changes.

Example Workflow

npx openrouter-commit

✔ Checking Git status...
✔ Would you like to add all changes to the commit? (Y/n)
✔ Generating commit message with AI...
Suggested Commit Message:
📝 "Fix API response handling and improve error messages"
✔ What would you like to do?

  • Use this commit message
  • Enter my own message
  • Exit

Features

AI-powered commit messages
Interactive CLI with confirmation prompts
Uses .env.openrouter for easy configuration
Handles large diffs (truncates beyond 10,000 characters)
Failsafe exit handling (Ctrl+C won’t commit unfinished work)

Troubleshooting

Not enough OpenRouter credits?

Visit OpenRouter Credits and add more.

Command not found?

Try running:

npx openrouter-commit

Or, if installed globally:

npm install -g openrouter-commit
openrouter-commit

Git push fails?

Ensure your branch is set up to track a remote branch:

git branch --set-upstream-to=origin/main

About

Developed by Unrealos.com – AI, SaaS, and PaaS solutions for businesses.

License

MIT © Unrealos.com