JSPM

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

AI-powered CLI tool for effortless, context-aware Git commit messages. Uses OpenRouter LLMs to generate concise, meaningful commitsβ€”automating your workflow with smart AI insights.

Package Exports

    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

    openrouter-commit πŸš€ AI-Powered Git Commit Messages

    Generate smart, AI-driven Git commit messages using OpenRouter models like DeepSeek R1. Automate your commit workflow and write meaningful commits effortlessly.


    ⚑ Quick Start

    Run without installation

    npx openrouter-commit -run

    Install globally

    npm install -g openrouter-commit
    openrouter-commit -run

    Use in a project (package.json)

    {
        "scripts": {
            "commit": "npx openrouter-commit -run"
        }
    }

    Run it with:

    npm run commit  # or yarn commit

    πŸ”„ Updating

    • Global: npm update -g openrouter-commit
    • npx users: npx clear-npx-cache
    • Project-based: npm update openrouter-commit

    βš™οΈ Setup

    API Key & Model

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

    Option 2: Environment variables

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

    Option 3: Custom .env path

    npx openrouter-commit -run --env-path /custom/path/.env

    πŸš€ How It Works

    1️⃣ Checks Git status
    2️⃣ Prompts to stage changes
    3️⃣ Generates an AI-powered commit message
    4️⃣ Lets you confirm or edit it
    5️⃣ Commits and pushes automatically


    πŸ“‚ Ignored Files

    By default, openrouter-commit ignores common files that shouldn't be in commits:

    • node_modules/, .npm/, package-lock.json
    • venv/, env/, __pycache__/, *.pyc, *.pyo, Pipfile.lock, poetry.lock
    • .env, .env.*, .env.openrouter
    • logs/, *.log, debug.log*, *.swp, *.swo
    • .cache/, dist/, build/, site/
    • .idea/, .vscode/, .editorconfig
    • .DS_Store, Thumbs.db
    • .github/, .gitlab/, .circleci/, .travis.yml, .gitignore, .gitattributes

    If needed, modify the IGNORED_FILES list in openrouter-commit's source code.


    πŸ”₯ Features

    βœ… AI-powered commit messages
    βœ… Interactive CLI with confirmation prompts
    βœ… Custom .env paths with --env-path
    βœ… Handles large diffs intelligently
    βœ… Failsafe exit handling (Ctrl+C won’t commit unfinished work)
    βœ… Prevents accidental execution with -run flag
    βœ… Ignores unnecessary files from commits


    ❓ Troubleshooting

    Not enough OpenRouter credits?

    πŸ”— Top up here

    Command not found?

    npx openrouter-commit -run

    Or:

    npm install -g openrouter-commit
    openrouter-commit -run

    Git push fails?

    Ensure your branch is tracking a remote branch:

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

    πŸ’‘ About

    Built by Unrealos.com – AI, SaaS, and PaaS solutions.

    πŸ“œ License

    MIT Β© Unrealos.com πŸš€