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
# hello.py
from genbu import Genbu
print(Genbu(lambda name: f"Hello, {name}!").run())
# Usage example: python hello.py --name "world"
See examples.