How katsu996/dotfiles works
Main Components
a. Remote Git Repository
• Hosts all your chezmoi templates and config data (GitHub: katsu996/dotfiles.git).
b. Local chezmoi CLI
• Acts as the orchestration engine: init, apply, update, diff.
c. Template Store (“chezmoi working tree”)
• Directory structure under ./home, .chezmoitemplates, .chezmoiscripts, etc.
d. OS-Specific Package Managers & Shells
• Homebrew (macOS) or WinGet (Windows), plus shells (zsh / clink), Starship prompt, mise version manager.
e. User’s Home Directory (Target State)
• Actual dotfiles in ~/.config, ~/.gitignore, ~/.zshrc, etc., derived from templates.
f. External Tools & Services (Optional)
• VSCode, Ghostty, Gemini, Claude integrations (via templates under .gemini, .claude).
Relationships and Data Flows
a. Git Pull → chezmoi Update
• Remote changes fetched to the local chezmoi working tree.
b. chezmoi Diff / Apply → Home Directory
• Templates are rendered (templating engine using your TOML data) and materialized as real config files.
c. OS Detection Logic
• chezmoi uses your role (work/personal) and OS (darwin/windows) to select the correct sub-templates.
d. onChange Hooks / Scripts
• Shell scripts in .chezmoiscripts run post-apply to install packages via Homebrew or WinGet.
Architectural Patterns
• Template-Driven Configuration: .tmpl files are parameterized.
• OS & Role Abstraction: Directory structure mirrors categories (common, work, personal) and platforms.
• GitOps Approach: Treat configurations as code; apply changes by pulling & syncing.
Technologies & Frameworks
• chezmoi (core engine)
• Git (version control)
• Homebrew / WinGet (package managers)
• Shell (zsh / clink), Starship, mise (version manager)
• VSCode, Ghostty, Claude/Gemini integrations