Built-in CLI Commands¶
Sayer comes with built-in CLI commands that support:
- ๐ฆ Project scaffolding (
new
) - ๐ Automatic documentation generation (
docs generate
)
These are registered automatically and available immediately after installation.
๐ sayer new
โ Project Generator¶
The sayer new
command scaffolds a complete new Sayer CLI application in seconds.
It sets up:
main.py
bootstrapcommands/
folder with a working commandpyproject.toml
withsayer
dependency.gitignore
and README
โ Usage¶
sayer new my-cli
Creates a structure like:
my-cli/
โโโ main.py
โโโ pyproject.toml
โโโ .gitignore
โโโ README.md
โโโ commands/
โโโ __init__.py
โโโ hello.py
๐ Command Reference¶
sayer new --help
Usage: sayer new <name>
Create a new Sayer CLI project in <name> directory.
You can immediately test it:
cd my-cli
python main.py hello --name Sayer
๐ sayer docs generate
โ Docs Generator¶
Generates Markdown documentation for all commands and subcommands in your CLI app.
โ Usage¶
sayer docs generate
Or set a custom output directory:
sayer docs generate --output ./my-docs/
๐งพ What It Does¶
- Builds a
README.md
with command list - Generates one
.md
file per command and subcommand - Outputs to
docs/
by default (compatible with MkDocs!)
๐งช Example¶
docs/
โโโ README.md
โโโ commands/
โโโ hello.md
โโโ users-create.md
โโโ users-delete.md
๐งฐ Recap¶
Command | Description |
---|---|
sayer new |
Scaffold a new CLI project |
sayer docs generate |
Generate Markdown docs for all commands |
Sayer's built-in commands are here to help you bootstrap and document faster.
๐ See also: Testing, Encoders
```