npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@himenon/chatgpt-commit-msg-gen

v0.1.0

Published

Generate Conventional Commits messages with the Codex CLI or OpenAI API

Readme

chatgpt-commit-msg-gen

Codex CLI または OpenAI API で staged diff を分析し、Lefthook の prepare-commit-msg から Conventional Commits 形式のコミットメッセージを生成するCLIです。

既定ではCodex CLIを使い、利用できない場合や生成に失敗した場合はOpenAI Responses APIへフォールバックします。どちらの生成にも失敗した場合でも git commit は中断しません。

セットアップ

# npm経由
pnpm add -g @himenon/chatgpt-commit-msg-gen

# またはGitHub Releaseから(Node.js不要)
curl -fsSL https://raw.githubusercontent.com/Himenon/chatgpt-commit-msg-gen/main/scripts/install.sh | sh

chatgpt-commit-msg-gen --version

Lefthookと、少なくとも一方の認証手段を準備します。

brew install lefthook

# 推奨: Codex CLIへログイン
codex login

# APIフォールバックも使う場合
export OPENAI_API_KEY="sk-..."

利用先リポジトリの lefthook.yml に設定し、lefthook install を実行します。

prepare-commit-msg:
  jobs:
    - name: auto-commit-message
      run: chatgpt-commit-msg-gen {1} {2}

あとは通常どおり、メッセージを指定せずコミットします。

git add <files>
git commit

git commit -m、merge commit、staged diffがない場合は生成をスキップします。

設定

| 環境変数 | 既定値 | 説明 | | --- | --- | --- | | COMMIT_GENERATOR | auto | auto(Codex→API)、codexapi | | COMMIT_LANGUAGE | ja | ja または enCOMMIT_PROMPT指定時は無視 | | COMMIT_PROMPT | 内蔵プロンプト | 生成ルールを完全に上書き | | CODEX_MODEL | Codex設定値 | Codex CLIで使うモデル | | OPENAI_API_KEY | — | Responses APIの認証キー | | OPENAI_MODEL | gpt-5.6-luna | APIで使うモデル | | OPENAI_MAX_OUTPUT_TOKENS | 150 | APIの最大出力トークン数 | | OPENAI_BASE_URL | https://api.openai.com | OpenAI互換エンドポイントのベースURL |

例:

      env:
        COMMIT_GENERATOR: auto
        COMMIT_LANGUAGE: en
        CODEX_MODEL: gpt-5.3-codex
        OPENAI_MODEL: gpt-5.6-luna

プロジェクトの lefthook.yml を変更したくない場合は、lefthook-local.yml.gitignore に追加して同じ設定を記述できます。

開発

pnpm test
pnpm run build

対応プラットフォームは macOS/Linux の arm64/amd64 です。構成の詳細は docs/ARCHITECTURE.md を参照してください。