Personal dotfiles managed with chezmoi.
This repository contains the following configuration files:
- Shell: zsh configuration files (
.zshrc,.zprofile) - Git:
.gitconfig(GPG signing, editor settings, etc.) - Editors: Vim, Zed configurations
- Oh My Zsh: Custom theme (
zenith, managed via.chezmoiexternal.toml) and plugin settings - AI Tools: Claude Code, Codex, Gemini, OpenCode configurations
- tools: Development tools as a Git submodule (see dotfiles-tools)
- agent_hooks: Custom hook system for Claude Code and OpenCode
- permissions-gen: Tool permission generator
- Others: Karabiner-Elements, Deno completions, VS Code prompt instructions, etc.
- chezmoi - dotfiles manager
- Oh My Zsh - Zsh framework
- eza - modern replacement for
ls - Zed - text editor (used as Git editor)
- GnuPG - for Git commit signing
- Bitwarden CLI - for secrets management
| Platform | Support |
|---|---|
| macOS (arm64) | Full |
| Linux (x86_64, arm64) | Partial (shell, git, editors) |
| Windows | Partial (git, editors, AI tools) |
# Install chezmoi
brew install chezmoi # macOS
# or
sh -c "$(curl -fsLS get.chezmoi.io)" # Linux/Windows
# Apply dotfiles
chezmoi init --apply <repository-url># Check for changes
chezmoi diff
# Apply changes
chezmoi apply
# Open source directory
chezmoi cd
# Add a file
chezmoi add ~/.config/xxxTool permissions are centralized in .chezmoidata/permissions.yaml and
generated into tool-specific configs.
- Generator:
tools/permissions-gen - Run:
just perms - Details:
docs/permissions.md
.
├── .chezmoiscripts/ # Post-apply scripts (run_after_*.sh, run_after_*.ps1)
├── AppData/ # Windows application settings (Zed)
├── completions/ # Shell completion files
├── docs/ # Documentation (permissions.md, etc.)
├── dot_claude/ # Claude Code configuration
├── dot_codex/ # Codex configuration
├── dot_config/ # XDG config directory (opencode, karabiner, etc.)
├── dot_gemini/ # Gemini configuration
├── Library/ # macOS application settings (VS Code prompts)
├── tools/ # Development tools (Git submodule -> dotfiles-tools)
├── dot_gitconfig.tmpl # Git configuration (template)
├── dot_vimrc.tmpl # Vim configuration (Unix)
├── _vimrc.tmpl # Vim configuration (Windows)
├── dot_zprofile # Zsh profile
└── dot_zshrc # Zsh configuration
- Oh My Zsh with custom theme (zenith)
- Plugins: git, zsh-autosuggestions
- eza as ls alias
- nvm (Node.js version manager)
- pyenv (Python version manager)
- Bun (JavaScript runtime)
- Deno (JavaScript/TypeScript runtime)
- Java 21 (for Android development)
- GPG signing for commits and tags
- Zed as default editor
push.autoSetupRemote = truefor automatic remote setup
Custom hooks for Claude Code that provide safety checks. Each hook type has a single command with module flags:
# permission-request: Bash command checks
agent_hooks permission-request --block-rm --dangerous-paths "~/"
# pre-tool-use: Edit/Write/Bash tool checks
agent_hooks pre-tool-use --deny-rust-allow --expect --check-package-manager --deny-destructive-findAvailable modules:
| Hook Type | Flag | Description |
|---|---|---|
permission-request |
--block-rm |
Prevents rm commands, suggests trash instead |
permission-request |
--dangerous-paths <paths> |
Protects specified paths from rm/trash/mv |
pre-tool-use |
--deny-rust-allow |
Prevents #[allow(...)] attributes in Rust files |
pre-tool-use |
--expect |
With --deny-rust-allow: allow #[expect], deny #[allow] |
pre-tool-use |
--additional-context <msg> |
Appends custom message to denial reason |
pre-tool-use |
--check-package-manager |
Denies mismatched package manager commands |
pre-tool-use |
--deny-destructive-find |
Denies destructive find commands (e.g. find -delete) |
pre-tool-use |
--deny-nul-redirect |
Windows only. Denies > nul/2> nul/&> nul redirects and suggests /dev/null |
See tools/agent_hooks/README.md for details.
- Repository (excluding third-party files listed in THIRD_PARTY.md): Apache License 2.0 (see LICENSE)
- Third-party components: see THIRD_PARTY.md
- agent_hooks/: Apache License 2.0 (see tools/agent_hooks/LICENSE)
- tools/: Apache License 2.0 (see tools/LICENSE)