Core architectural decisions and system design of the dotfiles shell distribution.
~/.config/ to keep the home directory clean.~/.dotfiles/
├── dot_config/ # Managed application configurations (~/.config/)
│ ├── zsh/ # Modular Zsh rc.d architecture
│ ├── fish/ # Autoloading Fish configuration
│ ├── nushell/ # Structured data shell config
│ ├── shell/ # Shared logic (aliases, paths, functions)
│ └── ... # 50+ tool configurations (nvim, tmux, ghostty, etc.)
├── dot_local/ # Local binaries and scripts (~/.local/bin/)
├── .chezmoitemplates/ # Unified source for aliases, functions, and paths
├── scripts/ # Internal libraries and diagnostics
├── nix/ # Nix Flake for deterministic toolchains
├── lib/wasm-tools/ # Rust source for Wasm utilities
└── install.sh # Universal bootstrap script (zero dependencies)
_cached_evalAcross Zsh, Fish, and Bash, an idempotent caching wrapper avoids redundant tool initialization (Starship, Zoxide, Atuin).
eval output exists in ~/.cache/shell/.source the cached text directly, saving 20-50ms per tool.To reach a fluid first-prompt target (< 50ms), the shell uses a three-phase startup:
A minimal environment triggered by DOTFILES_ARTIFACT_MODE=1.
->.bento.sh that provides environment context (Node version, cloud status, Git health) without blocking the main thread.SIGWINCH to return control after background hydration completes.Set DOTFILES_ULTRA_FAST=1 to skip all non-essential initialization. Only core paths, aliases, and the prompt are loaded. Useful for:
Enables verbose diagnostic output during shell startup. Prints which files are sourced and their load times.
Enables set -x tracing for the entire shell startup sequence. Output is written to ~/.local/state/dotfiles/debug.log for post-mortem analysis.
Functions are organized into groups defined in .chezmoitemplates/functions/groups.json:
| Group | Functions | Description |
|---|---|---|
api |
apihealth, apilatency, apiload | API testing utilities |
curl |
curlheader, curlstatus, curltime, httpdebug | HTTP debugging |
text |
encode64, kebabcase, lowercase, titlecase, … | Text transformation |
system |
environment, freespace, hostinfo, myproc, sysinfo | System introspection |
files |
backup, extract, hexdump, hiddenfiles, size, zipf | File operations |
interactive |
banner, emoji, matrix, rainbow, stopwatch | Terminal fun |
nav |
cdls, goto, ql | Navigation shortcuts |
security |
genpass, keygen, mount_read_only | Security utilities |
misc |
dothelp, view-source, prependpath, caffeine | Miscellaneous |
Groups are lazy-loaded: stub functions are defined at startup, and the real implementation is loaded on first invocation. This keeps startup fast while providing 52+ functions on demand.
The groups.json schema maps group names to arrays of relative paths (including subdirectory):
{
"group_name": ["group_name/function1.sh", "group_name/function2.sh"]
}
Each .sh file lives in a subdirectory matching its group and defines a single function with the same name as the file (minus .sh extension).