Skip to content

Sayer

Sayer logo

Fast. Scalable. Elegant. Command the CLI like a boss. 🧙‍♂️

Test Suite Package version Supported Python versions


Documentation: https://sayer.dymmond.com 📚

Source Code: https://github.com/dymmond/sayer

The official supported version is always the latest released.


Sayer is an async-friendly, decorator-first framework for building Python CLIs with strong typing, middleware hooks, and rich help output.

Documentation Map

Why Sayer

  • Typed command parameters (Option, Argument, Env, JsonParam)
  • Sync and async command support
  • Middleware hooks (before and after)
  • State and context injection
  • Rich help and output integration

Quick Example

from sayer import Sayer, Option

app = Sayer(name="demo")


@app.command()
def hello(name: str = Option(..., help="Name to greet")):
    print(f"Hello, {name}!")


if __name__ == "__main__":
    app()

Run:

python app.py hello --name Ada
  1. Getting Started
  2. Tutorial 1: First CLI
  3. Architecture
  4. How-to: Add a Command