This is my dotfiles repository. It is managed by chezmoi.
- Install 1Password and sign in (avoid Flatpak/Snap versions for now).
- Install 1Password CLI and configure it.
If 1Password CLI is not available or broken (common in MDM setups), you can skip it entirely:
# Option 1: Set environment variable (disables 1Password CLI and SSH signing)
export CHEZMOI_SKIP_1PASSWORD=true
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply Kaylebor
# Option 2: Provide manual keys (API keys only, git signing will be disabled)
export CHEZMOI_GEMINI_API_KEY="your-api-key"
chezmoi applyNote: When 1Password is skipped, git commit signing is automatically disabled to prevent commit failures.
Execute this command to install chezmoi and apply the dotfiles:
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply KayleborWithin Emacs, you may want to run this to install the tree sitter grammars:
(mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))You'll also need to install icon fonts for proper display:
M-x all-the-icons-install-fonts
M-x nerd-icons-install-fonts
This repository supports two Homebrew installation approaches:
- Location:
/opt/homebrew(Apple Silicon) or/usr/local(Intel) - Benefits: Uses pre-built bottles, faster installation
- Use case: Normal environments without restrictions
- Location:
~/.homebrew - Benefits: Works in MDM environments where system directories are restricted
- Trade-offs: All packages built from source, longer installation times
- Special handling: Some packages (like gcc) require additional build flags for compatibility
- Known issues: GCC may show post-install dylib fixing errors but functions correctly
The installation type is configured during chezmoi init and affects package compilation and paths automatically.
When updating packages (especially those with custom build options like emacs-plus), you can use environment variables to control reinstallation:
CHEZMOI_REINSTALL_PACKAGES="neovim,tmux" chezmoi apply- Uses
brew reinstallunder the hood - Preserves installation options
- Good for fixing corrupted installations
CHEZMOI_FORCE_REINSTALL_PACKAGES="emacs-plus@31" chezmoi apply- Uninstalls then reinstalls the package
- Removes all options, permissions, and metadata
- Required when changing installation options
- Recommended for packages like
emacs-plusthat need complete removal on updates
You can specify multiple packages separated by commas, and use both variables together if needed.
The automation behind these installers lives in dot_local/bin/chezmoi-homebrew-manager. The CLI exposes commands such as full-install, check-outdated, rebuild-outdated, and an interactive mise-refresh for rebuilding managed Ruby toolchains. Full architecture notes and usage details are documented in docs/homebrew-manager.md.
This repository uses carapace for universal shell completions across Fish, Zsh, and Bash.
Many modern CLI tools include completion frameworks that provide rich, context-aware completions:
- Cobra (Go): Used by
gh,kubectl,docker,helm,hugo - Clap (Rust): Used by
fd,rg,bat,eza,difftastic,mise - Click (Python): Used by
pgcli - Argcomplete (Python): Enhancement for Python's argparse
- Yargs (Node.js): Used by many JavaScript CLIs
- Urfave/cli (Go): Alternative Go framework
Carapace automatically detects and bridges these frameworks, providing better completions than shell-specific scripts. Framework bridges are preferred because they:
- Get completions directly from the tool's built-in completion engine
- Are faster and more accurate than parsing help text
- Update automatically when the tool updates
The configuration in .config/carapace/bridges.yaml maps tools to their frameworks for optimal performance.
This repository includes a generalized system for managing JSON configuration files that need both shared settings (managed by Chezmoi) and device-specific settings (preserved per machine).
The system uses a metadata-driven approach:
- Configuration metadata in
.chezmoidata/managed-configs.yamldefines which files to manage - Template files contain shared configuration (without device-specific fields)
- Merge script (
run_onchange_managed-configs.sh.tmpl) automatically merges templates with existing device settings - Ignored files in
.chezmoiignoreprevent Chezmoi from directly managing these files
Currently manages configurations for:
- Claude Code (
~/.claude/settings.json) - Preserves model preferences and survey state - Cursor IDE (
~/Library/Application Support/Cursor/User/settings.json) - Preserves UI preferences - Cursor MCP (
~/.cursor/mcp.json) - Fully managed (no device-specific fields) - Zed Editor (
~/.config/zed/settings.json) - Preserves font sizes, theme, agent/model preferences, and context servers
- Automatic merging: Template changes trigger automatic merge with existing settings
- Device preservation: Existing device-specific fields are never overwritten
- Interactive updates: Shows diff preview and asks for confirmation before applying changes
- Hash-based detection: Only runs when template content actually changes
- JSON validation: Validates templates and existing files, backs up invalid JSON
- Flexible tooling: Uses
difftfor enhanced diffs, falls back to standarddiff
To manage a new JSON configuration file:
- Create template: Convert existing file to
.tmplformat, remove device-specific fields - Add to metadata: Define the configuration in
.chezmoidata/managed-configs.yaml:my_app_settings: template: "dot_config/myapp/settings.json.tmpl" destination: ".config/myapp/settings.json" preserve_fields: - "fontSize" - "theme" merge_strategy: "shallow" description: "My App settings with device-specific preferences"
- Update ignore list: Add the destination file to
.chezmoiignore
The system will automatically handle the rest - no need to write custom merge scripts!
- shallow: Simple merge where existing values override template values (recommended for most cases)
- deep: Recursive merge preserving nested structures while allowing template updates to flow through
- Fonts: Maple Mono