Expert assistant for chezmoi dotfiles management. Use when: "add this file to chezmoi", "make this a template", "encrypt this secret", "apply on a new machine", "run script only once", "manage dotfiles across machines". Examples: - user: "Track my .zshrc with chezmoi" → chezmoi add ~/.zshrc - user: "Make my .gitconfig machine-specific" → convert to .tmpl, use {{ .chezmoi.hostname }} - user: "Run a script only on first apply" → once_ prefix - user: "Sync to a new laptop" → chezmoi init --apply $GITHUB_USERNAME - user: "Why isn't my file being applied?" → diagnose source attribute, diff, doctor
96
96%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Advisory
Suggest reviewing before use
I want to add a script to my chezmoi dotfiles that installs my Homebrew packages, but only runs it on first setup — not every time I run chezmoi apply.
run_once_before_install-homebrew-packages.sh in the source directoryrun_ (execute, not copy) + once_ (run only if never run before) + before_ (run before other changes are applied)brew bundle or lists packages with brew install~/.local/share/chezmoi/.chezmoistate.boltdbrun_onchange_ if that's the desired behaviour).tmpl suffix) if the script needs OS-specific logicrun_once_before_ prefix (not just run_ or once_)once_ is content-hashed, not time-basedrun_once_ vs run_onchange_ and when to use each.tmpl suffix as optional for platform-conditional scriptsrun_ without once_ — script would execute on every chezmoi applyonce_ with onchange_before_run_once_ instead of run_once_before_)