Skip to main content

Create CLIs using parser combinators and type hints

Project description


GitHub Workflow Status PyPI PyPI - Python Version GitHub

Genbu is a library for creating composable command-line interfaces.


  • Infer shell arguments parser from type hints.
  • Override inferred parsers using shell parser combinators.
  • Compose command-line interfaces declaratively (subcommands).
  • Dispatch automatically to the appropriate command callback.
  • Generate usage messages by using genbu.usage.


pip install genbu


from genbu import Genbu

print(Genbu(lambda name: f"Hello, {name}!").run())
# Usage example: python --name "world"

See examples.



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

genbu-0.2.1.tar.gz (21.0 kB view hashes)

Uploaded Source

Built Distribution

genbu-0.2.1-py3-none-any.whl (25.5 kB view hashes)

Uploaded Python 3

Supported by

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