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.1.tar.gz (35.4 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.1-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

Details for the file zush-0.6.1.tar.gz.

File metadata

  • Download URL: zush-0.6.1.tar.gz
  • Upload date:
  • Size: 35.4 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.1.tar.gz
Algorithm Hash digest
SHA256 8ba4e679b4bd3a844e9a15aca6631306308b0c4183fd77244a7002456ae2bb81
MD5 a338a9dba8cea2671ce77ac5e0b71951
BLAKE2b-256 e9c9d1cc2bfa46ba2fa6a548c11efbaa8455a50fcf81a3e5cf42290c5bb56116

See more details on using hashes here.

Provenance

The following attestation bundles were made for zush-0.6.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: zush-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 51.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c0dbbbff107bb80f4fefceb92a06765d21628f904b2cb7e2555edb1bf0e135c
MD5 097d599d75e11e8bce36cf3cb1903bec
BLAKE2b-256 afac9656d8d75ca903686e055ce69b75bc1fd5078d71ffa67b1a90c18f3cf349

See more details on using hashes here.

Provenance

The following attestation bundles were made for zush-0.6.1-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