# System map — ohmyzsh/ohmyzsh

> Canonical page: https://codevetter.com/unpack/ohmyzsh/system-map

# System map — ohmyzsh/ohmyzsh

Scanned commit 86ef6555e068663736a33376e4055aca9c1acc89 (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Oh My Zsh is a sourced shell framework, not a daemon: oh-my-zsh.sh is the single entrypoint sourced from ~/.zshrc and it orchestrates fpath setup, compinit, lib files, plugins, custom overrides, and the theme. Runtime state lives in $ZSH_CACHE_DIR (completion dump, .zsh-update epoch file, probe caches) and $ZSH/log (update.lock). External integrations are git (self-update via pull --rebase), the GitHub REST API (update check, PR label check), curl/wget/fetch, and chsh. CI is GitHub Actions: syntax checking, installer testing, a Vercel deploy of install.sh, vendored-dependency updates, and OpenSSF Scorecard.
- oh-my-zsh.sh is the sole runtime entrypoint, sourced from .zshrc after the user sets ZSH/ZSH_THEME/plugins; it aborts with a process-tree dump if loaded by a non-zsh shell and refuses non-zsh emulation modes. — [oh-my-zsh.sh#L10-46](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L10-L46) [templates/zshrc.zsh-template#L78](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/templates/zshrc.zsh-template#L78)
- Three env vars define the layout: ZSH (repo dir, defaulting to the script's own dir), ZSH_CUSTOM (default $ZSH/custom, a gitignored shadow tree), and ZSH_CACHE_DIR (default $ZSH/cache, falling back to ${XDG_CACHE_HOME:-$HOME/.cache}/oh-my-zsh when unwritable). — [oh-my-zsh.sh#L50-68](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L50-L68) [.gitignore](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.gitignore)
- Before compinit, each name in the $plugins array is resolved by is_plugin() to $ZSH_CUSTOM/plugins/<name> or $ZSH/plugins/<name> (a dir containing <name>.plugin.zsh or _<name>) and prepended to $fpath. — [oh-my-zsh.sh#L81-98](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L81-L98)
- Completion init writes $ZSH_COMPDUMP (default ${ZDOTDIR:-$HOME}/.zcompdump-<SHORT_HOST>-<ZSH_VERSION>), deletes and rebuilds it when embedded '#omz revision'/'#omz fpath' metadata lines go stale, and zrecompile-compiles it under a .lock mkdir. — [oh-my-zsh.sh#L129-185](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L129-L185)
- _omz_source() implements the override layer: for each lib/plugins path it prefers $ZSH_CUSTOM/<path> over $ZSH/<path>, and honors 'zstyle :omz:lib:<name>|plugins:<name> aliases no' by snapshotting and restoring the alias tables around the source. — [oh-my-zsh.sh#L187-226](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L187-L226) [README.md#L374-424](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/README.md#L374-L424)
- Load order is fixed: all lib/*.zsh files, then each plugin's <name>.plugin.zsh, then every $ZSH_CUSTOM/*.zsh, then the theme resolved from $ZSH_CUSTOM, $ZSH_CUSTOM/themes, or $ZSH/themes. — [oh-my-zsh.sh#L230-264](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/oh-my-zsh.sh#L230-L264)
- lib/cli.zsh defines the `omz` dispatcher: it maps argv[1] to functions named _omz::<command> (changelog, help, plugin, pr, reload, shop, theme, update, version) and registers a `_omz` compdef completer. — [lib/cli.zsh#L3-21](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/lib/cli.zsh#L3-L21) [lib/cli.zsh#L23-117](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/lib/cli.zsh#L23-L117)
- Self-update is split across two files: tools/check_for_upgrade.sh is sourced at every shell start to gate and trigger updates, while tools/upgrade.sh does the actual `git pull --rebase $remote $branch` using per-repo git config keys oh-my-zsh.remote and oh-my-zsh.branch. — [tools/check_for_upgrade.sh#L151-176](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/tools/check_for_upgrade.sh#L151-L176) [tools/upgrade.sh#L205-264](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/tools/upgrade.sh#L205-L264)
- tools/install.sh is a POSIX sh installer meant to be run via curl|sh: it does a manual `git init` + `git fetch --depth=1` into $ZSH, materializes .zshrc from templates/zshrc.zsh-template with a sed-substituted ZSH path, and optionally chsh's the login shell to zsh. — [tools/install.sh#L307-352](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/tools/install.sh#L307-L352) [tools/install.sh#L354-416](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/tools/install.sh#L354-L416) [tools/install.sh#L418-515](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/tools/install.sh#L418-L515)
- The installer is deployed to install.ohmyz.sh by the installer.yml workflow: it copies tools/install.sh into .github/workflows/installer/ and runs `vc deploy --prod` against a Vercel project whose vercel.json rewrites '/' to '/install.sh'. — [.github/workflows/installer.yml](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.github/workflows/installer.yml) [.github/workflows/installer/vercel.json](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.github/workflows/installer/vercel.json)
- lib/git.zsh wraps all prompt-time git calls in __git_prompt_git (GIT_OPTIONAL_LOCKS=0) and exposes git_prompt_info/git_prompt_status plus helpers like git_current_branch; lib/async_prompt.zsh provides an experimental fork-pipe-zle async framework that git.zsh registers into via _omz_register_handler. — [lib/git.zsh#L10-12](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/lib/git.zsh#L10-L12) [lib/git.zsh#L171-236](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/lib/git.zsh#L171-L236) [lib/async_prompt.zsh#L28-43](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/lib/async_prompt.zsh#L28-L43)
- The repo vendors 368 plugin directories under plugins/ (each with <name>.plugin.zsh and usually a README.md; some only ship a _<name> completion file) and 143 *.zsh-theme files under themes/. — [plugins/git/git.plugin.zsh](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/plugins/git/git.plugin.zsh) [plugins/github/github.plugin.zsh](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/plugins/github/github.plugin.zsh) [themes/random.zsh-theme](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/themes/random.zsh-theme)
- Vendored plugin dependencies are declared in .github/dependencies.yml (repo/branch/version plus pre/post-copy shell snippets) and synced weekly by .github/workflows/dependencies/updater.py under the dependencies.yml workflow. — [.github/dependencies.yml](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.github/dependencies.yml) [.github/workflows/dependencies/updater.py](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.github/workflows/dependencies/updater.py) [.github/workflows/dependencies.yml](https://github.com/ohmyzsh/ohmyzsh/blob/86ef6555e068663736a33376e4055aca9c1acc89/.github/workflows/dependencies.yml)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
