Immunity
Immunity is an ultra-fast, ahead-of-time (AOT) compiled Zsh plugin manager written in Python.
It combines Python's rich concurrency ecosystem (asyncio) for parallel cloning, updates, and lock resolution with zero shell startup overhead. Instead of executing Python each time an interactive shell launches, Immunity compiles your plugins into a single, clean static .zsh script sourced directly by your shell at raw filesystem I/O speeds.
Key Features
- Ahead-of-Time (AOT) Compilation: 0ms Python startup penalty during shell load. Sourcing a compiled
.zshfile takes < 2ms. - Concurrent Git Operations: Parallel shallow cloning and rebase pulls via
asyncio. - Standards Compliant: Full support for Zsh plugin standards (
.plugin.zsh,init.zsh, themes, autoload/completions directories). - Deterministic Lockfiles: Generates
plugins.lock.jsonrecording commit SHAs for 100% reproducible shell setups across machines. - Zero Runtime Dependencies: Written entirely with Python's standard library. No third-party packages required.
- Flexible Directives: Supports branch/tag pinning (
@v1.0.0), subpaths (path:subdir), deferral (defer:2), custom entrypoints (pick:init.zsh), and completions (kind:fpath).
Quickstart
1. Installation
Install via pip or uv:
uv tool install immunity
# or
pip install --user immunity
2. Define Plugins (~/.zsh_plugins.txt)
Create ~/.zsh_plugins.txt with your desired plugins:
# Syntax highlighting & suggestions
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-history-substring-search
# Prompts & Themes
romkatv/powerlevel10k@v1.20.0
# Completions
zsh-users/zsh-completions kind:fpath
3. Compile
Run the Immunity compiler:
immunity compile
This concurrently fetches any missing plugins, indexes completions into fpath, discovers entrypoint scripts, and outputs ~/.zsh_plugins.zsh along with ~/.zsh_plugins.lock.json.
4. Wire up .zshrc
Add the following to your ~/.zshrc:
# Source statically compiled plugins if present
if [[ -f ~/.zsh_plugins.zsh ]]; then
source ~/.zsh_plugins.zsh
fi
# Initialize completions after fpath has been configured
autoload -Uz compinit && compinit
# Alias for easy recompilation
alias immunity-update="immunity compile"
You can also run immunity init to generate this template automatically.
Command Reference
| Command | Description |
|---|---|
immunity compile |
Compile configured plugins into static .zsh file and lockfile. |
immunity update |
Pull latest updates for all plugins and recompile static file. |
immunity bundle <repos...> |
Ad-hoc compilation of plugins passed as arguments or via stdin. |
immunity lock |
Generate or refresh plugins.lock.json with commit SHAs. |
immunity clean |
Remove cached plugins no longer referenced in your specification. |
immunity init |
Print shell integration snippet for ~/.zshrc. |
Directives & Syntax
In your plugins file:
# Shorthand GitHub repo
zsh-users/zsh-autosuggestions
# Pin specific branch or tag
romkatv/powerlevel10k@v1.20.0
# Subdirectory inside repository
ohmyzsh/ohmyzsh path:plugins/git
# Add to fpath without sourcing an init script
zsh-users/zsh-completions kind:fpath
# Explicit entrypoint file
zsh-users/zsh-history-substring-search pick:zsh-history-substring-search.zsh
# Deferred loading with zsh-defer
zsh-users/zsh-syntax-highlighting defer:2
Documentation
Full documentation is available in the docs/ folder:
- Architecture & Overview
- Installation Guide
- CLI Reference
- Specification Format & Directives
- Zsh Integration Manual
License
MIT © Wispsy
Metadata
Release files for immunity 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| immunity-0.1.0.tar.gz | 12.8 kB | With provenance | Details for immunity-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| immunity-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for immunity-0.1.0-py3-none-any.whl |
Total release size: 29.0 kB
Release files / immunity-0.1.0.tar.gz
| Download URL | immunity-0.1.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95360706901e78ea753862b5edb3aa6aea3d1aae2e6f533c0c5d3817bc68e53d
|
|
BLAKE2b-256 checksum How to use checksums |
b730b2c43f82d871fe23381fbbfb00eca70c90dacf5a9515ae0bf227153bfaf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logRelease files / immunity-0.1.0-py3-none-any.whl
| Download URL | immunity-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b60c69c44eb03e63f146507fa9d197d7e9b1617f73eff8d27e38930ef02da26a
|
|
BLAKE2b-256 checksum How to use checksums |
bf649af2493381f5de62e1ff8885fad68e8c98e8905ec9eb5bc1b4c20c07efd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logSecurity for immunity 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for immunity-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.