JSPM

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

Turns diffs into concise, readable git commit messages

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 (llm-commit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    LLM Commit

    Hopefully use any model to generate above average commit messages. The bar has never been lower

    https://repomix.com/guide/ some ideas for giving code to LLMs

    https://harper.blog/2024/03/11/use-an-llm-to-automagically-generate-meaningful-git-commit-messages/ basic idea

    https://cbea.ms/git-commit/

    Setup

    .env

    Follows https://sdk.vercel.ai/providers/ai-sdk-providers defaults

    ANTHROPIC_API_KEY=
    XAI_API_KEY=
    DEEPSEEK_API_KEY=

    Beyond .gitignore

    Certain files should be commited but their diff not used for generating the message

    • lockfiles
    • certain file types (.bin)
    • any very large diff

    Client side can add package-lock.json -diff to .gitattributes

    Roadmap

    • Interface for providing more custom args http://sdk.vercel.ai/docs/ai-sdk-core/settings
    • Performance Benchmarking (manual)
    • Run on previous commits
    • Run on commits in date range, manually approve/deny all changes or ask it to try again
    • Might as well have a frontend for the above

    Price

    Input tokens will likely be 10-100x output. Basic prompting with small commits will average maybe 1.5k input tokens per commit, and 100 output tokens would be on the very high end

    • 625 commits/$ using 3.5 Haiku
    • 167 commits/$ using 3.7 Sonnet

    Maybe it'll handle doing several commits from one prompt well, which would reduce cost a lot if using a lot of general codebase context

    Benchmarking

    Misc

    Diff is ugly to present usually, maybe some react package for that

    Probably prefer diffs in plain format since training data might work with diffs, but could try out something like diff/parse-diff/parse-git-diff