This file provides guidance to Claude Code (claude.ai/code) when working in this repository.
This is a public dotfiles repository managed by Chezmoi. It contains shell, editor, terminal, and desktop configuration intended to be safe to keep in a public repo.
- Chezmoi: Dotfile manager with templating support (
.tmpl) - ZSH: Shell configuration and aliases
- Neovim:
nvim-customandnvim-lazyvim - Tmux: Terminal multiplexer and theme config
- Hammerspoon: macOS desktop automation
# Apply changes and reload shell
ma
# Edit dotfiles (opens chezmoi source dir in editor)
edit
# Navigate to chezmoi source directory
moicd
# or
cd ~/.local/share/chezmoi
# Run git commands on dotfiles repo from anywhere
gmoi <git-command>
# Add nvim config to chezmoi (removes lazy-lock.json)
moi_add_nvim# Reload zsh configuration
sz
# View zsh configuration
catrc# Switch between neovim configs interactively
vv
# Current default config (set via NVIM_APPNAME)
nvim-custom
nvim-lazyvimFiles with .tmpl extension are processed as Go templates. Key variables:
{{ .chezmoi.os }}- OS detection (darwinorlinux){{ .chezmoi.hostname }}- Machine hostname for machine-specific configuration- Conditional blocks are used for OS-specific and hostname-specific config
Example:
{{ if eq .chezmoi.os "darwin" -}}
# macOS specific configuration
{{ end -}}
{{ if eq .chezmoi.hostname "GVXPDWWKWG" -}}
# Work machine configuration
{{ end -}}Machine-specific configuration is determined directly in templates with {{ .chezmoi.hostname }}. There is no separate machine settings file in this public repo.
Structure:
.zshenv- environment variables, sourced first.zprofile- login shell configuration.zshrc- interactive shell setup, sourcesaliases.zshaliases.zsh- shell aliases and functions
Plugin management: Zinit/Zplug-era shell config and plugin setup live here.
Key integrations:
fzf- fuzzy finderzoxide- smart directory jumpingsesh- tmux session manager
dot_config/nvim-custom/- kickstart.nvim-based setupdot_config/nvim-lazyvim/- LazyVim setup
Switch between configs using vv or by setting NVIM_APPNAME.
- Navigate to the chezmoi source:
moicdoredit - Edit files in the source directory
- For templated files, edit the
.tmplsource file - Apply changes:
ma - Commit changes:
gmoi add . && gmoi commit
# Add a file to chezmoi management
chezmoi add ~/.config/newapp/config.yml
# Add with auto-template generation
chezmoi add --autotemplate ~/.gitconfigUse {{ .chezmoi.hostname }} for machine-specific config and {{ .chezmoi.os }} for OS-specific config.
Example:
{{ if eq .chezmoi.hostname "GVXPDWWKWG" -}}
# Work machine only
{{ end -}}Chezmoi uses special prefixes in the source directory:
dot_→.at any level.tmplsuffix → Go template processingexecutable_→ make file executableprivate_→ set file permissions to0600
Examples:
dot_config/nvim/init.lua→~/.config/nvim/init.luadot_zsh/dot_zprofile.tmpl→~/.zsh/.zprofiledot_tmux.conf→~/.tmux.conf
- Chezmoi source:
$HOME/.local/share/chezmoi - Config files:
~/.config/ - Local binaries:
~/.local/bin - ZSH configs:
$ZDOTDIR(usually~/.zsh/) - Tmux plugins:
~/.tmux/plugins/ - Global Claude instructions source:
~/code/dotfiles-private/dot_claude/CLAUDE.md
- Never use emojis in commit messages or mention Claude authorship
- Always update links in the README table of contents when adding/removing docs
- Never create dotfiles directly in
~/.config,~/.zsh,~/.emacs.d, etc. Always create them in the chezmoi source directory and deploy viachezmoi apply