# 0xdevalias/dotfiles architecture

> Architecture diagram of the GitHub repository 0xdevalias/dotfiles, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/0xdevalias/dotfiles
- Repository: https://github.com/0xdevalias/dotfiles

## Overview

#### Purpose and Entry Points
This is a macOS-oriented personal dotfiles repository, organized by technology/topic rather than as an application. Its primary entry points are `script/bootstrap` (link managed home-directory files), `script/install` (run setup), and commands exposed through `bin/`, notably `bin/dotfiles-dot`. Shell startup is driven by symlinked Zsh files such as `zsh/zshrc.symlink` and `zsh/zprofile.symlink`.

#### Bootstrap and Home Projection
`script/bootstrap` is the central deployment boundary: repository files ending in `.symlink` are projected into `$HOME` with the suffix removed. This makes versioned files active user configuration while keeping machine-local/secrets outside the repository, notably via `localrc.example.symlink` and the expected `~/.localrc`.
Paths: `script/bootstrap`, `zsh/zshrc.symlink`, `git/gitconfig.symlink`.

#### Shell Configuration Loading Model
The runtime is Zsh. Topic directories contribute shell fragments: `path.zsh` files establish PATH/environment ordering, general `.zsh` files define aliases/functions/configuration, and `completion.zsh` files load last. The root Zsh configuration orchestrates this modular topic-based composition.
Paths: `zsh/config.zsh`, `system/_path.zsh`, `zsh/completion.zsh`.

#### Topic Modules and Runtime Managers
Language/tool modules configure installation and shell activation for several version-management ecosystems. The repository supports both legacy and newer runtime approaches, including rbenv, pyenv, nodenv/n, goenv, jenv, and asdf. Their install scripts are independently runnable, so setup is selective rather than a single mandatory stack.
Paths: `ruby/install.sh`, `python/pyenv.zsh`, `node/nodenv.zsh`.

#### Dependency and Machine Provisioning
Homebrew is the principal package-management layer, rooted at `Brewfile` and supplemented by host-specific captured package lists. OS-level setup/defaults is a separate macOS-focused stage, while installer scripts handle individual tools and applications.
Paths: `Brewfile`, `homebrew/install.sh`, `osx/set-defaults.sh`.

#### Command Surface and Automation
`bin/` is added to PATH and acts as the operational interface: it contains workstation maintenance, Git/GitHub workflows, Docker controls, media/document conversion, cloud utilities, and security/recon wrappers. These commands compose installed external CLIs rather than form a cohesive service runtime.
Paths: `bin/dotfiles-create-bin`, `bin/git-up`, `bin/docker-init`.

#### Managed External Tool Configuration
The repository owns configuration and startup integration for developer and desktop tools: Git and GitHub CLI, SSH/GPG, Docker, Kubernetes/minikube, Google Cloud, terminal/editor settings, and AI tooling. Sensitive credentials are intentionally excluded through local config and ignored directories.
Paths: `config.symlink/gh/config.yml`, `ssh/ssh.symlink/config.example`, `codex/codex.symlink/config.toml`.

#### Dependency Boundaries
There is no server, database, or web application. The effective system is the user’s shell and macOS environment. External dependencies include Homebrew, Antigen for Zsh bundles, Git/GitHub, Docker, GCP tooling, language version managers, and optional desktop applications. Antigen-specific bundle declarations are collected from topic `.anti` files.
Paths: `antigen/antigen`, `git/git.anti`, `node/node.anti`.

Main entry points: [`script/bootstrap`](https://github.com/0xdevalias/dotfiles/blob/devalias/script/bootstrap) (Bootstrap), [`script/install`](https://github.com/0xdevalias/dotfiles/blob/devalias/script/install) (Setup entry point), [`zsh/config.zsh`](https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/config.zsh) (Topic loader), [`homebrew/install.sh`](https://github.com/0xdevalias/dotfiles/blob/devalias/homebrew/install.sh) (Homebrew installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Deployment"]
  node_install["Setup entry point<br/>installer"]
  node_bootstrap["Bootstrap<br/>deployment script"]
  node_home["Active home config<br/>user environment"]
  node_localrc["Local secrets config<br/>local override"]
end

subgraph group_shell["Zsh runtime"]
  node_zshrc["Zsh startup<br/>shell entrypoint<br/>[zshrc.symlink]"]
  node_zsh_config["Topic loader<br/>shell orchestrator<br/>[config.zsh]"]
  node_path_fragments["PATH fragments<br/>shell fragments<br/>[_path.zsh]"]
  node_completion["Completion loader<br/>shell fragment<br/>[completion.zsh]"]
  node_antigen["Antigen<br/>Zsh bundle manager"]
  node_bundle_declarations["Bundle declarations<br/>Antigen topics<br/>[git.anti]"]
end

subgraph group_provisioning["Machine provisioning"]
  node_brewfile["Brew package manifest"]
  node_homebrew["Homebrew installer<br/>package installer<br/>[install.sh]"]
  node_macos_defaults["macOS defaults<br/>OS provisioning<br/>[set-defaults.sh]"]
  node_runtime_modules["Runtime managers<br/>selective setup modules<br/>[install.sh]"]
end

subgraph group_tooling["Tool integrations"]
  node_bin_commands["Operational commands<br/>CLI command surface"]
  node_git_config["Git configuration<br/>managed tool config<br/>[gitconfig.symlink]"]
  node_external_clis{{"Installed external CLIs<br/>external dependencies"}}
  node_managed_tool_configs["Developer tool configs<br/>managed configurations<br/>[config.yml]"]
end

node_install -->|"deploys config"| node_bootstrap
node_install -->|"provisions packages"| node_homebrew
node_install -->|"applies OS setup"| node_macos_defaults
node_install -.->|"runs selectively"| node_runtime_modules
node_bootstrap -->|"creates symlinks"| node_home
node_bootstrap -->|"projects"| node_zshrc
node_bootstrap -->|"projects"| node_git_config
node_bootstrap -->|"projects"| node_managed_tool_configs
node_localrc -.->|"machine-local override"| node_home
node_zshrc -->|"loads"| node_zsh_config
node_zsh_config -->|"loads first"| node_path_fragments
node_zsh_config -->|"loads last"| node_completion
node_zsh_config -->|"initializes"| node_antigen
node_bundle_declarations -->|"declares bundles"| node_antigen
node_path_fragments -->|"adds bin to PATH"| node_bin_commands
node_homebrew -->|"installs manifest"| node_brewfile
node_homebrew -->|"installs"| node_external_clis
node_runtime_modules -->|"activates runtimes"| node_external_clis
node_bin_commands -->|"composes"| node_external_clis
node_managed_tool_configs -->|"configures"| node_external_clis
node_git_config -->|"configures Git"| node_external_clis

click node_install "https://github.com/0xdevalias/dotfiles/blob/devalias/script/install"
click node_bootstrap "https://github.com/0xdevalias/dotfiles/blob/devalias/script/bootstrap"
click node_localrc "https://github.com/0xdevalias/dotfiles/blob/devalias/localrc.example.symlink"
click node_zshrc "https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/zshrc.symlink"
click node_zsh_config "https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/config.zsh"
click node_path_fragments "https://github.com/0xdevalias/dotfiles/blob/devalias/system/_path.zsh"
click node_completion "https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/completion.zsh"
click node_antigen "https://github.com/0xdevalias/dotfiles/blob/devalias/antigen/antigen"
click node_bundle_declarations "https://github.com/0xdevalias/dotfiles/blob/devalias/git/git.anti"
click node_brewfile "https://github.com/0xdevalias/dotfiles/blob/devalias/Brewfile"
click node_homebrew "https://github.com/0xdevalias/dotfiles/blob/devalias/homebrew/install.sh"
click node_macos_defaults "https://github.com/0xdevalias/dotfiles/blob/devalias/osx/set-defaults.sh"
click node_runtime_modules "https://github.com/0xdevalias/dotfiles/blob/devalias/ruby/install.sh"
click node_bin_commands "https://github.com/0xdevalias/dotfiles/blob/devalias/bin/dotfiles-create-bin"
click node_git_config "https://github.com/0xdevalias/dotfiles/blob/devalias/git/gitconfig.symlink"
click node_managed_tool_configs "https://github.com/0xdevalias/dotfiles/blob/devalias/config.symlink/gh/config.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_install,node_bootstrap,node_home,node_localrc toneBlue
class node_zshrc,node_zsh_config,node_path_fragments,node_completion,node_antigen,node_bundle_declarations toneAmber
class node_brewfile,node_homebrew,node_macos_defaults,node_runtime_modules toneMint
class node_bin_commands,node_git_config,node_external_clis,node_managed_tool_configs toneRose
```

## Components

### Deployment

- [Setup entry point](https://github.com/0xdevalias/dotfiles/blob/devalias/script/install): installer · Runs selected machine and tool setup. · `script/install`
- [Bootstrap](https://github.com/0xdevalias/dotfiles/blob/devalias/script/bootstrap): deployment script · Links managed dotfiles into the home directory. · `script/bootstrap`
- **Active home config**: user environment · Symlinked configuration plus machine-local settings.
- [Local secrets config](https://github.com/0xdevalias/dotfiles/blob/devalias/localrc.example.symlink): local override · Expected ~/.localrc remains outside version control. · `localrc.example.symlink`

### Zsh runtime

- [Zsh startup](https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/zshrc.symlink): shell entrypoint · `zsh/zshrc.symlink`
- [Topic loader](https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/config.zsh): shell orchestrator · Composes topic fragments in startup order. · `zsh/config.zsh`
- [PATH fragments](https://github.com/0xdevalias/dotfiles/blob/devalias/system/_path.zsh): shell fragments · Establish environment and PATH ordering. · `system/_path.zsh`
- [Completion loader](https://github.com/0xdevalias/dotfiles/blob/devalias/zsh/completion.zsh): shell fragment · Loaded after general shell configuration. · `zsh/completion.zsh`
- [Antigen](https://github.com/0xdevalias/dotfiles/blob/devalias/antigen/antigen): Zsh bundle manager · `antigen/antigen`
- [Bundle declarations](https://github.com/0xdevalias/dotfiles/blob/devalias/git/git.anti): Antigen topics · Topic files declare Zsh bundles. · `git/git.anti`

### Machine provisioning

- [Brew package manifest](https://github.com/0xdevalias/dotfiles/blob/devalias/Brewfile): package manifest · `Brewfile`
- [Homebrew installer](https://github.com/0xdevalias/dotfiles/blob/devalias/homebrew/install.sh): package installer · `homebrew/install.sh`
- [macOS defaults](https://github.com/0xdevalias/dotfiles/blob/devalias/osx/set-defaults.sh): OS provisioning · `osx/set-defaults.sh`
- [Runtime managers](https://github.com/0xdevalias/dotfiles/blob/devalias/ruby/install.sh): selective setup modules · Supports rbenv, pyenv, nodenv/n, goenv, jenv, and asdf. · `ruby/install.sh`

### Tool integrations

- [Operational commands](https://github.com/0xdevalias/dotfiles/blob/devalias/bin/dotfiles-create-bin): CLI command surface · Workstation, Git, Docker, cloud, media, and security wrappers. · `bin/dotfiles-create-bin`
- [Git configuration](https://github.com/0xdevalias/dotfiles/blob/devalias/git/gitconfig.symlink): managed tool config · `git/gitconfig.symlink`
- **Installed external CLIs**: external dependencies · GitHub, Docker, GCP, language tools, and optional desktop apps.
- [Developer tool configs](https://github.com/0xdevalias/dotfiles/blob/devalias/config.symlink/gh/config.yml): managed configurations · Includes GitHub CLI, SSH/GPG, and AI tool configuration. · `config.symlink/gh/config.yml`

## Connections

- Setup entry point → Bootstrap: deploys config
- Setup entry point → Homebrew installer: provisions packages
- Setup entry point → macOS defaults: applies OS setup
- Setup entry point → Runtime managers: runs selectively
- Bootstrap → Active home config: creates symlinks
- Bootstrap → Zsh startup: projects
- Bootstrap → Git configuration: projects
- Bootstrap → Developer tool configs: projects
- Local secrets config → Active home config: machine-local override
- Zsh startup → Topic loader: loads
- Topic loader → PATH fragments: loads first
- Topic loader → Completion loader: loads last
- Topic loader → Antigen: initializes
- Bundle declarations → Antigen: declares bundles
- PATH fragments → Operational commands: adds bin to PATH
- Homebrew installer → Brew package manifest: installs manifest
- Homebrew installer → Installed external CLIs: installs
- Runtime managers → Installed external CLIs: activates runtimes
- Operational commands → Installed external CLIs: composes
- Developer tool configs → Installed external CLIs: configures
- Git configuration → Installed external CLIs: configures Git
