@k2works/claude-code-booster 0.21.3 → 0.22.0

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.
@@ -0,0 +1,177 @@
1
+ ## ADR (Architecture Decision Record)
2
+
3
+ アーキテクチャ決定記録(ADR)の作成・管理を行うコマンド。
4
+
5
+ ### 使い方
6
+
7
+ ```bash
8
+ /adr [オプション] [引数]
9
+ ```
10
+
11
+ ### オプション
12
+
13
+ - なし : ADR 一覧を表示
14
+ - `--create <タイトル>` : 新しい ADR を作成
15
+ - `--update <番号>` : 既存の ADR を更新
16
+ - `--status <番号> <ステータス>` : ADR のステータスを更新
17
+ - `<番号>` : 指定した ADR の内容を表示
18
+
19
+ ### 基本例
20
+
21
+ ```bash
22
+ # ADR 一覧を表示
23
+ /adr
24
+ 「現在のADR一覧を表示してください」
25
+
26
+ # 新しい ADR を作成
27
+ /adr --create バックエンドキャッシュ戦略の選択
28
+ 「Redis をキャッシュとして採用する ADR を作成してください」
29
+
30
+ # 特定の ADR を表示
31
+ /adr 005
32
+ 「ADR-005 の内容を表示してください」
33
+
34
+ # ADR のステータスを更新
35
+ /adr --status 003 deprecated
36
+ 「ADR-003 を deprecated に変更してください」
37
+ ```
38
+
39
+ ### 詳細機能
40
+
41
+ #### ADR ファイル構造
42
+
43
+ ADR は `docs/adr/` ディレクトリに以下の命名規則で保存される:
44
+
45
+ ```
46
+ docs/adr/
47
+ ├── 001-backend-architecture-pattern.md
48
+ ├── 002-backend-framework.md
49
+ ├── 003-frontend-framework.md
50
+ └── 004-database.md
51
+ ```
52
+
53
+ #### ADR テンプレート
54
+
55
+ 新しい ADR は以下のテンプレートで作成する:
56
+
57
+ ```markdown
58
+ # ADR-NNN: タイトル
59
+
60
+ 簡潔な説明(1行で決定内容を要約)。
61
+
62
+ 日付: YYYY-MM-DD
63
+
64
+ ## ステータス
65
+
66
+ 提案中 | 承認済み | 廃止 | 置換(ADR-XXX で置換)
67
+
68
+ ## コンテキスト
69
+
70
+ この決定が必要になった背景・状況を説明。
71
+
72
+ - 現在の課題や制約
73
+ - 関連するシステムやサービス
74
+ - ビジネス要件
75
+
76
+ ## 決定
77
+
78
+ **何を決定したか** を明確に記述。
79
+
80
+ ### 変更箇所
81
+
82
+ 具体的な実装変更がある場合は記載:
83
+
84
+ 1. **ファイル1**
85
+ ```
86
+ 変更内容
87
+ ```
88
+
89
+ 2. **ファイル2**
90
+ ```
91
+ 変更内容
92
+ ```
93
+
94
+ ### 代替案
95
+
96
+ 検討した代替案とその却下理由:
97
+
98
+ 1. **代替案1**
99
+ - 却下理由: ...
100
+
101
+ 2. **代替案2**
102
+ - 却下理由: ...
103
+
104
+ ## 影響
105
+
106
+ ### ポジティブ
107
+
108
+ - 良い影響1
109
+ - 良い影響2
110
+
111
+ ### ネガティブ
112
+
113
+ - 悪い影響や注意点1
114
+ - 悪い影響や注意点2
115
+
116
+ ## コンプライアンス
117
+
118
+ 決定が正しく実装されていることを確認する方法:
119
+
120
+ - チェック項目1
121
+ - チェック項目2
122
+
123
+ ## 備考
124
+
125
+ - 著者: 担当者名
126
+ - 関連コミット: コミットハッシュ
127
+ - 関連 ADR: ADR-XXX
128
+ ```
129
+
130
+ #### ステータスの種類
131
+
132
+ | ステータス | 説明 |
133
+ |-----------|------|
134
+ | 提案中 | レビュー待ちの ADR |
135
+ | 承認済み | 採用された決定 |
136
+ | 廃止 | 無効になった決定 |
137
+ | 置換 | 別の ADR で置き換えられた |
138
+
139
+ ### Claude との連携
140
+
141
+ ```bash
142
+ # 既存の設計からADRを抽出
143
+ cat docs/design/architecture.md
144
+ /adr --create
145
+ 「アーキテクチャ設計から主要な決定をADRとして抽出してください」
146
+
147
+ # 問題の背景を説明してADR作成
148
+ 「NAS環境でWikiサービスがポート3000を使用しているため、
149
+ バックエンドのポートを3001に変更したい」
150
+ /adr --create バックエンドAPIポート変更
151
+
152
+ # ADR作成後の関連ドキュメント更新
153
+ /adr --create 新機能の技術選定
154
+ 「ADR作成後、docs/index.md と mkdocs.yml も更新してください」
155
+ ```
156
+
157
+ ### 注意事項
158
+
159
+ - **採番規則**: ADR 番号は 001 から連番で管理。既存の最大番号 + 1 で採番
160
+ - **ファイル名**: `NNN-kebab-case-title.md` 形式(例: `006-cache-strategy.md`)
161
+ - **配置場所**: 必ず `docs/adr/` ディレクトリに配置
162
+ - **ドキュメント更新**: 新規 ADR 作成時は `docs/index.md` と `mkdocs.yml` も更新が必要
163
+ - **コミット禁止**: ユーザーの指示があるまでコミットしない
164
+
165
+ ### ベストプラクティス
166
+
167
+ 1. **簡潔な要約**: タイトル直下に 1 行で決定内容を要約する
168
+ 2. **コンテキストの明確化**: なぜこの決定が必要なのか背景を説明
169
+ 3. **代替案の記録**: 検討した選択肢と却下理由を残す
170
+ 4. **影響の両面記載**: ポジティブ・ネガティブ両方の影響を記載
171
+ 5. **コンプライアンス項目**: 決定が守られていることを確認する方法を記載
172
+
173
+ ### 関連コマンド
174
+
175
+ - `/docs` : ドキュメントの更新・管理
176
+ - `/analysis-architecture` : アーキテクチャ分析
177
+ - `/git-commit` : 変更のコミット
@@ -0,0 +1,9 @@
1
+ # 環境変数テンプレート
2
+ # このファイルをコピーして .env を作成してください
3
+ # cp .env.example .env
4
+
5
+ # MkDocs サーバー設定
6
+ MKDOCS_PORT=8000
7
+
8
+ # Docker 設定(通常は設定不要、Docker Desktop が自動設定)
9
+ # DOCKER_HOST=npipe:////./pipe/docker_engine
Binary file
@@ -136,6 +136,11 @@
136
136
  - **シンタックスハイライト**: `vim-scala` により Scala 構文がサポートされます。
137
137
  - **LSP連携**: `nix develop .#scala` 環境下で、`Metals` を使用した高度な開発が可能です。
138
138
 
139
+ ### [F# 開発](https://github.com/ionide/ionide-vim)
140
+ - **Ionide-vim**: F# 用の高度な開発支援プラグインです。
141
+ - **シンタックスハイライト**: `ionide/ionide-vim` により F# 構文がサポートされます。
142
+ - **LSP連携**: `nix develop .#dotnet` 環境下で、`ionide-vim` による高度な開発支援(補完、定義ジャンプ等)が利用可能です。
143
+
139
144
  ### [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) (ファイル検索・セレクタ)
140
145
  | キー | 動作 |
141
146
  |---|---|
@@ -0,0 +1,663 @@
1
+ # 環境変数管理ガイド
2
+
3
+ このドキュメントでは、プロジェクトで使用する環境変数について説明します。
4
+
5
+ ## dotenv とは
6
+
7
+ ### 概要
8
+
9
+ **dotenv** は、環境変数を `.env` ファイルから読み込むためのライブラリです。アプリケーションの設定値をソースコードから分離し、環境ごとに異なる設定を簡単に管理できます。
10
+
11
+ ### なぜ dotenv を使うのか
12
+
13
+ 1. **セキュリティ**: パスワードや API キーをソースコードにハードコーディングせず、Git 管理外のファイルで管理
14
+ 2. **環境の分離**: 開発・ステージング・本番環境で異なる設定を簡単に切り替え
15
+ 3. **チーム開発**: 各開発者が自分の環境に合わせた設定を使用可能
16
+ 4. **12-Factor App**: [The Twelve-Factor App](https://12factor.net/ja/config) の設定管理ベストプラクティスに準拠
17
+
18
+ ### 仕組み
19
+
20
+ ```plantuml
21
+ @startuml
22
+ title dotenv による環境変数読み込みの流れ
23
+
24
+ skinparam rectangle {
25
+ BackgroundColor #f5f5f5
26
+ BorderColor #333333
27
+ }
28
+
29
+ rectangle ".env ファイル" as env
30
+ rectangle "process.env (Node.js)" as process
31
+ rectangle "アプリケーションコード" as app
32
+
33
+ env -down-> process : dotenv が読み込み
34
+ process -down-> app : アプリケーションで使用
35
+
36
+ note right of env
37
+ MKDOCS_PORT=8000
38
+ DOCKER_HOST=npipe:////./pipe/docker_engine
39
+ end note
40
+
41
+ note right of process
42
+ process.env.MKDOCS_PORT
43
+ process.env.DOCKER_HOST
44
+ end note
45
+
46
+ note right of app
47
+ const port = process.env.MKDOCS_PORT;
48
+ end note
49
+
50
+ @enduml
51
+ ```
52
+
53
+ ## セットアップ方法
54
+
55
+ ### 1. パッケージのインストール
56
+
57
+ ```bash
58
+ npm install dotenv
59
+ ```
60
+
61
+ ### 2. .env ファイルの作成
62
+
63
+ ```bash
64
+ # テンプレートからコピー
65
+ cp .env.example .env
66
+
67
+ # または新規作成
68
+ touch .env
69
+ ```
70
+
71
+ ### 3. .env ファイルの編集
72
+
73
+ ```bash
74
+ # プロジェクトルート/.env
75
+ MKDOCS_PORT=8000
76
+ ```
77
+
78
+ ### 4. アプリケーションでの読み込み
79
+
80
+ ```javascript
81
+ // 方法1: エントリーポイントの先頭でインポート(推奨)
82
+ import 'dotenv/config';
83
+
84
+ // 方法2: 明示的に config() を呼び出し
85
+ import * as dotenv from 'dotenv';
86
+ dotenv.config();
87
+
88
+ // 環境変数を使用
89
+ const port = process.env.MKDOCS_PORT || 8000;
90
+ ```
91
+
92
+ ### 5. .gitignore に追加
93
+
94
+ ```gitignore
95
+ # .gitignore
96
+ .env
97
+ .env.local
98
+ .env.*.local
99
+ ```
100
+
101
+ ## 環境変数ファイル一覧
102
+
103
+ | ファイル | 用途 | Git 管理 |
104
+ |---------|------|----------|
105
+ | `.env` | ローカル開発用設定 | ✗ |
106
+ | `.env.example` | 設定テンプレート | ✓ |
107
+
108
+ ## プロジェクト環境変数
109
+
110
+ ### Docker 設定
111
+
112
+ | 変数名 | 説明 | デフォルト値 |
113
+ |--------|------|-------------|
114
+ | `DOCKER_HOST` | Docker デーモンへの接続先 | (システム依存) |
115
+
116
+ ### MkDocs 設定
117
+
118
+ | 変数名 | 説明 | デフォルト値 |
119
+ |--------|------|-------------|
120
+ | `MKDOCS_PORT` | MkDocs サーバーのポート番号 | `8000` |
121
+
122
+ ## 重要な注意事項
123
+
124
+ ### DOCKER_HOST 環境変数について
125
+
126
+ Docker Desktop 使用時に `DOCKER_HOST` 環境変数が不正に設定されていると接続エラーが発生します。
127
+
128
+ ```
129
+ ERROR: error during connect: Head "http://.%2Fpipe%2Fdocker_engine/_ping":
130
+ open ./pipe/docker_engine: The system cannot find the path specified.
131
+ ```
132
+
133
+ **Windows 環境での正しい設定:**
134
+
135
+ ```bash
136
+ # 正しい形式
137
+ DOCKER_HOST=npipe:////./pipe/docker_engine
138
+
139
+ # 誤った形式(エラーになる)
140
+ DOCKER_HOST=npipe://./pipe/docker_engine
141
+ ```
142
+
143
+ **解決方法:**
144
+
145
+ ```bash
146
+ # 環境変数を削除(Docker Desktop が自動設定する)
147
+ unset DOCKER_HOST
148
+ ```
149
+
150
+ > **注意**: 本プロジェクトの gulp タスクは Windows 環境で自動的に `DOCKER_HOST` を正規化します。
151
+
152
+ ### セキュリティに関する注意
153
+
154
+ - `.env` ファイルは Git にコミットしないでください
155
+ - 機密情報(API キー、パスワード等)は `.env` ファイルで管理してください
156
+ - 本番環境では環境変数を直接設定することを推奨します
157
+
158
+ ## .env ファイルの読み込み優先順位
159
+
160
+ ```plantuml
161
+ @startuml
162
+ title Node.js (dotenv) 読み込み優先順位
163
+
164
+ skinparam defaultTextAlignment center
165
+
166
+ rectangle "1. シェル環境変数\n(最優先)" as shell #ff9999
167
+ rectangle "2. .env.local\n(Git 管理外)" as local #ffcc99
168
+ rectangle "3. .env\n(ローカル設定)" as env #99ff99
169
+
170
+ shell -[hidden]down-> local
171
+ local -[hidden]down-> env
172
+
173
+ note right of shell : 既存の環境変数は上書きされない
174
+ note right of local : ローカル固有の設定
175
+ note right of env : デフォルト値
176
+
177
+ @enduml
178
+ ```
179
+
180
+ ## .env ファイルの書き方
181
+
182
+ ```bash
183
+ # コメントは # で始める
184
+
185
+ # 基本的な書き方
186
+ KEY=value
187
+
188
+ # 値にスペースを含む場合はクォートで囲む
189
+ MESSAGE="Hello World"
190
+
191
+ # 変数の展開(dotenv-expand が必要)
192
+ BASE_URL=http://localhost
193
+ API_URL=${BASE_URL}/api
194
+ ```
195
+
196
+ ## ベストプラクティス
197
+
198
+ | Do | Don't |
199
+ |----|-------|
200
+ | `.env.example` をテンプレートとして Git 管理 | `.env` を Git にコミット |
201
+ | 本番環境では環境変数を直接設定 | 本番環境で `.env` ファイルを使用 |
202
+ | 変数名は `SCREAMING_SNAKE_CASE` を使用 | 小文字や camelCase を使用 |
203
+ | デフォルト値をコードで設定 | `.env` ファイルのみに依存 |
204
+
205
+ ```javascript
206
+ // デフォルト値の設定例
207
+ const port = process.env.MKDOCS_PORT || 8000;
208
+ const nodeEnv = process.env.NODE_ENV || 'development';
209
+ ```
210
+
211
+ ## Vault(暗号化・復号化)
212
+
213
+ ### 概要
214
+
215
+ Vault は `.env` ファイルを安全に暗号化・復号化するためのツールです。暗号化されたファイル(`.env.vault`)は Git にコミットでき、チームメンバー間で安全に環境変数を共有できます。
216
+
217
+ ### なぜ Vault を使うのか
218
+
219
+ 1. **チーム間での秘密情報共有**: `.env` を直接共有せず、暗号化して Git 管理
220
+ 2. **環境の再現性**: 新しいメンバーがすぐに開発環境を構築可能
221
+ 3. **セキュリティ**: AES-256-GCM による強力な暗号化
222
+ 4. **シンプルさ**: 外部サービス不要、パスワードのみで運用
223
+
224
+ ### 暗号化仕様
225
+
226
+ ```plantuml
227
+ @startuml
228
+ title Vault 暗号化の仕組み
229
+
230
+ skinparam rectangle {
231
+ BackgroundColor #f5f5f5
232
+ BorderColor #333333
233
+ }
234
+
235
+ rectangle "パスワード" as password
236
+ rectangle "ソルト\n(32バイト乱数)" as salt
237
+ rectangle "PBKDF2\n(SHA-512, 100,000回)" as pbkdf2
238
+ rectangle "暗号化キー\n(256ビット)" as key
239
+ rectangle "IV\n(16バイト乱数)" as iv
240
+ rectangle "AES-256-GCM" as aes
241
+ rectangle ".env\n(平文)" as plaintext
242
+ rectangle ".env.vault\n(暗号文)" as ciphertext
243
+
244
+ password -down-> pbkdf2
245
+ salt -down-> pbkdf2
246
+ pbkdf2 -down-> key
247
+ key -down-> aes
248
+ iv -down-> aes
249
+ plaintext -right-> aes
250
+ aes -down-> ciphertext
251
+
252
+ note right of pbkdf2
253
+ 100,000回のイテレーションで
254
+ ブルートフォース攻撃を困難に
255
+ end note
256
+
257
+ note right of aes
258
+ 認証付き暗号(AEAD)
259
+ 改ざん検知機能付き
260
+ end note
261
+
262
+ @enduml
263
+ ```
264
+
265
+ | 項目 | 値 |
266
+ |------|-----|
267
+ | 暗号化アルゴリズム | AES-256-GCM(認証付き暗号) |
268
+ | 鍵導出関数 | PBKDF2-SHA512 |
269
+ | イテレーション回数 | 100,000 回 |
270
+ | ソルト長 | 32 バイト(毎回ランダム生成) |
271
+ | IV(初期化ベクトル)長 | 16 バイト(毎回ランダム生成) |
272
+ | 認証タグ長 | 16 バイト |
273
+
274
+ ### .env.vault ファイル形式
275
+
276
+ 暗号化されたファイルはバイナリ形式で、以下の構造を持ちます:
277
+
278
+ ```
279
+ +------------------+
280
+ | Salt (32 bytes) |
281
+ +------------------+
282
+ | IV (16 bytes) |
283
+ +------------------+
284
+ | AuthTag (16 bytes)|
285
+ +------------------+
286
+ | Ciphertext |
287
+ | (可変長) |
288
+ +------------------+
289
+ ```
290
+
291
+ ### コマンド詳細
292
+
293
+ #### vault:encrypt
294
+
295
+ `.env` ファイルを暗号化して `.env.vault` を作成します。
296
+
297
+ ```bash
298
+ npm run vault:encrypt
299
+ ```
300
+
301
+ **動作フロー:**
302
+
303
+ ```plantuml
304
+ @startuml
305
+ title vault:encrypt の動作フロー
306
+
307
+ start
308
+ :.env ファイルの存在確認;
309
+
310
+ if (.env が存在する?) then (yes)
311
+ :パスワード入力を要求;
312
+ :パスワード確認入力を要求;
313
+
314
+ if (パスワードが一致?) then (yes)
315
+ if (8文字以上?) then (yes)
316
+ :ソルトを生成(32バイト乱数);
317
+ :PBKDF2で暗号化キーを導出;
318
+ :IVを生成(16バイト乱数);
319
+ :AES-256-GCMで暗号化;
320
+ :.env.vault を出力;
321
+ :成功メッセージを表示;
322
+ else (no)
323
+ :エラー: パスワードが短すぎる;
324
+ stop
325
+ endif
326
+ else (no)
327
+ :エラー: パスワードが一致しない;
328
+ stop
329
+ endif
330
+ else (no)
331
+ :エラー: .env が見つからない;
332
+ stop
333
+ endif
334
+
335
+ stop
336
+ @enduml
337
+ ```
338
+
339
+ **オプション:**
340
+
341
+ | 環境変数 | 説明 |
342
+ |---------|------|
343
+ | `VAULT_PASSWORD` | パスワードを事前に指定(対話入力をスキップ) |
344
+
345
+ **例:**
346
+
347
+ ```bash
348
+ # 対話的にパスワードを入力
349
+ npm run vault:encrypt
350
+
351
+ # 環境変数でパスワードを指定(CI/CD 用)
352
+ VAULT_PASSWORD=my-secret-password npm run vault:encrypt
353
+ ```
354
+
355
+ ---
356
+
357
+ #### vault:decrypt
358
+
359
+ `.env.vault` ファイルを復号化して `.env` を復元します。
360
+
361
+ ```bash
362
+ npm run vault:decrypt
363
+ ```
364
+
365
+ **動作フロー:**
366
+
367
+ ```plantuml
368
+ @startuml
369
+ title vault:decrypt の動作フロー
370
+
371
+ start
372
+ :.env.vault ファイルの存在確認;
373
+
374
+ if (.env.vault が存在する?) then (yes)
375
+ if (.env が既に存在する?) then (yes)
376
+ :上書き確認を表示;
377
+ if (上書きを許可?) then (yes)
378
+ else (no)
379
+ :処理を中止;
380
+ stop
381
+ endif
382
+ endif
383
+
384
+ :パスワード入力を要求;
385
+ :暗号化ファイルを読み込み;
386
+ :ソルト・IV・認証タグを抽出;
387
+ :PBKDF2で暗号化キーを導出;
388
+
389
+ if (復号化成功?) then (yes)
390
+ :.env を出力;
391
+ :成功メッセージを表示;
392
+ else (no)
393
+ :エラー: パスワードが正しくない;
394
+ stop
395
+ endif
396
+ else (no)
397
+ :エラー: .env.vault が見つからない;
398
+ stop
399
+ endif
400
+
401
+ stop
402
+ @enduml
403
+ ```
404
+
405
+ **例:**
406
+
407
+ ```bash
408
+ # 対話的にパスワードを入力
409
+ npm run vault:decrypt
410
+
411
+ # 環境変数でパスワードを指定
412
+ VAULT_PASSWORD=my-secret-password npm run vault:decrypt
413
+ ```
414
+
415
+ ---
416
+
417
+ #### vault:view
418
+
419
+ `.env.vault` の内容を復号化して表示します。ファイルは作成されません。
420
+
421
+ ```bash
422
+ npm run vault:view
423
+ ```
424
+
425
+ **用途:**
426
+
427
+ - 暗号化された内容を確認したいが、`.env` ファイルを作成したくない場合
428
+ - CI/CD パイプラインでのデバッグ
429
+ - 復号化前の内容確認
430
+
431
+ **例:**
432
+
433
+ ```bash
434
+ # 内容を確認
435
+ npm run vault:view
436
+
437
+ # 出力例:
438
+ # --- .env.vault contents ---
439
+ #
440
+ # DATABASE_URL=mysql://user:pass@localhost:3306/mydb
441
+ # API_KEY=sk-xxxxxxxxxxxx
442
+ #
443
+ # --- end ---
444
+ ```
445
+
446
+ ---
447
+
448
+ #### vault:rekey
449
+
450
+ 現在のパスワードで復号化し、新しいパスワードで再暗号化します。
451
+
452
+ ```bash
453
+ npm run vault:rekey
454
+ ```
455
+
456
+ **動作フロー:**
457
+
458
+ ```plantuml
459
+ @startuml
460
+ title vault:rekey の動作フロー
461
+
462
+ start
463
+ :.env.vault ファイルの存在確認;
464
+
465
+ if (.env.vault が存在する?) then (yes)
466
+ :現在のパスワード入力を要求;
467
+
468
+ if (復号化成功?) then (yes)
469
+ :新しいパスワード入力を要求;
470
+ :新しいパスワード確認入力を要求;
471
+
472
+ if (パスワードが一致 & 8文字以上?) then (yes)
473
+ :新しいソルト・IVを生成;
474
+ :新しいパスワードで再暗号化;
475
+ :.env.vault を上書き;
476
+ :成功メッセージを表示;
477
+ else (no)
478
+ :エラー: パスワード要件を満たさない;
479
+ stop
480
+ endif
481
+ else (no)
482
+ :エラー: 現在のパスワードが正しくない;
483
+ stop
484
+ endif
485
+ else (no)
486
+ :エラー: .env.vault が見つからない;
487
+ stop
488
+ endif
489
+
490
+ stop
491
+ @enduml
492
+ ```
493
+
494
+ **用途:**
495
+
496
+ - 定期的なパスワードローテーション
497
+ - チームメンバーの退職時
498
+ - パスワード漏洩の疑いがある場合
499
+
500
+ ### 使い方
501
+
502
+ #### 初回セットアップ(暗号化)
503
+
504
+ ```bash
505
+ # 1. .env ファイルを作成・編集
506
+ cp .env.example .env
507
+ vim .env
508
+
509
+ # 2. 暗号化(パスワード入力を求められる)
510
+ npm run vault:encrypt
511
+ # New vault password: ********
512
+ # Confirm vault password: ********
513
+ # Encrypted .env -> .env.vault
514
+
515
+ # 3. 暗号化ファイルをコミット
516
+ git add .env.vault
517
+ git commit -m "Add encrypted environment file"
518
+ ```
519
+
520
+ #### 別の環境での復元(復号化)
521
+
522
+ ```bash
523
+ # 1. リポジトリをクローン
524
+ git clone <repository>
525
+ cd <project>
526
+
527
+ # 2. 依存関係をインストール
528
+ npm install
529
+
530
+ # 3. 暗号化ファイルを復号化(パスワード入力を求められる)
531
+ npm run vault:decrypt
532
+ # Vault password: ********
533
+ # Decrypted .env.vault -> .env
534
+ ```
535
+
536
+ #### CI/CD での使用
537
+
538
+ ```yaml
539
+ # GitHub Actions の例
540
+ jobs:
541
+ deploy:
542
+ runs-on: ubuntu-latest
543
+ steps:
544
+ - uses: actions/checkout@v4
545
+ - uses: actions/setup-node@v4
546
+ with:
547
+ node-version: '20'
548
+ - run: npm install
549
+ - run: npm run vault:decrypt
550
+ env:
551
+ VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}
552
+ - run: npm run deploy
553
+ ```
554
+
555
+ #### パスワードの変更
556
+
557
+ ```bash
558
+ # 現在のパスワードと新しいパスワードを入力
559
+ npm run vault:rekey
560
+ # Enter current password:
561
+ # Current vault password: ********
562
+ #
563
+ # Enter new password:
564
+ # New vault password: ********
565
+ # Confirm vault password: ********
566
+ # Re-encrypted .env.vault with new password.
567
+ ```
568
+
569
+ ### ワークフロー
570
+
571
+ ```plantuml
572
+ @startuml
573
+ title Vault ワークフロー
574
+
575
+ actor 開発者A as devA
576
+ actor 開発者B as devB
577
+ database Git as git
578
+
579
+ devA -> devA: .env を編集
580
+ devA -> devA: npm run vault:encrypt
581
+ devA -> git: .env.vault をコミット
582
+
583
+ git -> devB: git pull
584
+ devB -> devB: npm run vault:decrypt
585
+ devB -> devB: .env が復元される
586
+
587
+ note right of devA
588
+ パスワードは安全な方法で
589
+ チームに共有
590
+ end note
591
+
592
+ @enduml
593
+ ```
594
+
595
+ ### セキュリティのベストプラクティス
596
+
597
+ | Do | Don't |
598
+ |----|-------|
599
+ | 8 文字以上の強力なパスワードを使用 | 短い・推測しやすいパスワードを使用 |
600
+ | パスワードを安全な方法で共有(1Password など) | パスワードを Slack やメールで送信 |
601
+ | `.env.vault` を Git にコミット | `.env` を Git にコミット |
602
+ | 定期的にパスワードを変更(vault:rekey) | 同じパスワードを長期間使用 |
603
+ | CI/CD では Secrets 機能を使用 | CI/CD ログにパスワードを出力 |
604
+
605
+ ### 注意事項
606
+
607
+ - パスワードを忘れると復号化できなくなります(復旧不可)
608
+ - `.env.vault` を Git に追加しても `.env` は `.gitignore` で除外されています
609
+ - CI/CD 環境では `VAULT_PASSWORD` 環境変数を使用してください
610
+ - 同じ内容でも暗号化するたびに異なる出力になります(ソルトとIVがランダム)
611
+
612
+ ### Vault トラブルシューティング
613
+
614
+ #### 復号化に失敗する
615
+
616
+ ```
617
+ Error: Invalid password
618
+ ```
619
+
620
+ **原因:** パスワードが正しくない
621
+
622
+ **解決策:**
623
+ 1. パスワードを再確認
624
+ 2. Caps Lock がオフになっているか確認
625
+ 3. パスワードマネージャーから正しいパスワードをコピー
626
+
627
+ #### .env.vault が見つからない
628
+
629
+ ```
630
+ Error: .env.vault not found
631
+ ```
632
+
633
+ **原因:** 暗号化ファイルが存在しない
634
+
635
+ **解決策:**
636
+ 1. `git pull` で最新を取得
637
+ 2. `.env.vault` がコミットされているか確認
638
+ 3. まだ暗号化されていない場合は `vault:encrypt` を実行
639
+
640
+ #### パスワードが短すぎる
641
+
642
+ ```
643
+ Error: Password must be at least 8 characters
644
+ ```
645
+
646
+ **原因:** 8 文字未満のパスワードを入力
647
+
648
+ **解決策:**
649
+ 8 文字以上のパスワードを使用してください。推奨は 12 文字以上。
650
+
651
+ ## トラブルシューティング
652
+
653
+ ### 環境変数が読み込まれない
654
+
655
+ 1. `.env` ファイルがプロジェクトルートにあるか確認
656
+ 2. `dotenv/config` がエントリーポイントの先頭でインポートされているか確認
657
+ 3. 変数名にタイポがないか確認
658
+
659
+ ### Docker 接続エラー
660
+
661
+ 1. Docker Desktop が起動しているか確認
662
+ 2. `DOCKER_HOST` 環境変数が正しく設定されているか確認
663
+ 3. 必要に応じて `unset DOCKER_HOST` を実行
@@ -162,6 +162,7 @@
162
162
  ```java
163
163
  @Test
164
164
  void testGreeting() {
165
+ Library classUnderTest = new Library();
165
166
  assertEquals("Hello, World!", classUnderTest.getGreeting());
166
167
  }
167
168
  ```
@@ -180,21 +181,45 @@
180
181
  - **主要ツール**: .NET SDK, OmniSharp
181
182
  - **初期化**:
182
183
  ```bash
183
- dotnet new xunit -n Hello.Tests
184
- dotnet new classlib -n Hello
184
+ # ソリューションの作成
185
+ dotnet new sln --name Hello
186
+ # ライブラリプロジェクトの作成
187
+ dotnet new classlib -o Hello
188
+ # テストプロジェクトの作成
189
+ dotnet new xunit -o Hello.Tests
190
+ # プロジェクトをソリューションに追加
191
+ dotnet sln Hello.sln add Hello/Hello.csproj Hello.Tests/Hello.Tests.csproj
192
+ # テストプロジェクトからライブラリプロジェクトへの参照を追加
185
193
  dotnet add Hello.Tests/Hello.Tests.csproj reference Hello/Hello.csproj
186
194
  ```
187
195
  - **TDDチュートリアル**:
188
196
  1. **Red**: `Hello.Tests/UnitTest1.cs` を修正。
189
197
  ```csharp
190
- Assert.Equal("Hello, World!", Hello.Lib.Greet());
198
+ namespace Hello.Tests;
199
+ using Xunit;
200
+
201
+ public class UnitTest1
202
+ {
203
+ [Fact]
204
+ public void Test1()
205
+ {
206
+ Assert.Equal("Hello, World!", Hello.Lib.Greet());
207
+ }
208
+ }
191
209
  ```
192
210
  実行(失敗): `dotnet test`
193
- 2. **Green**: `Hello/Class1.cs` を実装。
211
+ 2. **Green**: `Hello/Lib.cs` を実装。
194
212
  ```csharp
195
- namespace Hello { public class Lib { public static string Greet() => "Hello, World!"; } }
213
+ namespace Hello;
214
+
215
+ public static class Lib
216
+ {
217
+ public static string Greet() => "Hello, World!";
218
+ }
196
219
  ```
197
220
  3. **Refactor**: `dotnet format` でコードを整形。
221
+ - **自動化**:
222
+ - `dotnet watch test` で変更を監視し自動テスト実行。
198
223
 
199
224
  ### 7. Ruby
200
225
  - **起動コマンド**: `nix develop .#ruby`
@@ -253,17 +278,17 @@
253
278
  - **主要ツール**: GHC, Stack, Cabal, HLS, hlint, fourmolu
254
279
  - **初期化**:
255
280
  ```bash
256
- # プロジェクトの作成(対話形式をスキップする場合)
257
- cabal init -n --lib --test
258
- # 依存関係(hspec)を .cabal ファイルに追加
259
- sed -i 's/build-depends: /build-depends: hspec, /' *.cabal
281
+ stack new hello
282
+ cd hello
283
+ # package.yaml の tests.hello-test.dependencies に hspec を追加
284
+ stack test
260
285
  ```
261
286
  - **TDDチュートリアル**:
262
- 1. **Red**: `test/MyLibTest.hs` (または既存のテストファイル) を編集.
287
+ 1. **Red**: `test/Spec.hs` を編集.
263
288
  ```haskell
264
289
  module Main (main) where
265
290
  import Test.Hspec
266
- import MyLib (hello)
291
+ import Lib (hello)
267
292
 
268
293
  main :: IO ()
269
294
  main = hspec $ do
@@ -271,10 +296,10 @@
271
296
  it "returns greeting" $ do
272
297
  hello `shouldBe` "Hello, World!"
273
298
  ```
274
- 実行(失敗): `cabal test`
275
- 2. **Green**: `src/MyLib.hs` を実装.
299
+ 実行(失敗): `stack test`
300
+ 2. **Green**: `src/Lib.hs` を実装.
276
301
  ```haskell
277
- module MyLib (hello) where
302
+ module Lib (hello) where
278
303
  hello :: String
279
304
  hello = "Hello, World!"
280
305
  ```
@@ -282,7 +307,7 @@
282
307
  - `hlint .` でコードの改善案をチェック.
283
308
  - `fourmolu -i src/**/*.hs` でコードを整形.
284
309
  - **自動化**:
285
- - `ghcid --command="cabal repl test:..." --test="main"` で変更を監視し自動テスト実行.
310
+ - `stack test --file-watch` で変更を監視し自動テスト実行.
286
311
 
287
312
  ### 10. Clojure
288
313
  - **起動コマンド**: `nix develop .#clojure`
@@ -382,6 +407,43 @@
382
407
  - **自動化**:
383
408
  - `scala-cli test . --watch` で変更を監視し自動テスト実行.
384
409
 
410
+ ### 13. F#
411
+ - **起動コマンド**: `nix develop .#dotnet`
412
+ - **主要ツール**: .NET SDK, Ionide (LSP), Fantomas (Formatter)
413
+ - **初期化**:
414
+ ```bash
415
+ # ソリューションの作成
416
+ dotnet new sln --name Hello
417
+ # ライブラリプロジェクトの作成
418
+ dotnet new classlib -lang "F#" -o Hello
419
+ # テストプロジェクトの作成
420
+ dotnet new xunit -lang "F#" -o Hello.Tests
421
+ # プロジェクトをソリューションに追加
422
+ dotnet sln Hello.sln add Hello/Hello.fsproj Hello.Tests/Hello.Tests.fsproj
423
+ # テストプロジェクトからライブラリプロジェクトへの参照を追加
424
+ dotnet add Hello.Tests/Hello.Tests.fsproj reference Hello/Hello.fsproj
425
+ ```
426
+ - **TDDチュートリアル**:
427
+ 1. **Red**: `Hello.Tests/Tests.fs` を修正。
428
+ ```fsharp
429
+ namespace Hello.Tests
430
+ open Xunit
431
+ module Tests =
432
+ [<Fact>]
433
+ let ``Hello returns greeting`` () =
434
+ Assert.Equal("Hello, World!", Hello.Lib.greet())
435
+ ```
436
+ 実行(失敗): `dotnet test`
437
+ 2. **Green**: `Hello/Library.fs` を実装。
438
+ ```fsharp
439
+ namespace Hello
440
+ module Lib =
441
+ let greet () = "Hello, World!"
442
+ ```
443
+ 3. **Refactor**: `dotnet fantomas .` (インストール済みの場合) でコードを整形。
444
+ - **自動化**:
445
+ - `dotnet watch test` で変更を監視し自動テスト実行。
446
+
385
447
  ---
386
448
 
387
449
  ## 環境の切り替え
@@ -7,10 +7,12 @@
7
7
  import gulp from 'gulp';
8
8
  import mkdocsTasks from './ops/scripts/mkdocs.js';
9
9
  import journalTasks from './ops/scripts/journal.js';
10
+ import vaultTasks from './ops/scripts/vault.js';
10
11
 
11
12
  // Load gulp tasks from script modules
12
13
  mkdocsTasks(gulp);
13
14
  journalTasks(gulp);
15
+ vaultTasks(gulp);
14
16
 
15
17
  export const dev = gulp.series('mkdocs:serve', 'mkdocs:open');
16
18
 
@@ -5,7 +5,7 @@ in
5
5
  packages.mkShell {
6
6
  inherit (baseShell) pure;
7
7
  buildInputs = baseShell.buildInputs ++ (with packages; [
8
- scala
8
+ scala_3
9
9
  sbt
10
10
  metals
11
11
  scala-cli
@@ -201,6 +201,7 @@ if dein#load_state(s:dein_dir)
201
201
  call dein#add('rust-lang/rust.vim')
202
202
  call dein#add('OmniSharp/omnisharp-vim')
203
203
  call dein#add('OrangeT/vim-csharp')
204
+ call dein#add('ionide/ionide-vim')
204
205
  call dein#add('uiiaoo/java-syntax.vim')
205
206
  call dein#add('neovimhaskell/haskell-vim')
206
207
  call dein#add('vim-ruby/vim-ruby')
@@ -548,3 +549,6 @@ autocmd FileType elixir setlocal expandtab shiftwidth=2 tabstop=2
548
549
 
549
550
  " Scala
550
551
  autocmd FileType scala setlocal expandtab shiftwidth=2 tabstop=2
552
+
553
+ " F#
554
+ autocmd FileType fsharp setlocal expandtab shiftwidth=4 tabstop=4
@@ -0,0 +1,299 @@
1
+ 'use strict';
2
+
3
+ import crypto from 'crypto';
4
+ import fs from 'fs';
5
+ import path from 'path';
6
+ import readline from 'readline';
7
+
8
+ /**
9
+ * Vault - .env ファイルの暗号化・復号化ユーティリティ
10
+ *
11
+ * 暗号化アルゴリズム: AES-256-GCM
12
+ * 鍵導出: PBKDF2 (SHA-512, 100,000 iterations)
13
+ */
14
+
15
+ const ALGORITHM = 'aes-256-gcm';
16
+ const PBKDF2_ITERATIONS = 100000;
17
+ const SALT_LENGTH = 32;
18
+ const IV_LENGTH = 16;
19
+ const AUTH_TAG_LENGTH = 16;
20
+ const KEY_LENGTH = 32;
21
+
22
+ /**
23
+ * パスワードから暗号化キーを導出
24
+ * @param {string} password - パスワード
25
+ * @param {Buffer} salt - ソルト
26
+ * @returns {Buffer} - 導出されたキー
27
+ */
28
+ function deriveKey(password, salt) {
29
+ return crypto.pbkdf2Sync(password, salt, PBKDF2_ITERATIONS, KEY_LENGTH, 'sha512');
30
+ }
31
+
32
+ /**
33
+ * データを暗号化
34
+ * @param {string} plaintext - 平文
35
+ * @param {string} password - パスワード
36
+ * @returns {Buffer} - 暗号化されたデータ (salt + iv + authTag + ciphertext)
37
+ */
38
+ function encrypt(plaintext, password) {
39
+ const salt = crypto.randomBytes(SALT_LENGTH);
40
+ const key = deriveKey(password, salt);
41
+ const iv = crypto.randomBytes(IV_LENGTH);
42
+
43
+ const cipher = crypto.createCipheriv(ALGORITHM, key, iv);
44
+ const encrypted = Buffer.concat([
45
+ cipher.update(plaintext, 'utf8'),
46
+ cipher.final()
47
+ ]);
48
+ const authTag = cipher.getAuthTag();
49
+
50
+ // フォーマット: salt (32) + iv (16) + authTag (16) + ciphertext
51
+ return Buffer.concat([salt, iv, authTag, encrypted]);
52
+ }
53
+
54
+ /**
55
+ * データを復号化
56
+ * @param {Buffer} encryptedData - 暗号化されたデータ
57
+ * @param {string} password - パスワード
58
+ * @returns {string} - 復号化された平文
59
+ */
60
+ function decrypt(encryptedData, password) {
61
+ const salt = encryptedData.subarray(0, SALT_LENGTH);
62
+ const iv = encryptedData.subarray(SALT_LENGTH, SALT_LENGTH + IV_LENGTH);
63
+ const authTag = encryptedData.subarray(SALT_LENGTH + IV_LENGTH, SALT_LENGTH + IV_LENGTH + AUTH_TAG_LENGTH);
64
+ const ciphertext = encryptedData.subarray(SALT_LENGTH + IV_LENGTH + AUTH_TAG_LENGTH);
65
+
66
+ const key = deriveKey(password, salt);
67
+
68
+ const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
69
+ decipher.setAuthTag(authTag);
70
+
71
+ const decrypted = Buffer.concat([
72
+ decipher.update(ciphertext),
73
+ decipher.final()
74
+ ]);
75
+
76
+ return decrypted.toString('utf8');
77
+ }
78
+
79
+ /**
80
+ * パスワードをプロンプトで取得(シンプル版)
81
+ * @param {string} prompt - プロンプトメッセージ
82
+ * @returns {Promise<string>} - 入力されたパスワード
83
+ */
84
+ function promptPassword(prompt) {
85
+ return new Promise((resolve) => {
86
+ const rl = readline.createInterface({
87
+ input: process.stdin,
88
+ output: process.stdout
89
+ });
90
+
91
+ rl.question(prompt, (answer) => {
92
+ rl.close();
93
+ resolve(answer);
94
+ });
95
+ });
96
+ }
97
+
98
+ /**
99
+ * 環境変数からパスワードを取得、なければプロンプト
100
+ * @returns {Promise<string>} - パスワード
101
+ */
102
+ async function getPassword() {
103
+ const envPassword = process.env.VAULT_PASSWORD;
104
+ if (envPassword) {
105
+ return envPassword;
106
+ }
107
+ return promptPassword('Vault password: ');
108
+ }
109
+
110
+ /**
111
+ * 環境変数からパスワードを取得、なければプロンプト(確認付き)
112
+ * @returns {Promise<string>} - パスワード
113
+ */
114
+ async function getPasswordWithConfirm() {
115
+ const envPassword = process.env.VAULT_PASSWORD;
116
+ if (envPassword) {
117
+ return envPassword;
118
+ }
119
+
120
+ const password = await promptPassword('New vault password: ');
121
+ const confirm = await promptPassword('Confirm vault password: ');
122
+
123
+ if (password !== confirm) {
124
+ throw new Error('Passwords do not match');
125
+ }
126
+
127
+ return password;
128
+ }
129
+
130
+ /**
131
+ * 確認プロンプト
132
+ * @param {string} message - メッセージ
133
+ * @returns {Promise<boolean>} - true: yes, false: no
134
+ */
135
+ function confirm(message) {
136
+ return new Promise((resolve) => {
137
+ const rl = readline.createInterface({
138
+ input: process.stdin,
139
+ output: process.stdout
140
+ });
141
+
142
+ rl.question(message, (answer) => {
143
+ rl.close();
144
+ resolve(answer.toLowerCase() === 'y');
145
+ });
146
+ });
147
+ }
148
+
149
+ // Function to register the vault tasks
150
+ export default function (gulp) {
151
+ const ENV_FILE = '.env';
152
+ const ENCRYPTED_FILE = '.env.vault';
153
+
154
+ // Encrypt .env file
155
+ gulp.task('vault:encrypt', async () => {
156
+ const envPath = path.join(process.cwd(), ENV_FILE);
157
+ const encryptedPath = path.join(process.cwd(), ENCRYPTED_FILE);
158
+
159
+ // Check if .env exists
160
+ if (!fs.existsSync(envPath)) {
161
+ throw new Error(`${ENV_FILE} not found`);
162
+ }
163
+
164
+ // Read .env content
165
+ const content = fs.readFileSync(envPath, 'utf8');
166
+
167
+ // Get password
168
+ const password = await getPasswordWithConfirm();
169
+
170
+ if (!password || password.length < 8) {
171
+ throw new Error('Password must be at least 8 characters');
172
+ }
173
+
174
+ // Encrypt
175
+ const encrypted = encrypt(content, password);
176
+
177
+ // Write encrypted file
178
+ fs.writeFileSync(encryptedPath, encrypted);
179
+
180
+ console.log(`\nEncrypted ${ENV_FILE} -> ${ENCRYPTED_FILE}`);
181
+ console.log(`You can now safely commit ${ENCRYPTED_FILE} to version control.`);
182
+ console.log(`\nRemember to keep your password safe!`);
183
+ });
184
+
185
+ // Decrypt .env.vault file
186
+ gulp.task('vault:decrypt', async () => {
187
+ const envPath = path.join(process.cwd(), ENV_FILE);
188
+ const encryptedPath = path.join(process.cwd(), ENCRYPTED_FILE);
189
+
190
+ // Check if .env.vault exists
191
+ if (!fs.existsSync(encryptedPath)) {
192
+ throw new Error(`${ENCRYPTED_FILE} not found`);
193
+ }
194
+
195
+ // Check if .env already exists
196
+ if (fs.existsSync(envPath)) {
197
+ const shouldOverwrite = await confirm(`${ENV_FILE} already exists. Overwrite? (y/N): `);
198
+ if (!shouldOverwrite) {
199
+ console.log('Aborted.');
200
+ return;
201
+ }
202
+ }
203
+
204
+ // Read encrypted content
205
+ const encryptedData = fs.readFileSync(encryptedPath);
206
+
207
+ // Get password
208
+ const password = await getPassword();
209
+
210
+ // Decrypt
211
+ try {
212
+ const decrypted = decrypt(encryptedData, password);
213
+
214
+ // Write .env file
215
+ fs.writeFileSync(envPath, decrypted);
216
+
217
+ console.log(`\nDecrypted ${ENCRYPTED_FILE} -> ${ENV_FILE}`);
218
+ } catch (error) {
219
+ if (error.message.includes('Unsupported state') || error.code === 'ERR_OSSL_BAD_DECRYPT') {
220
+ throw new Error('Invalid password');
221
+ }
222
+ throw error;
223
+ }
224
+ });
225
+
226
+ // View encrypted file content (without saving)
227
+ gulp.task('vault:view', async () => {
228
+ const encryptedPath = path.join(process.cwd(), ENCRYPTED_FILE);
229
+
230
+ // Check if .env.vault exists
231
+ if (!fs.existsSync(encryptedPath)) {
232
+ throw new Error(`${ENCRYPTED_FILE} not found`);
233
+ }
234
+
235
+ // Read encrypted content
236
+ const encryptedData = fs.readFileSync(encryptedPath);
237
+
238
+ // Get password
239
+ const password = await getPassword();
240
+
241
+ // Decrypt
242
+ try {
243
+ const decrypted = decrypt(encryptedData, password);
244
+
245
+ console.log(`\n--- ${ENCRYPTED_FILE} contents ---\n`);
246
+ console.log(decrypted);
247
+ console.log(`\n--- end ---\n`);
248
+ } catch (error) {
249
+ if (error.message.includes('Unsupported state') || error.code === 'ERR_OSSL_BAD_DECRYPT') {
250
+ throw new Error('Invalid password');
251
+ }
252
+ throw error;
253
+ }
254
+ });
255
+
256
+ // Re-encrypt with new password
257
+ gulp.task('vault:rekey', async () => {
258
+ const encryptedPath = path.join(process.cwd(), ENCRYPTED_FILE);
259
+
260
+ // Check if .env.vault exists
261
+ if (!fs.existsSync(encryptedPath)) {
262
+ throw new Error(`${ENCRYPTED_FILE} not found`);
263
+ }
264
+
265
+ // Read encrypted content
266
+ const encryptedData = fs.readFileSync(encryptedPath);
267
+
268
+ // Get current password
269
+ console.log('Enter current password:');
270
+ const currentPassword = await promptPassword('Current vault password: ');
271
+
272
+ // Decrypt with current password
273
+ let decrypted;
274
+ try {
275
+ decrypted = decrypt(encryptedData, currentPassword);
276
+ } catch (error) {
277
+ if (error.message.includes('Unsupported state') || error.code === 'ERR_OSSL_BAD_DECRYPT') {
278
+ throw new Error('Invalid password');
279
+ }
280
+ throw error;
281
+ }
282
+
283
+ // Get new password
284
+ console.log('\nEnter new password:');
285
+ const newPassword = await getPasswordWithConfirm();
286
+
287
+ if (!newPassword || newPassword.length < 8) {
288
+ throw new Error('Password must be at least 8 characters');
289
+ }
290
+
291
+ // Re-encrypt with new password
292
+ const reEncrypted = encrypt(decrypted, newPassword);
293
+
294
+ // Write encrypted file
295
+ fs.writeFileSync(encryptedPath, reEncrypted);
296
+
297
+ console.log(`\nRe-encrypted ${ENCRYPTED_FILE} with new password.`);
298
+ });
299
+ }
@@ -8,6 +8,7 @@
8
8
  "version": "0.0.0",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
+ "dotenv": "^17.2.3",
11
12
  "gulp": "^5.0.0"
12
13
  }
13
14
  },
@@ -325,6 +326,18 @@
325
326
  "node": ">=0.10.0"
326
327
  }
327
328
  },
329
+ "node_modules/dotenv": {
330
+ "version": "17.2.3",
331
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
332
+ "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
333
+ "license": "BSD-2-Clause",
334
+ "engines": {
335
+ "node": ">=12"
336
+ },
337
+ "funding": {
338
+ "url": "https://dotenvx.com"
339
+ }
340
+ },
328
341
  "node_modules/each-props": {
329
342
  "version": "3.0.0",
330
343
  "resolved": "https://registry.npmjs.org/each-props/-/each-props-3.0.0.tgz",
@@ -8,6 +8,10 @@
8
8
  "docs:serve": "gulp mkdocs:serve",
9
9
  "docs:stop": "gulp mkdocs:stop",
10
10
  "docs:build": "gulp mkdocs:build",
11
+ "vault:encrypt": "gulp vault:encrypt",
12
+ "vault:decrypt": "gulp vault:decrypt",
13
+ "vault:view": "gulp vault:view",
14
+ "vault:rekey": "gulp vault:rekey",
11
15
  "claude:yolo": "claude --dangerously-skip-permissions",
12
16
  "copilot:yolo": "copilot --allow-all-tools",
13
17
  "codex:yolo": "codex --yolo",
@@ -30,6 +34,7 @@
30
34
  "homepage": "https://github.com/k2works/{project_name}#readme",
31
35
  "type": "module",
32
36
  "dependencies": {
37
+ "dotenv": "^17.2.3",
33
38
  "gulp": "^5.0.0"
34
39
  }
35
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k2works/claude-code-booster",
3
- "version": "0.21.3",
3
+ "version": "0.22.0",
4
4
  "description": "AI Agent Development Support Tool",
5
5
  "main": "main.js",
6
6
  "bin": {