Declarative macOS (Apple Silicon) development environment powered by chezmoi.
English | 日本語
- chezmoi — template-driven dotfiles with interactive secret prompts
- sheldon + zsh-defer — minimal
.zshrccore with lazy-loaded modular config - starship — Catppuccin Mocha themed two-line prompt
- Ghostty — Moralerspace Neon font
- 1Password CLI — SSH signing, commit verification, secret management
- Claude Code — skills & agents managed as dotfiles
- mise — unified tool/runtime version manager (Node, Python, Ruby, Go, CLI tools)
- Homebrew — system packages, GUI apps, and libraries via Brewfile
- GitHub Actions — shellcheck, shfmt, Bats tests, zsh startup benchmark
Requires macOS (Apple Silicon) or Ubuntu and 1Password (SSH Agent + CLI).
On a fresh machine (no prerequisites needed beyond curl and bash):
# Review the script before running: https://github.com/kryota-dev/dotfiles/blob/main/install/install.sh
bash <(curl -fsLS https://raw.githubusercontent.com/kryota-dev/dotfiles/main/install/install.sh)If chezmoi is already installed:
chezmoi init --apply kryota-devLifecycle scripts automatically handle prerequisites, Homebrew packages, fonts, and macOS defaults.
Sensitive files (AWS config) are stored as 1Password Secure Notes and rendered via chezmoi templates at apply time. Before running chezmoi apply, ensure:
-
1Password desktop app is installed with CLI integration enabled (Settings > Developer > Integrate with 1Password CLI)
-
The following Secure Notes exist in the
kryota.devvault:Item Title Content Dotfiles - AWS Config~/.aws/configcontent
dotfiles/
├── .chezmoiroot # source root → home/
├── install/ # bootstrap script
├── home/
│ ├── .chezmoi.toml # chezmoi config (email, signingkey)
│ ├── dot_zshrc.tmpl # minimal core, sheldon-powered
│ ├── dot_config/
│ │ ├── ghostty/ # terminal config
│ │ ├── mise/ # tool version manager
│ │ ├── sheldon/ # plugin manager
│ │ ├── starship.toml # prompt theme
│ │ └── zsh/ # deferred shell modules
│ ├── AGENTS.md # shared AI agent instructions
│ ├── dot_claude/ # Claude Code settings & agents
│ ├── dot_codex/ # Codex settings
│ ├── dot_agents/skills/ # shared AI skills (symlinked)
│ ├── run_once_before_* # first-time setup
│ ├── run_onchange_after_* # re-run on content change
│ ├── run_once_after_* # one-time post-setup
│ └── ...
├── tests/ # Bats test suite
├── scripts/ # benchmark utilities
├── Makefile # development commands
└── LICENSE
.zshrc is a minimal core that delegates all plugin and module loading to sheldon with zsh-defer for async initialization:
.zprofile Homebrew PATH, env vars
↓
.zshrc (minimal core) setopt, PATH, mise, direnv, starship
↓
sheldon source zsh-defer loads everything async
├── community plugins autosuggestions, syntax-highlighting, completions
└── local modules ──→ aliases, git, docker, claude, ...
| Module | Description |
|---|---|
aliases.zsh |
General aliases (ll, vi, pn, etc.) |
git.zsh |
Git aliases & functions |
docker.zsh |
Docker / Compose aliases |
claude.zsh |
Claude Code utilities |
functions.zsh |
General utilities (yazi, mduch) |
completions.zsh |
Completion settings |
wtp.zsh |
wtp completions & cd hooks |
chezmoi orchestrates setup through lifecycle scripts — run_once scripts execute on first apply, while run_onchange scripts re-run when their tracked content changes:
| Phase | Script | Trigger | Description |
|---|---|---|---|
| 1 | 00-install-prerequisites |
once (before) | Xcode CLI tools, Homebrew |
| 2 | 10-brew-bundle |
on change | Install packages via Brewfile |
| 2.5 | 11-validate-1password |
once (after) | Validate 1Password CLI |
| 3 | 12-setup-mise |
on change | Install mise-managed tools |
| 4 | 20-macos-defaults |
on change | Finder, Dock, keyboard, etc. |
| 5 | 30-setup-fonts |
once (after) | Moralerspace Neon |
| 6 | 40-setup-sheldon |
once (after) | Lock plugin versions |
| 7 | 90-other-apps |
once (after) | Interactive app downloads |
AI-native development environment — Claude Code and Codex settings, custom skills, and agents are managed declaratively as dotfiles via chezmoi. Skills are centralized in home/dot_agents/skills/ and symlinked to both ~/.claude/skills and ~/.codex/skills.
| Command | Description |
|---|---|
make apply |
Apply dotfiles |
make diff |
Preview pending changes |
make watch |
Auto-apply on file changes |
make test |
Run lint + Bats tests |
make lint |
shellcheck + shfmt + zsh syntax |
make benchmark |
Measure zsh startup time |
make dump-brewfile |
Export current Homebrew packages |
CI pipelines:
- CI (
ci.yml): Lint (ubuntu) → Test (macos) → Benchmark (macos, main only) - Setup Validation (
setup-validation.yml): chezmoi apply → mise install → file verification → zsh startup (macos)