pzsh
Performance-first shell framework with sub-10ms startup. Like oh-my-zsh, but 50-200x faster.
Core Invariant
No shell startup shall exceed 10ms. This is not a goal—it is a hard constraint enforced at compile time, test time, and runtime.
Performance
$ pzsh bench
Startup Benchmark (100 iterations)
────────────────────────────────
min: 0.030ms
max: 0.051ms
mean: 0.032ms
p99: 0.051ms
────────────────────────────────
Budget: 10ms ✓ (p99 < 10ms)
| Framework | Startup | vs pzsh |
|---|---|---|
| pzsh | <1ms | 1x |
| bare zsh | 5-10ms | 10x |
| zinit | 100-300ms | 300x |
| prezto | 200-500ms | 500x |
| oh-my-zsh | 500-2000ms | 2000x |
Installation
Usage
# Initialize configuration
# Benchmark startup time
# Lint for slow patterns
# Profile startup breakdown
# Compile configuration
Configuration
# ~/.pzshrc
[]
= "0.1.0"
= "zsh"
[]
= 10
= true
[]
= "ls -la"
= "git status"
[]
= "vim"
= "/usr/local/opt/go/libexec" # Pre-resolved, no $(brew ...)
Forbidden Patterns
pzsh enforces O(1) startup by rejecting slow patterns:
# FORBIDDEN: subprocess calls at startup
# 50-100ms per call
# ALLOWED: pre-resolved paths
# 0ms
# FORBIDDEN: oh-my-zsh, NVM, conda init
Architecture
- Parser: O(1) with LRU caching, 2ms budget
- Executor: O(1) hash lookups, 2ms budget
- Prompt: Async git status, 2ms budget
- Config: Pre-compiled TOML, no runtime parsing
Testing
Built With
Toyota Way
Development follows the Toyota Production System:
- Stop the line on defects (Andon)
- Continuous improvement (Kaizen)
- Go and see for yourself (Genchi Genbutsu)
License
MIT