Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zush-0.6.0.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zush-0.6.0-py3-none-any.whl (51.1 kB view details)

Uploaded Python 3

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

Hashes for zush-0.6.0.tar.gz
Algorithm Hash digest
SHA256 b2547985698319c76d78fc688ab9f087aab1a6b13aa8105a9b6f70a14becbb51
MD5 ea5b247e5958410c6c0f12672bd5b05b
BLAKE2b-256 3edfc676876e464933c600c0318be7eb52ca40c037d33f589eafb4e8c4252cda

See more details on using hashes here.

Provenance

The following attestation bundles were made for zush-0.6.0.tar.gz:

Publisher: publish.yml on ZackaryW/zush

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for zush-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d3ac488a73f8f26b5dc7f0bf134067a636ae82fe0108291a777bcf46286faaf
MD5 fb6c8c5ac743de95d8bd0e243ebe53fd
BLAKE2b-256 a6e4c746606bd06889d565b4ddd20473a024ed7c01510193898876dab0678362

See more details on using hashes here.

Provenance

The following attestation bundles were made for zush-0.6.0-py3-none-any.whl:

Publisher: publish.yml on ZackaryW/zush

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page