Skip to content

Commit a6e0e5f

Browse files
committed
Update CLAUDE.md
1 parent edfdb6a commit a6e0e5f

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,26 @@ This repository manages macOS dotfiles using chezmoi. Configuration files are st
3636
# Format check
3737
deno fmt --check
3838

39+
# Format files
40+
deno fmt
41+
3942
# Environment validation with Goss (run after chezmoi apply)
4043
GOSS_USE_ALPHA=1 goss validate --format documentation
4144
```
4245

43-
### Setup
46+
### Setup and Apply
4447

4548
```sh
46-
# Initial setup (runs install.sh)
49+
# Initial setup (installs Homebrew, chezmoi, and applies configuration)
4750
./install.sh
4851

49-
# Manual chezmoi apply
52+
# Apply chezmoi changes in clean environment
5053
./bin/cz apply -v
54+
55+
# Preview changes before applying
56+
./bin/cz diff
57+
58+
# Note: CI tests run install.sh twice to verify idempotency
5159
```
5260

5361
### Environment Tools
@@ -60,7 +68,11 @@ GOSS_USE_ALPHA=1 goss validate --format documentation
6068

6169
### Clean Environment Execution
6270

63-
`bin/run-clean-env` resets environment variables to a minimal set, configuring only Homebrew and system paths. This allows running chezmoi and brew without interference from existing shell configurations.
71+
`bin/cz` is a wrapper script that runs chezmoi in a clean environment. It uses `env -i` to reset all environment variables and launches bash with `--noprofile --norc`, then configures only essential paths:
72+
- System paths via `/usr/libexec/path_helper`
73+
- Homebrew environment (`/opt/homebrew`)
74+
75+
This prevents interference from existing shell configurations when applying dotfiles, ensuring consistent and reproducible deployments.
6476

6577
### Zsh Configuration Lazy Loading
6678

0 commit comments

Comments
 (0)