@himenon/claude-commit-msg-gen 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,44 +1,61 @@
1
1
  # claude-commit-msg-gen
2
2
 
3
- [Claude API](https://www.anthropic.com/) [Lefthook](https://lefthook.dev/) を組み合わせ、`git commit` 時に Conventional Commits 形式のコミットメッセージを自動生成するツールです。
3
+ A CLI tool that automatically generates [Conventional Commits](https://www.conventionalcommits.org/) messages from staged diffs using the [Anthropic API](https://www.anthropic.com/) and [Lefthook](https://lefthook.dev/).
4
4
 
5
- 構造・設計の詳細は [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) を参照してください。
5
+ For architecture and design details, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
6
6
 
7
- ## セットアップ
7
+ ## Setup
8
8
 
9
- ### 1. Anthropic API キーを設定
9
+ ### 1. Set Anthropic API key
10
10
 
11
11
  ```sh
12
12
  export ANTHROPIC_API_KEY="sk-ant-..."
13
13
  ```
14
14
 
15
- ### 2. Lefthook をインストール
15
+ ### 2. Install Lefthook
16
16
 
17
17
  ```sh
18
18
  brew install lefthook
19
+ # or
19
20
  pnpm add -g lefthook
20
21
  ```
21
22
 
22
- ### 3. バイナリをインストール
23
+ ### 3. Install the binary
24
+
25
+ **Via curl (no Node.js required):**
26
+
27
+ ```sh
28
+ curl -fsSL https://raw.githubusercontent.com/Himenon/claude-commit-msg-gen/main/scripts/install.sh | sh
29
+ ```
30
+
31
+ To install to a custom directory:
32
+
33
+ ```sh
34
+ INSTALL_DIR="$HOME/.local/bin" curl -fsSL https://raw.githubusercontent.com/Himenon/claude-commit-msg-gen/main/scripts/install.sh | sh
35
+ ```
36
+
37
+ **Via npm / pnpm:**
23
38
 
24
39
  ```sh
25
40
  pnpm install -g @himenon/claude-commit-msg-gen
41
+ # or
42
+ npm install -g @himenon/claude-commit-msg-gen
26
43
  ```
27
44
 
28
- ### 4. フックを有効化
45
+ ### 4. Enable the hook
29
46
 
30
47
  ```sh
31
48
  lefthook install
32
49
  ```
33
50
 
34
- 以上で `git commit` 時にコミットメッセージが自動生成されます。
51
+ `git commit` will now auto-generate commit messages.
35
52
 
36
- ## API キーをシェル環境に書きたくない場合
53
+ ## Keep the API key out of your shell profile
37
54
 
38
- `lefthook-local.yml` API キーを記述する方法があります。このファイルは `.gitignore` 対象のため、リポジトリに混入しません。
55
+ Write the API key in `lefthook-local.yml` instead. This file is listed in `.gitignore` and will never be committed.
39
56
 
40
57
  ```yaml
41
- # lefthook-local.yml(.gitignore 対象)
58
+ # lefthook-local.yml (.gitignore'd)
42
59
  prepare-commit-msg:
43
60
  jobs:
44
61
  - name: auto-commit-message
@@ -46,26 +63,26 @@ prepare-commit-msg:
46
63
  ANTHROPIC_API_KEY: "sk-ant-..."
47
64
  ```
48
65
 
49
- `lefthook-local.yml` `lefthook.yml` の設定を上書き・マージします。記述した `env` のみが上書きされ、他の設定は `lefthook.yml` の値が引き続き使われます。
66
+ `lefthook-local.yml` is merged on top of `lefthook.yml`. Only the keys you specify are overridden; everything else continues to use the values from `lefthook.yml`.
50
67
 
51
- ## トラブルシューティング
68
+ ## Troubleshooting
52
69
 
53
- **`Binary not found` と表示される**
70
+ **`Binary not found` is shown**
54
71
 
55
72
  ```sh
56
73
  pnpm run build
57
74
  ```
58
75
 
59
- **`ANTHROPIC_API_KEY が未設定` と表示される**
76
+ **`ANTHROPIC_API_KEY is not set` is shown**
60
77
 
61
78
  ```sh
62
79
  echo $ANTHROPIC_API_KEY
63
80
  ```
64
81
 
65
- **自動生成を一時的に無効にしたい**
82
+ **Temporarily disable auto-generation**
66
83
 
67
84
  ```sh
68
85
  LEFTHOOK=0 git commit
69
86
  ```
70
87
 
71
- > `claude` CLI を使ったシェルスクリプトによる代替実装は [docs/shell-script-alternative.md](docs/shell-script-alternative.md) を参照してください。
88
+ > For the shell-script alternative using the `claude` CLI, see [docs/SHELL_SCRIPT_ALTERNATIVE.md](docs/SHELL_SCRIPT_ALTERNATIVE.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@himenon/claude-commit-msg-gen",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Claude API を使って git diff から Conventional Commits 形式のコミットメッセージを自動生成する CLI ツール",
5
5
  "license": "MIT",
6
6
  "author": "K.Himeno",