# mathiasbynens/dotfiles architecture

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

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

## Overview

This repository provides personal shell and editor settings, plus setup utilities for installing them and configuring a Mac. The documented workflow is to run the bootstrap script to copy dotfiles into the home directory, or use the Git-free archive command; users can then optionally apply macOS defaults and install Homebrew formulae. The README documents these workflows and capabilities, but no source excerpts were provided, so internal sourcing and script behavior are not inferred.

Main entry points: [`bootstrap.sh`](https://github.com/mathiasbynens/dotfiles/blob/main/bootstrap.sh) (Bootstrap installer), [`README.md`](https://github.com/mathiasbynens/dotfiles/blob/main/README.md) (Git-free install), [`brew.sh`](https://github.com/mathiasbynens/dotfiles/blob/main/brew.sh) (Homebrew formulae), [`.macos`](https://github.com/mathiasbynens/dotfiles/blob/main/.macos) (macOS defaults)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_install["Installation"]
  node_bootstrap["Bootstrap installer<br/>[bootstrap.sh]"]
  node_home["Home directory"]
  node_gitfree["Git-free install<br/>[README.md]"]
end

subgraph group_shell["Shell environment"]
  node_shellconfig["Shell configuration<br/>[.bash_profile]"]
  node_aliases["Aliases<br/>[.aliases]"]
  node_functions["Shell functions<br/>[.functions]"]
  node_exports["Environment exports<br/>[.exports]"]
  node_bashrc["Bash settings<br/>[.bashrc]"]
end

subgraph group_preferences["System preferences"]
  node_macos["macOS defaults<br/>[.macos]"]
  node_brew["Homebrew formulae<br/>[brew.sh]"]
  node_editor["Editor settings<br/>[.vimrc]"]
  node_terminal["Terminal themes"]
  node_sublime["Sublime settings"]
  node_spectacle["Spectacle settings<br/>[spectacle.json]"]
end

node_user(("User"))
node_homebrew["Homebrew"]

node_user -->|"runs"| node_bootstrap
node_bootstrap -->|"copies dotfiles"| node_home
node_user -->|"runs command"| node_gitfree
node_gitfree -->|"extracts archive"| node_home
node_user -->|"runs"| node_macos
node_user -->|"runs"| node_brew
node_brew -->|"installs formulae"| node_homebrew

click node_bootstrap "https://github.com/mathiasbynens/dotfiles/blob/main/bootstrap.sh"
click node_gitfree "https://github.com/mathiasbynens/dotfiles/blob/main/README.md"
click node_shellconfig "https://github.com/mathiasbynens/dotfiles/blob/main/.bash_profile"
click node_aliases "https://github.com/mathiasbynens/dotfiles/blob/main/.aliases"
click node_functions "https://github.com/mathiasbynens/dotfiles/blob/main/.functions"
click node_exports "https://github.com/mathiasbynens/dotfiles/blob/main/.exports"
click node_bashrc "https://github.com/mathiasbynens/dotfiles/blob/main/.bashrc"
click node_macos "https://github.com/mathiasbynens/dotfiles/blob/main/.macos"
click node_brew "https://github.com/mathiasbynens/dotfiles/blob/main/brew.sh"
click node_editor "https://github.com/mathiasbynens/dotfiles/blob/main/.vimrc"
click node_terminal "https://github.com/mathiasbynens/dotfiles/blob/main/init/Solarized%20Dark.itermcolors"
click node_sublime "https://github.com/mathiasbynens/dotfiles/blob/main/init/Preferences.sublime-settings"
click node_spectacle "https://github.com/mathiasbynens/dotfiles/blob/main/init/spectacle.json"

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_bootstrap,node_home,node_gitfree,node_user toneBlue
class node_shellconfig,node_aliases,node_functions,node_exports,node_bashrc toneAmber
class node_macos,node_brew,node_editor,node_terminal,node_sublime,node_spectacle toneMint
class node_homebrew toneIndigo
```

## Components

### Installation

- [Bootstrap installer](https://github.com/mathiasbynens/dotfiles/blob/main/bootstrap.sh): `bootstrap.sh`
- **Home directory**
- [Git-free install](https://github.com/mathiasbynens/dotfiles/blob/main/README.md): `README.md`

### Shell environment

- [Shell configuration](https://github.com/mathiasbynens/dotfiles/blob/main/.bash_profile): `.bash_profile`
- [Aliases](https://github.com/mathiasbynens/dotfiles/blob/main/.aliases): `.aliases`
- [Shell functions](https://github.com/mathiasbynens/dotfiles/blob/main/.functions): `.functions`
- [Environment exports](https://github.com/mathiasbynens/dotfiles/blob/main/.exports): `.exports`
- [Bash settings](https://github.com/mathiasbynens/dotfiles/blob/main/.bashrc): `.bashrc`

### System preferences

- [macOS defaults](https://github.com/mathiasbynens/dotfiles/blob/main/.macos): `.macos`
- [Homebrew formulae](https://github.com/mathiasbynens/dotfiles/blob/main/brew.sh): `brew.sh`
- [Editor settings](https://github.com/mathiasbynens/dotfiles/blob/main/.vimrc): `.vimrc`
- [Terminal themes](https://github.com/mathiasbynens/dotfiles/blob/main/init/Solarized%20Dark.itermcolors): `init/Solarized Dark.itermcolors`
- [Sublime settings](https://github.com/mathiasbynens/dotfiles/blob/main/init/Preferences.sublime-settings): `init/Preferences.sublime-settings`
- [Spectacle settings](https://github.com/mathiasbynens/dotfiles/blob/main/init/spectacle.json): `init/spectacle.json`

### Other components

- **User**
- **Homebrew**

## Connections

- User → Bootstrap installer: runs (evidence: `README.md`)
- Bootstrap installer → Home directory: copies dotfiles (evidence: `README.md`)
- User → Git-free install: runs command (evidence: `README.md`)
- Git-free install → Home directory: extracts archive (evidence: `README.md`)
- User → macOS defaults: runs (evidence: `README.md`)
- User → Homebrew formulae: runs (evidence: `README.md`)
- Homebrew formulae → Homebrew: installs formulae (evidence: `README.md`)
