Zush is a CLI framework for building nested CLI applications.
Project description
zush
zush is a Python CLI framework for discovering and serving nested command trees from plugin packages.
It gives you one CLI entry point that can load commands from multiple environments without hard-coding every command into one application.
What zush does
- Discovers plugin packages from configured directories or site-packages.
- Exposes plugin commands as nested Click subcommands.
- Provides built-in self commands for inspection and operations.
- Supports plugin hooks, persisted plugin state, runtime providers, services, and cron scheduling.
- Can run standalone or be embedded inside another Click app.
Current capabilities
zush currently provides:
- local extension discovery from configured env roots and optional current site-packages
- ordered discovery-provider selection for local source layouts
- plugin loading from package-local zush.py
- extension enable or disable control through disabled_extensions and self toggle
- boot-time diagnostics through self diagnostics
- controlled self command registration for plugins and host apps
- built-in cron scheduling with reusable registrations, lifejobs, and simulated runtime controls
- detached service management and runtime provider integration
zush is not a package manager. Remote registry lookup, GitHub-based installation, update policy, and install metadata are better implemented in a separate extension-management package.
See docs/extension-management.md for that architecture.
Requirements
- Python 3.12+
- Click 8+
Installation
From repository source:
uv sync
uv run zush --help
Or install as a package and run the zush console entry point.
Quick start
Show the active command tree:
zush self map
Open the active zush config directory:
zush self config
Show discovery and registration diagnostics:
zush self diagnostics
Run a discovered plugin command:
zush <group> <command> ...
Use the bundled playground without touching your local config:
uv run zush --mock-path ./playground self map
uv run zush --mock-path ./playground demo greet
Documentation
Detailed guides now live in the docs folder:
- Configuration: docs/configuration.md
- Plugin authoring and helper API: docs/plugins.md
- Runtime globals and services: docs/runtime-and-services.md
- Cron scheduling and plugin cron sync: docs/cron.md
- Embedding zush in host apps: docs/embedding.md
- Extension-management architecture: docs/extension-management.md
Built-in self commands
The self group is reserved for zush core commands:
- self map
- self config
- self diagnostics
- self toggle
- self services
- self cron
Plugins may add controlled self commands through Plugin.system_command(...). Reserved built-in names above cannot be overridden.
Playground
The playground folder contains sample plugins for local testing and exploration.
See playground/README.md.
Development
Install dev dependencies and run tests:
uv sync --extra dev
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zush-0.6.0.tar.gz.
File metadata
- Download URL: zush-0.6.0.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2547985698319c76d78fc688ab9f087aab1a6b13aa8105a9b6f70a14becbb51
|
|
| MD5 |
ea5b247e5958410c6c0f12672bd5b05b
|
|
| BLAKE2b-256 |
3edfc676876e464933c600c0318be7eb52ca40c037d33f589eafb4e8c4252cda
|
Provenance
The following attestation bundles were made for zush-0.6.0.tar.gz:
Publisher:
publish.yml on ZackaryW/zush
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zush-0.6.0.tar.gz -
Subject digest:
b2547985698319c76d78fc688ab9f087aab1a6b13aa8105a9b6f70a14becbb51 - Sigstore transparency entry: 1355585307
- Sigstore integration time:
-
Permalink:
ZackaryW/zush@32e751e58a5aa03cb03e184999eb4fdd7b35493e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZackaryW
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32e751e58a5aa03cb03e184999eb4fdd7b35493e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file zush-0.6.0-py3-none-any.whl.
File metadata
- Download URL: zush-0.6.0-py3-none-any.whl
- Upload date:
- Size: 51.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d3ac488a73f8f26b5dc7f0bf134067a636ae82fe0108291a777bcf46286faaf
|
|
| MD5 |
fb6c8c5ac743de95d8bd0e243ebe53fd
|
|
| BLAKE2b-256 |
a6e4c746606bd06889d565b4ddd20473a024ed7c01510193898876dab0678362
|
Provenance
The following attestation bundles were made for zush-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on ZackaryW/zush
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zush-0.6.0-py3-none-any.whl -
Subject digest:
4d3ac488a73f8f26b5dc7f0bf134067a636ae82fe0108291a777bcf46286faaf - Sigstore transparency entry: 1355585312
- Sigstore integration time:
-
Permalink:
ZackaryW/zush@32e751e58a5aa03cb03e184999eb4fdd7b35493e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ZackaryW
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32e751e58a5aa03cb03e184999eb4fdd7b35493e -
Trigger Event:
workflow_dispatch
-
Statement type: