ZSHANDΒΆ
High-performance Zsh framework for developers who don't wait.
OMZ plugins Β· ZSHAND plugins Β· widgets Β· hooks β fast or deferred.
Override anything. Have your .zshrc and source it too.
β― health β startup <50ms Β· 11 modules Β· 10 hooks deferred β widgets 20 bound Β· lazy stubs Β· 1ms each β bundle 1 .zwc Β· 100+ files compiled β tools 70+ installed Β· pkgsync verified β― zr β recompiled in ~1s β― zprofile --report 1. 12ms hooks/01_mise.zsh 2. 8ms core/20_plugins.zsh 3. 4ms core/18_hooks.zsh
β‘ Why ZSHAND?ΒΆ
import-ohmyzsh-plugins. β Import Guide .zwc bytecode, inlined with the framework. Same treatment as core. β Your Config -
<50ms Cold Start
P10k instant prompt + compiled
.zwcbytecode. 100+ source files β 1 bundle viazmono. Your config compiled in too viazfull. -
Import OMZ / P10k / Prezto
One command each:
import-ohmyzsh-plugins,import-p10k-theme,import-prezto-themes. Bring your setup β don't start over. -
Override Without Forking
Drop
05_my_module.zshinrc.d/β it loads between04_pathand06_engine. Override any core module, widget, hook, or function. Zero patching, zero forks. -
Self-Healing Shell
3 failures β Safe Mode auto-triggers: recovery menu, minimal PATH, one-command fixes.
health+ztopdashboards. PATH auto-heals. -
Auto System Setup
packages.tomldeclares every tool, language, and app. Fresh machine? Onecloner.shrun installs 70+ tools, sets up SSH/GPG, and compiles the framework.pkgsynckeeps it all in sync. -
20+ Keyboard Widgets
AI commit (Ctrl+B), fuzzy file picker (Ctrl+T), man page search (Alt+M), git branch picker, and more β all lazy-loaded, compile on first keypress.
-
Auto-Generated Docs
Every file has structured headers.
docgengenerates source docs + Mermaid dependency graphs from framework and your files.aicontextexports for Cursor/Windsurf/Claude. -
AI-Native Workflow
aicmitgenerates commits from diffs.aidebugbuilds error-diagnosis prompts.pastemsmart-pastes AI responses. Project manifests viaaicontext.
π© Under the HoodΒΆ
.zwc bundle.π Quick StartΒΆ
-
Setup
1. Clone & bootstrap β detects your OS, installs 70+ tools, sets up SSH/GPG keys, writes shell profiles, and compiles the framework:
Supports Debian, Manjaro, macOS, WSL. Flags:
--dry-run,--update,--uninstall.2. First run β interactive setup wizard:
3. Choose your mode β pick how ZSHAND runs:
~/.config/zshand/config.toml[framework] # Fast mode (default) β compiled bytecode dev_mode = false auto_full = true # auto-recompile on changes perf_budget = 5 # warn if any file > 5ms # Dev mode β raw source, instant edits # dev_mode = true4. Secrets β auto-secured with
chmod 600every startup: -
Basic Usage
After install β verify and start using:
Compile β run after any edit:
zr # quick recompile (~1s) zfull # framework + your config (~3s) zfresh # clean rebuild + restart (~4s) zupdate # full maintenance cycleProfile β find what's slow:
zprofile # instrumented profiling zprofile --report # last timing report ztop # live framework dashboardImport β bring your existing setup:
import-ohmyzsh-plugins # OMZ plugins β ZSHAND import-p10k-theme # your .p10k.zsh config import-prezto-themes # Prezto themesJust recipes β
just --listfor all:Add your own recipes in
~/.config/zshand/justfileβ they're auto-included.
π How ZSHAND ComparesΒΆ
.zsh file. .zwc bundle. Project Overview
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Full framework | Full framework | Prompt theme | Full framework | Plugin mgr | Module mgr | Plugin mgr | Plugin mgr | Plugin mgr | Full framework | Full framework |
| Shell | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh+Bash | Bash | Bash |
| GitHub stars | Private | 175k | 46k | 14k | 2.9k | 3.8k | 7.9k | 5.8k | 1k | 14k | 5.9k |
| Status | Active | Active | Archived | Slow | Active | Active | Unmaintained | Unmaintained | Active | Active | Active |
| Written in | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Zsh | Rust | Bash | Bash |
| Config format | β TOML | Shell | Shell | Shell | Shell | Shell | Shell | Shell | β TOML | Shell | Shell |
Performance & Loading
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Cold start | <50ms | 200-400ms (no compile) | N/A (prompt only) | 80-150ms | 50-100ms (ice tuned) | 40-80ms | 300-500ms (re-parse) | 200-400ms (re-parse) | 30-60ms (Rust loader) | 200-500ms | 150-300ms |
| Bytecode bundle | 100+ files β 1 β .zwc | No | No | No | No | No | No | No | No | No | No |
| Auto-compilation | Detects stale, β recompiles per-dir | No | No | No | β ice compile | β compile | No | No | No | No | No |
| Lazy loading | Each function/widget β on first call | No | N/A | β Partial | β Turbo | β Partial | No | β Deferred | β Yes | No | No |
| Async ops | Hooks run β after prompt renders | No | N/A | No | β Turbo | No | No | No | No | No | No |
| Profiling | zprofile β ranks β slowest files | No | No | No | β zpmod | No | No | No | No | No | No |
Configuration & Extensibility
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Override w/o fork | Drop file in β rc.d/, it wins | No | No | β Partial | No | No | No | No | No | β Partial | No |
| TOML config | Declarative β config, no shell code | No | No | No | No | No | No | No | β Yes | No | No |
| Load order ctrl | 05_foo.zsh β number β sets priority | No | No | No | No | No | No | No | No | No | No |
| Import frameworks | One cmd β imports OMZ/Prezto | Native | No | Native | β Partial | β Partial | β OMZ | β GitHub | β GitHub | No | β OMZ |
| 3-tier functions | Core β plugin β yours (β last wins) | Plugins | N/A | β Modules | No | No | No | No | No | No | No |
| Custom plugins dir | Own dir, β profiled + compiled | β Yes | N/A | Yes | β Yes | Yes | No | No | No | β Yes | Yes |
| Themes | P10k built in + β customizable | β 150+ | Native | β 30+ | No | No | No | No | No | β 60+ | β 50+ |
Built-in Features
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Functions | 31 β shell functions | β ~30 | 0 | β ~20 | 0 | ~10 | 0 | 0 | 0 | β ~20 | ~15 |
| Keyboard widgets | 20+ β bound to keys | 0 | 0 | β 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Smart hooks | 10 β hooks, deferred after prompt | β Plugins | N/A | β 6 | β Ice | No | No | β Tags | No | No | No |
| PATH healing | Detects broken PATH, β auto-repairs | No | No | No | No | No | No | No | No | No | No |
| Plugins included | 133+ β source files, all compiled | β 300+ | N/A | β 30+ | No | No | No | No | No | β 70+ | β 50+ |
| Completions | fzf-powered, β compiled in | β 250+ | N/A | β Yes | No | No | No | No | No | β 40+ | 30+ |
Developer Tool Integrations
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| mise / asdf | β Deferred load, zero startup cost | β Plugin | N/A | No | β Plugin | No | No | No | No | No | No |
| Docker | Aliases + completions, β auto-loaded | β Plugin | N/A | β Module | Plugin | No | No | No | No | β Plugin | Plugin |
| Atuin history | Replaces Ctrl-R with β fuzzy search | Plugin | No | No | Plugin | No | No | No | No | No | No |
| Git identity | Auto-switches name/email β per repo | No | β Prompt | No | No | No | No | No | No | No | No |
| Per-project env | cd into dir β β tools activate | β direnv | No | No | β Plugin | No | No | No | No | No | No |
| nvm / pnpm / bun | All managed by β mise, one tool | β Plugin | N/A | No | Plugin | No | No | No | No | β Plugin | Plugin |
| Rust / cargo | β mise manages toolchain + PATH | No | N/A | No | Plugin | No | No | No | No | No | No |
| Go | β mise manages version + GOPATH | β Plugin | N/A | No | Plugin | No | No | No | No | No | No |
| uv / pip | β mise manages Python + uv | β Plugin | N/A | β Module | Plugin | No | No | No | No | No | No |
| Linting / fixing | β Trunk β ShellCheck, shfmt, gitleaks, ruff, prettier + more | No | No | No | No | No | No | No | No | No | No |
Shell Enhancements
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Syntax highlight | β Pre-compiled into bundle | β Plugin | N/A | No | β Plugin | β Plugin | Plugin | Plugin | Plugin | No | No |
| Auto-suggest | β Lazy-loaded, no startup cost | β Plugin | N/A | No | β Plugin | β Plugin | Plugin | Plugin | Plugin | No | No |
| FZF integration | Ctrl-R, Ctrl-T, Alt-C β bound | β Plugin | N/A | No | Plugin | No | No | No | No | No | No |
| Clipboard | Paste, yank, history β 5 β widgets | No | No | No | No | No | No | No | No | No | No |
| Dir jumping | β zoxide frecency, replaces cd | β Plugin | N/A | No | Plugin | No | No | No | No | No | No |
| Git aliases | 50+ β aliases: gaa, gcm, gp, gstβ¦ | β Yes | N/A | β Yes | No | No | No | No | No | β Yes | Yes |
| Modern CLI | eza, bat, fd, rg β wired in | No | N/A | No | No | No | No | No | No | No | No |
AI & Intelligence
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| AI commit | βB: stage, diff, message, β push | No | No | No | No | No | No | No | No | No | No |
| AI debug | βE: captures stderr + context, β suggests fix | No | No | No | No | No | No | No | No | No | No |
| AI context | Exports full shell state β for LLM | No | No | No | No | No | No | No | No | No | No |
| Doc Assist Queue | β docgen parses headers β queues missing docs for AI fill | No | No | No | No | No | No | No | No | No | No |
| Auto Doc Website | β MkDocs site from your code + framework β Mermaid graphs, search | No | No | No | No | No | No | No | No | No | No |
| Debug Assist Queue | Coming soon β AI-triaged error queue from session logs | No | No | No | No | No | No | No | No | No | No |
| Test Fail Queue | Coming soon β failing tests auto-queued for AI diagnosis | No | No | No | No | No | No | No | No | No | No |
Safety, Observability & Documentation
| Feature | ZSHAND | OMZ | P10k | Prezto | Zinit | zimfw | Antigen | zplug | sheldon | bash-it | oh-my-bash |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Safe mode | Broken config? Boots clean, β tells why | No | No | No | No | No | No | No | No | No | No |
| Health check | health β one word, β full diagnostic | No | No | No | No | No | No | No | No | No | No |
| Telemetry | Per-command timing + β resource tracking | No | No | No | No | No | No | No | No | No | No |
| Secrets | Auto β chmod 600 on keys, tokens, env | No | No | No | No | No | No | No | No | No | No |
| Doc Frontend | MkDocs site with β 134 pages, search, Mermaid graphs β your code gets pages too | β README | β README | β README | β README | β README | README | README | β Docs | β README | README |
| Dependency graphs | Auto-generated β Mermaid graphs per file β who calls what | No | No | No | No | No | No | No | No | No | No |
| Update command | zupdate β pull, β recompile, verify | β Yes | N/A | Yes | β Yes | β Yes | No | No | No | β Yes | Yes |
π Startup PipelineΒΆ
~/.config/zshand/.-
Hook Into Any Stage
Your config directory When it runs Use case init.d/Before core modules Early env setup, PATH fixes, feature flags rc.d/Replaces or inserts into core Override 06_engine, add05_my_modulebetween stepspost.d/After everything Final tweaks, notifications, background tasks hooks/Inside 18_hooksAdd 05_myapp.zshbetween02_atuinand20_dockerwidgets/Inside 16_widgetsOverride or add new keyboard widgets functions/Inside 90_functionsOverride any framework function (highest priority) All directories live under
~/.config/zshand/. -
Key Startup Features
Feature What it does Perf budget Set ZSHAND_PERF_BUDGET=5β warns if any file takes > 5msStale .zwc check Detects when sources are newer than compiled bundles Background recompile auto_full = truerecompiles after first prompt, zero costDev mode dev_mode = trueskips bundles, loads raw source for hackingTOML config Parses config.tomlβZSHAND_*env vars, no shell syntaxTOML keybindings Remap any widget from keybindings.tomlHealth check Validates required tools are installed at startup Startup sentinel Logs completion, tracks failures, feeds Safe Mode
β¨οΈ Keyboard WidgetsΒΆ
~/.config/zshand/widgets/ β they get lazy-loaded automatically, no config needed. keybindings.toml. -
Inbound (Clipboard/Buffer)
Key Widget Action β P pastemSmart paste, strip fences β₯ P pasterawRaw paste, exact format β₯ H cliphClipboard history picker β₯ D pjumpProject jump via zoxide -
AI & Outbound
Key Widget Action β O bufcopyBuffer β clipboard β G cplastLast output β clipboard β E aidebugAI diagnose last error β B aicmitAI commit + push β K qlogTimestamped note -
Edit & Transform
Key Widget Action β J jtogJSON pretty β mini β X bufeditEdit buffer in $EDITOR β A aliexpExpand alias at cursor β₯ A aliasfFuzzy alias search β β sudotToggle sudo prefix -
Pickers & Search
Key Widget Action β₯ B bpickBinary picker via fzf β₯ F fpickFunction picker β₯ β΅ ctxpickContext: branch, file β₯ M manfMan page finder β₯ ? whelpKeybinding reference
π§ Core ModulesΒΆ
11 numbered modules loaded in strict order. Every module is overridable β drop NN_name.zsh in rc.d/ to replace or insert between any step. Each has a structured header and auto-generated docs.| Module | π― Why | βοΈ What | π§ How |
|---|---|---|---|
02 Variables | Every module needs a shared base | Sets XDG base dirs, log paths, cache root, and a machine-unique ID β all modules read from these | Auto β just works |
04 PATH | Stop $PATH growing into a mess | Builds a deduped, priority-ordered $PATH β Homebrew, cargo, go, pip, local bin, your path.txt | Edit path.txt |
06 Engine | Speed + full observability | Compiles .zsh β .zwc bytecode, records per-command timing telemetry, enforces file permissions | zr to recompile |
08 Audit | Know exactly when things break | Tracks load failures, logs health events, counts consecutive crashes β triggers Safe Mode automatically | health / zcheck |
10 Options | Sane defaults out of the box | Globbing, 50k history with dedup, fuzzy/partial/case-insensitive completion matching, safety options | Override in rc.d/ |
12 Completions | Tab should just work everywhere | Runs compinit, extends $fpath with your dirs, enables fuzzy matching and partial-word completion | Auto β add to fpath |
14 Aliases | Modern CLI tools everywhere | Maps lsβeza, catβbat, rmβtrash, git shortcuts, Docker aliases, pipe aliases β 50+ total | Yours always win |
16 Widgets | Keyboard-driven workflow | Registers 20+ ZLE widgets as lazy stubs β binds keys but defers loading until first keypress | keybindings.toml |
18 Hooks | Integrations without startup cost | Discovers and sources 10 numbered hooks β mise, Atuin, Docker, zoxide, git β all deferred by default | Drop .zsh in hooks/ |
20 Plugins | Use exactly what you want | Loads from plugins.txt whitelist β each plugin gets its own strategy (immediate/lazy/defer/disabled) | Edit plugins.txt |
90 Functions | Your code always wins | 3-tier autoload: user functions/ > private_functions/ > framework β drop a same-named file to override | Drop file in functions/ |
β±οΈ Configurable Loading StrategyΒΆ
plugins.txt to switch.| Strategy | When it loads | Cost | Best for |
|---|---|---|---|
| β‘ Immediate | Shell init, in numbered order | Full load time | Syntax highlighting, completions, prompt |
| π΄ Lazy | 1ms stub β compiles on first use | 10-20ms on first call | Commands you don't use every session |
| β³ Deferred | After first prompt renders | Zero perceived | Heavy integrations, hooks (default) |
| β Disabled | Never (commented out) | None | Temporarily disable without deleting |
| plugins.txt line | Why | Example | |
|---|---|---|---|
| β‘ | zsh-syntax-highlighting immediate | Must be ready for first keystroke | zsh-completions immediate |
| π΄ | zsh-autosuggestions lazy | Compiles on first use | my-custom-plugin lazy |
| β³ | heavy-integration defer | Loads after prompt renders | my-omz-plugin defer |
| β | # disabled-plugin | Commented = off, no deletion needed | # slow-plugin defer |
ZSHAND_NO_LAZY=1 forces everything immediate. Useful when a lazy or deferred plugin misbehaves β load it synchronously to see the real error. immediate in plugins.txt. Adds ~20-40ms to startup but everything is ready on the first keystroke. π Your ~/.config/zshandΒΆ
~/.config/zshand/. The framework never needs editing β updates pull cleanly because your config is separate.
| File / Directory | When | What it does for you | |
|---|---|---|---|
| βοΈ | config.toml | 1. Early init | Controls the entire framework without shell syntax β dev mode, perf budgets, quiet mode, auto-compile. Parsed into ZSHAND_* env vars before anything else loads. |
| π | env.zsh | 1. Early init | Your machine-specific environment β EDITOR, BROWSER, proxy settings, FZF_DEFAULT_OPTS. Auto-exported so child processes inherit everything. |
| π | secrets.zsh | 1. Early init | API keys & tokens loaded before any network-touching code. chmod 600 auto-enforced every startup β even if you accidentally loosen permissions. |
| οΏ½ | init.d/ | 2. Before core | Runs before any core module β use for early PATH fixes, feature flags, or env overrides that core modules depend on. |
| π€οΈ | path.txt | 3. PATH build | One path per line, no shell syntax. Deduped and priority-ordered β stops $PATH from growing into a mess across shell restarts. |
| π | bin/ | 3. PATH build | Your own CLI tools β automatically added to $PATH. Drop a script here and it's available everywhere. |
| π | rc.d/ | 4. Core load | Override or insert into the core pipeline β 05_foo.zsh loads between 04_path and 06_engine. Full control of ordering. |
| οΏ½ | aliases.zsh | 5. After core | Your aliases, loaded after framework aliases β yours always win. Override ll, gp, or any built-in alias. |
| π | hooks/ | 6. Hook load | Your tool integrations β numbered alongside framework hooks. Add 05_myapp.zsh to run between mise and Atuin. |
| οΏ½ | git-identity.conf | 6. Hook load | Persisted git name, email, signing key β survives reinstalls. The gitid hook reads this for multi-identity switching. |
| π | widgets/ | 7. Widget load | Your keyboard widgets β override built-ins or add new ones. Lazy-loaded automatically so they don't cost startup time. |
| β¨οΈ | keybindings.toml | 7. Widget load | Remap any widget keybinding in TOML β aicmit = "^G". No need to remember bindkey syntax or edit source. |
| π§© | plugins.txt | 8. Plugin load | Whitelist controls which plugins load and how β name strategy per line. Comment a line to disable without deleting. |
| π | plugins/ | 8. Plugin load | Your plugins β drop any .zsh file here and add to plugins.txt. Works with OMZ imports and native sources. |
| π | functions/ | 9. Func load | Highest priority autoload β drop a same-named file to override any framework function. No fork needed. |
| π | post.d/ | 10. After all | Runs after everything is loaded β final tweaks, notifications, background tasks, startup messages. |
-
config.toml
Controls quiet modes, debug flags, performance budgets, dev mode, and plugin strategies. All settings map to
ZSHAND_*environment variables β parsed by16_az_load_toml_config. No shell syntax needed. -
keybindings.toml
Remap any widget keybinding without touching framework code. Parsed by
17_az_bindkey_from_toml. Example:aicmit = "^B"to"^G". -
secrets.zsh
API keys, tokens, credentials. The engine enforces
chmod 600on every startup. Never committed. Coming soon: Doppler and Cloudflare Secrets integration for team/edge secret syncing. -
Config Templates
samples/user-config/ships ready-to-use templates.setup.zshcopies them on first install. Every directory has a README explaining the override pattern.
π§ Shell FunctionsΒΆ
31 functions with 3-tier priority: ~/.config/zshand/functions/ (yours) > private_functions/ > functions/ (framework). Override any function by dropping a same-named file.-
Health & Diagnostics
Function What it does healthFull system check: engine, tools, SSH, git, clipboard, disk ztopLive framework status dashboard zpathPATH audit: duplicates, broken, missing entries pathfixAuto-heal PATH: dedup + remove dead entries zportsList processes using network ports -
Productivity & Git
Function What it does extractUniversal archive extractor (tar, zip, 7z, rar, etc.) seekRecursive content search with ripgrep gitpruneClean up merged/stale remote branches gundoUndo last git commit safely tosshConvert HTTPS remotes to SSH -
Logging & Analytics
Function What it does logstat30-day command analytics: success rate, top commands bootlogView/tail shell init logs zlogSession log viewer: summary, tail, search zwidgetsList all loaded widgets with bindings zhelpSearchable help for all framework commands -
Framework Internals (also available to your scripts)
Function What it does gum_ioBeautiful gum TUI helpers clipboard_copyCross-platform clipboard write clipboard_pasteCross-platform clipboard read time_millisPrecision timing (auto-detects fastest timer) zrunTelemetry-wrapped command execution
π Hooks & PluginsΒΆ
-
Hooks: Numbered, Deferred, Configurable
10 framework hooks loaded by
18_hooksin numeric order. Each runs deferred after first prompt by default β configurable to immediate, lazy, or disabled. Add yours in~/.config/zshand/hooks/with any number for ordering.Hook Integration What it does 01_misemise Polyglot runtimes: Node, Python, Go, Rust, Bun, pnpm 02_atuinAtuin Encrypted cross-machine shell history sync 05_ssh-agentssh-agent Auto-start agent, add keys, forwarding 20_dockerDocker Completions, aliases ( dps,dclean), context switching30_zoxidezoxide Smart cdwith frecency-based directory jumping40_wranglerWrangler Cloudflare Workers/Pages CLI completions 50_gitidGit Multi-identity SSH/GPG switching per repo 80_archcleanFilesystem Auto-cleanup old archives and temp files 81_wlcleanWayland Clipboard sanitization and leak prevention -
Plugins: Whitelist + OMZ Compatible
Controlled via
~/.config/zshand/plugins.txtβ whitelist mode, not load-everything. Each plugin gets its own load strategy (immediate / lazy / defer).Plugin Strategy What it does zsh-syntax-highlightingimmediate Real-time command coloring zsh-autosuggestionslazy Ghost-text suggestions from history zsh-completionsimmediate 1000+ extra completions Your OMZ plugins any Import with import-ohmyzsh-pluginsAny .zshsourceany Drop in plugins/and add toplugins.txtβ no wrapper needed
βοΈ Hooks vs PluginsΒΆ
| πͺ Hooks | π§© Plugins | |
|---|---|---|
| π When | Shell init, numbered order β deferred after first prompt by default | On demand β each plugin chooses: immediate, lazy, or defer |
| π― Purpose | Tool integrations that configure environment: PATH entries, env vars, completions, daemon startup | Standalone feature bundles: syntax highlighting, autosuggestions, OMZ compatibility, custom functionality |
| π Location | ~/.config/zshand/hooks/ | ~/.config/zshand/plugins/ + plugins.txt |
| βοΈ Control | Numbered filenames (05_myapp.zsh) β ordering by prefix, runs between framework hooks | Whitelist in plugins.txt β each line: name strategy. Comment to disable, no deletion needed |
| π Examples | mise (runtimes), Atuin (history), Docker (completions), zoxide (cd), git identity (SSH/GPG) | zsh-syntax-highlighting, zsh-autosuggestions, zsh-completions, imported OMZ plugins, any .zsh file |
| β Add new | Drop numbered .zsh file in hooks dir β immediately part of the pipeline | Drop .zsh in plugins dir, add name strategy to plugins.txt β or import from OMZ |
π οΈ CLI Tools (bin/)ΒΆ
45 CLI tools in bin/, all added to PATH. Add your own in ~/.config/zshand/bin/.| Category | Tool | What it does |
|---|---|---|
| π§ Build | zr | Recompile everything in ~1s β run after any edit to framework or config files |
| π§ Build | zfull | Compile framework + your hooks, widgets, functions, env, secrets into one .zwc bundle (~3s) |
| π§ Build | zupdate | Full maintenance: git pull β recompile β update plugins β verify health β restart β one command |
| π€ AI | aicontext | Export your entire project context (tree, git state, deps, env) as a structured manifest for Cursor, Windsurf, or Claude |
| π€ Dev | scaffold | Generate new widgets, functions, hooks, or bin tools from templates β with headers, tests, and docs pre-filled |
| οΏ½ Profile | zprofile | Build an instrumented bundle, launch a profiled shell, and get a ranked report of your slowest files |
| π§ Nav | zd | Jump to any directory by partial name β 2-char shortcut powered by zoxide frecency |
| π§ Nav | ze | Open any file in $EDITOR with fuzzy path completion β 2-char shortcut, no full paths needed |
| οΏ½ Import | import-ohmyzsh-plugins | Clone OMZ, pick the plugins you want, copy them to your config β they work with ZSHAND's loader immediately |
| οΏ½ Import | import-p10k-theme | Bring your existing P10k config β it gets compiled into the bytecode bundle for zero-cost loading |
| οΏ½ Docs | docgen | Parse HEADER_STANDARD from every source file and generate full Markdown doc pages with Mermaid graphs |
| π₯οΈ System | pcopy | Copy files with a live progress bar, ETA, and transfer speed β replaces bare cp for large files |
| π₯οΈ System | persync | Persistent rsync that auto-retries on failure, resumes where it left off, and respects bandwidth limits |
π‘ Telemetry & ObservabilityΒΆ
# Builds an instrumented .zwc bundle that wraps every file and directory
# load with precision timing. Launches a profiled shell, captures data,
# and generates a ranked performance report.
zprofile # build instrumented bundle + run profiled shell
zprofile --report # show last report (no restart)
zprofile --full # include widgets + hooks profiling
zprofile --rebuild # force rebuild of profile bundle
zprofile --all # show all items, not just top 5
zcheck # last command: exit code, duration, stderr
logstat # 30-day analytics: top commands, fail rate, patterns
logstat --top 20 # show top 20 most-used commands
zlog summary # session overview: events, errors, timing
zlog tail 20 # last 20 session events with timestamps
zlog search "fail" # grep session logs for patterns
bootlog # per-module startup timing breakdown
π» Aliases & Modern CLIΒΆ
Modern ReplacementsΒΆ
14_aliases.| Classic | Modern | What you get | Aliases |
|---|---|---|---|
ls | eza | See git status, file icons, and tree view in every listing β know what changed at a glance | ll, lt, la |
cat | bat | Syntax-highlighted output with line numbers and git diff markers β reading code in terminal finally works | cat β bat |
find | fd | 10Γ faster, auto-ignores .gitignore and hidden files β no more find . -name '*.js' -not -path './node_modules/*' | find β fd |
grep | rg | Smart-case search that skips binaries and respects .gitignore β instant results in huge repos | G pipe alias |
top | btop | Beautiful TUI with CPU, RAM, disk, network graphs β see exactly what's eating resources | top β btop |
man | tldr | Practical examples instead of walls of text β learn a command in 10 seconds, not 10 minutes | help |
diff | delta | Side-by-side diffs with syntax highlighting and line numbers β Git uses it automatically | Git auto-uses |
cd | zoxide | Type z proj to jump to ~/code/my-project β learns from your habits, gets smarter over time | z, zi |
du | dust | Visual disk usage tree sorted by size β instantly find what's filling your drive | du β dust |
ps | procs | Colorized, searchable process list with tree view β find and kill processes without ps aux | grep | ps β procs |
curl | curlie | Curl with httpie-style colored, formatted output β see headers and JSON beautifully | curl β curlie |
Alias LayersΒΆ
| Category | Layer 1 β Framework | Layer 2 β User |
|---|---|---|
| π Source | 14_aliases.zsh β loaded as core module #14, defines 50+ aliases across all categories | ~/.config/zshand/aliases.zsh β your personal overrides, loaded after all core modules |
| π When | Core module load (step 14 of 16) β after PATH, engine, plugins | After all core modules β guaranteed to override anything in Layer 1 |
| π§ Navigation | .., ..., ...., ~, - (previous dir) | Your shortcuts, e.g. alias proj='cd ~/projects' |
| π Git | gaa, gcm, gp, gco, gst, gl, gd, gb | e.g. alias gp='git push --force-with-lease' |
| π³ Docker | dps, dclean, dlog, dexec, dstop | e.g. alias dps='docker ps --format table' |
| π Pipelines | L (less), G (grep), JQ (jq), H (head) | e.g. alias Y='| yq', alias C='| wc -l' |
| π‘οΈ Safety | cp -i, mv -i, rm -i β interactive prompts prevent accidents | e.g. alias rm='rm -rf' (brave mode) |
| β‘ Priority | Base β always present, never changes | Wins β overrides any framework alias |
π¦ Compile & Build SystemΒΆ
.zwc bytecode ~5Γ faster than raw source. Most shell frameworks load raw .zsh files on every startup. ZSHAND compiles everything into bytecode β your shell loads one pre-compiled bundle instead of parsing 100+ files.zr (1s quick recompile) to zfull (framework + your config in one bundle). Run zr after any edit, zfresh for a clean slate, zprofile to find what's slow. auto_full = true in config.toml and forget manual compiles. Detects stale bundles, recompiles after first prompt β zero perceived cost. All your files merged into one .zwc. ZSHAND_PERF_BUDGET=5 to warn if any file takes >5ms. zprofile builds an instrumented bundle and ranks your slowest files. ZSHAND_DEBUG=1 for inline timing. Bytecode CompilationΒΆ
| Tool | What it compiles | Speed | Result | When to use |
|---|---|---|---|---|
| zr | Framework sources | ~1s | Per-dir .zwc | After editing any file |
| zmono | All β single .zwc | ~2s | One portable bundle | Deployment |
| zfull | Framework + your config | ~3s | Complete bundle | Include user config |
| zprime | Per-directory bundles | Auto | Per-dir .zwc | Runs automatically |
| zfresh | Clean rebuild + restart | ~4s | Fresh shell | Something broken |
| zrebuild | Syntax-validated rebuild | ~5s | Validated bundle | CI / deploy |
| zprofile | Instrumented profiling | ~3s | Timing report | Find slow files |
π Secrets & SecurityΒΆ
chmod 600 by the engine on every startup. Never committed to git. Coming soon: Doppler + Cloudflare Secrets integration.π Documentation & GuidesΒΆ
| π Architecture & Internals | π€ User Guide | π οΈ Developer |
|---|---|---|
| Architecture β 5-layer design, overrides Core Modules β 11 numbered modules Startup Pipeline β P10k to sentinel Auto-Full Mode β auto user-config compile Performance β profiling, perf budgets Build System β .zwc compilation, just | Configuration β config.toml, keybindingsFunctions β 3-tier priority, autoloading Widgets β 20+ keyboard shortcuts Hooks β tool integrations, ordering CLI Tools β 45 commands Safe Mode β auto-recovery Troubleshooting β common fixes | Contributing β PR workflow, standards Style Guide β naming, headers Testing β ShellSpec, CI Security β secrets, Trunk, scanning Shared Functions β 18 internals Private Functions β framework helpers |
ποΈ Installer & SetupΒΆ
cloner.sh β One-Line Install
bash <(curl -fsSL https://raw.githubusercontent.com/presempathy/zshand/main/cloner.sh) | Step | What happens |
|---|---|
| 1. OS detection | Debian, Manjaro, macOS, WSL auto-detected |
| 2. Prerequisites | Installs gum for beautiful TUI |
| 3. SSH keys | Generates ED25519 keys + GPG signing |
| 4. Git identity | Name, email, signing key β persisted across reinstalls |
| 5. Clone | SSH preferred, HTTPS fallback |
| 6. Shell profiles | Writes .zshrc, .zshenv, .zprofile |
| 7. Packages | Installs 70+ modern CLI tools |
| 8. Compile | Builds .zwc bytecode bundle |
--dry-run, --non-interactive, --update, --uninstall. Compiled single-file via just cloner.OS Packages (70+)
| Category | Why | Tools |
|---|---|---|
| File mgmt | See files with color, git status, icons β instantly | eza, bat, fd, ripgrep, trash-cli |
| Navigation | Jump anywhere by frecency, fuzzy-find everything | fzf, zoxide, tree |
| Git | TUI git, beautiful diffs, PR management from terminal | lazygit, delta, gh |
| System | Monitor CPU/RAM/disk with beautiful TUIs | btop, dust, duf, procs |
| Dev | Polyglot runtimes, fast Python, task runner, JSON | mise, uv, just, jq |
| Network | Pretty curl, DNS lookup, visual ping | curlie, dog, gping |
| Security | Catch leaked secrets and bad shell code before commit | gitleaks, shellcheck, shfmt |
cloner.sh --update anytime to pick up new packages. pkgsync verifies everything is installed β pkgsync --fix installs anything missing.π³ DevContainer & CIΒΆ
main and let GitHub Actions handle testing, linting, and deployment.| Area | DevContainer | CI / CD Pipeline | Config |
|---|---|---|---|
| ποΈ Platform | VS Code, Codespaces, devcontainer CLI | GitHub Actions on push to main | .devcontainer/ |
| π Shell | Zsh + full framework pre-compiled | ShellSpec tests (Ubuntu + macOS) | spec/ test suite |
| π Linting | ShellCheck, shfmt, Trunk, ShellSpec | Trunk: ShellCheck, shfmt, gitleaks | .trunk/ |
| π Docs | MkDocs preview on port 8000 | MkDocs build + Mike versioning | just docs-* |
| π Deploy | zfresh rebuilds in container | Cloudflare Pages deploy | .github/workflows/ |
| π° Cost | Free (local or Codespaces) | Free (GitHub Actions) | Timeout guards built in |
