This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a dotfiles repository managed with chezmoi, a dotfile management tool that uses templating to handle cross-platform configurations. The repository follows chezmoi's conventions where source files are stored in the home/ directory and deployed to the user's home directory.
# Apply dotfiles changes to the system
chezmoi apply
# Edit a managed file (opens in editor)
chezmoi edit ~/.config/fish/config.fish
# Add changes back to the repository
chezmoi add ~/.config/fish/config.fish
# View all managed files
chezmoi managed
# View the computed data/variables
chezmoi data
# Test template rendering without applying
chezmoi execute-template < template_file.tmpl# After making changes to templates
chezmoi diff # Preview changes
chezmoi apply # Apply changes to system
# Commit changes
cd $(chezmoi source-path)
git add .
git commit -m "message"
git pushFiles in home/ use special prefixes that chezmoi interprets:
dot_becomes.(e.g.,dot_zprofile→.zprofile)private_sets file permissions to 0600empty_creates an empty file if it doesn't exist.tmplsuffix indicates a template file that will be processed
Templates use Go's text/template syntax with access to:
.chezmoi.os- Operating system (darwin, linux, windows).chezmoi.arch- Architecture (amd64, arm64, etc.).chezmoi.hostname- Machine hostname.chezmoi.username- Current username- Custom data from
.chezmoidata/files (if present)
Example template patterns:
{{ if eq .chezmoi.os "darwin" -}}
# macOS specific configuration
{{ else if eq .chezmoi.os "linux" -}}
# Linux specific configuration
{{ end -}}
Shell Configuration:
- Fish shell (
home/private_dot_config/private_fish/) - Primary shell with modular conf.d setup - PowerShell (
home/private_dot_config/powershell/) - Cross-platform PowerShell profiles - Zsh (
.zprofile) - Basic profile for compatibility
Development Tools:
- Git configuration with SSH signing via 1Password
- mise for tool version management (replaces asdf/nvm/rbenv)
- Starship prompt with consistent theming
- VS Code and Ghostty terminal configurations
Package Management:
- Brewfile.tmpl - Homebrew packages for macOS
- mise configuration for language runtimes (Go, Node, Rust)
- All edits should be made to files in the
home/directory, not to the deployed files in the user's home directory - Template files (.tmpl) must have valid Go template syntax - syntax errors will prevent chezmoi from applying changes
- The
.chezmoirootfile setshomeas the source root, so all managed files are underhome/ - Git signing is configured to use 1Password's SSH agent - ensure 1Password CLI is installed and configured
- Cross-platform compatibility is handled through templates - always consider platform differences when editing