@k2works/claude-code-booster 4.3.0 → 4.4.1

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.
@@ -22,7 +22,7 @@ async function setupProject() {
22
22
  try {
23
23
  if (isUpdate) {
24
24
  // --update オプション時は .claude と docs 配下のみ上書きコピー
25
- const targets = ['.claude', 'docs', '.devcontainer'];
25
+ const targets = ['.claude', 'docs', '.devcontainer', 'ops/nix'];
26
26
  for (const dir of targets) {
27
27
  const src = path.join(templateDir, dir);
28
28
  const dest = path.join(projectDir, dir);
@@ -56,7 +56,7 @@ async function setupProject() {
56
56
  }
57
57
 
58
58
  // ルート直下の設定ファイルも上書きコピー
59
- const rootFiles = ['AGENTS.md', 'CLAUDE.md', 'Dockerfile'];
59
+ const rootFiles = ['AGENTS.md', 'CLAUDE.md', 'Dockerfile', '.envrc'];
60
60
  for (const file of rootFiles) {
61
61
  const src = path.join(templateDir, file);
62
62
  const dest = path.join(projectDir, file);
@@ -23,7 +23,7 @@
23
23
  // "forwardPorts": [],
24
24
 
25
25
  // Use 'postCreateCommand' to run commands after the container is created.
26
- // "postCreateCommand": "docker --version",
26
+ // Nix devShell は手動ロード方式。コンテナ起動後、必要に応じて `direnv allow` または `nix develop` を実行してください。
27
27
 
28
28
  // Configure tool-specific properties.
29
29
  "customizations" : {
@@ -0,0 +1 @@
1
+ use flake
@@ -2,3 +2,5 @@
2
2
  *.sh text eol=lf
3
3
  Dockerfile text eol=lf
4
4
  .vimrc text eol=lf
5
+ .envrc text eol=lf
6
+ .tmux.conf text eol=lf
@@ -58,7 +58,12 @@ ENV HOME=/home/$USERNAME
58
58
  RUN curl -L https://nixos.org/nix/install | sh -s -- --no-daemon \
59
59
  && echo '. /home/'$USERNAME'/.nix-profile/etc/profile.d/nix.sh' >> /home/$USERNAME/.bashrc \
60
60
  && mkdir -p /home/$USERNAME/.config/nix \
61
- && echo "experimental-features = nix-command flakes" >> /home/$USERNAME/.config/nix/nix.conf
61
+ && echo "experimental-features = nix-command flakes" >> /home/$USERNAME/.config/nix/nix.conf \
62
+ && . /home/$USERNAME/.nix-profile/etc/profile.d/nix.sh \
63
+ && nix profile install nixpkgs#direnv nixpkgs#nix-direnv \
64
+ && mkdir -p /home/$USERNAME/.config/direnv \
65
+ && echo 'source $HOME/.nix-profile/share/nix-direnv/direnvrc' > /home/$USERNAME/.config/direnv/direnvrc \
66
+ && echo 'eval "$(direnv hook bash)"' >> /home/$USERNAME/.bashrc
62
67
 
63
68
  # Nix環境変数の設定
64
69
  ENV PATH="/home/$USERNAME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:${PATH}" \
@@ -243,6 +243,22 @@ Nix を使用して、再現可能な開発環境を構築できます。
243
243
 
244
244
  環境から抜けるには `exit` を入力します。
245
245
 
246
+ ##### direnv による自動ロード(Dev Container 環境)
247
+
248
+ Dev Container 環境では、direnv がディレクトリ移動時に Nix devShell を自動ロードします。手動で `nix develop` を実行する必要はありません。
249
+
250
+ - `.envrc` に `use flake` が設定されており、`flake.nix` の default devShell が自動的に有効化されます
251
+ - コンテナ作成時に `direnv allow` が自動実行されるため、初回の許可操作は不要です
252
+
253
+ ローカル環境で direnv を使用する場合:
254
+
255
+ 1. [direnv をインストール](https://direnv.net/docs/installation.html)します。
256
+ 2. シェルにフックを追加します(例: `eval "$(direnv hook bash)"` を `.bashrc` に追加)。
257
+ 3. プロジェクトディレクトリで許可します:
258
+ ```bash
259
+ direnv allow
260
+ ```
261
+
246
262
  ##### 依存関係の更新
247
263
 
248
264
  ```bash
@@ -29,6 +29,14 @@ packages.mkShell {
29
29
  echo "Linked $VIMRC_SRC to $VIMRC_DEST"
30
30
  fi
31
31
 
32
+ # tmux 設定の反映
33
+ TMUX_CONF_SRC="${./.tmux.conf}"
34
+ TMUX_CONF_DEST="$HOME/.tmux.conf"
35
+ if [ -f "$TMUX_CONF_SRC" ]; then
36
+ ln -sf "$TMUX_CONF_SRC" "$TMUX_CONF_DEST"
37
+ echo "Linked $TMUX_CONF_SRC to $TMUX_CONF_DEST"
38
+ fi
39
+
32
40
  echo "Welcome to the common development environment"
33
41
  '';
34
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k2works/claude-code-booster",
3
- "version": "4.3.0",
3
+ "version": "4.4.1",
4
4
  "description": "AI Agent Development Support Tool",
5
5
  "main": "main.js",
6
6
  "bin": {