๐ง Contributing to Zi
Thank you for contributing to zi! This page covers the guidelines specific to the
z-shell/zi repository. For the org-wide basics
(branch model, commit format, PR checklist) see Getting Started.
Repository Overviewโ
Zi is a Zsh plugin manager written entirely in Zsh. The source lives in lib/zsh/
with the main entry point at lib/zsh/zi.zsh. The installer lives in
z-shell/zi-src.
zi/
lib/zsh/ โ core plugin manager source
docs/ โ repository-level docs (CONTRIBUTING.md, man page)
tests/ โ ZUnit test suite
.github/
workflows/ โ CI workflows (syntax check, ZUnit, CodeQL)
Setting Up Locallyโ
git clone https://github.com/<your-username>/zi.git
cd zi
git remote add upstream https://github.com/z-shell/zi.git
git checkout -b feat/my-change next
No build step is required โ zi is pure Zsh. To test changes interactively, source the modified files in a Zsh session:
zsh
source lib/zsh/zi.zsh
Running Testsโ
Zi uses ZUnit for tests:
# Run all tests
zunit
# Run a single test file
zunit tests/install.zunit
Tests live in tests/. Add or update tests when your change affects behavior.
Zi-Specific Commit Scopesโ
In addition to the standard commit types, prefer these scopes when relevant:
| Scope | Covers |
|---|---|
core | lib/zsh/zi.zsh and lib/zsh/zi-*.zsh |
install | installer scripts in zi-src |
ci | GitHub Actions workflows |
docs | repository-level documentation |
annex | annex API surface changes |
Examples:
fix(core): resolve fpath duplication on plugin reload
feat(annex): expose atdelete hook to external annexes
docs(ci): document workflow trigger conditions
What Not to Add to Ziโ
AGENTS.md,CLAUDE.md,GEMINI.md,.cursorrules, or any AI-specific config files- Secrets, credentials, or tokens of any kind
- Files unrelated to the plugin manager itself
Opening Issuesโ
Before starting significant work, open an issue to discuss the change. Use the appropriate issue template:
| Template | When to use |
|---|---|
| Bug report | Reproducible misbehavior |
| Feature request | New capability |
| Annex proposal | Proposing a new annex |
Release Processโ
Zi follows a trunk-based flow:
- All work merges into
next - When
nextis stable, a release PR mergesnextโmain - A tag is created on
main(e.g.,v1.14.0) โ this triggers the release workflow - The installer in
zi-srcis updated to point to the new tag
Maintainers handle the next โ main merge. As a contributor, you only need to
target next.
See Alsoโ
- Code of Conduct
- Getting Started โ org-wide branch and commit conventions
- Project Management โ how work is tracked across the org