Plugins Feature Guide¶
This guide explains how to extend Sayer using plugin entry points.
Overview¶
Sayer loads plugins from Python entry points in the sayer.commands group. Each plugin provides a registration callable that adds commands to the runtime.
Plugin Flow¶
flowchart TD
EntryPoints[Python entry points] --> Loader[load_plugins]
Loader --> Register[register_func callable]
Register --> Commands[Commands registered in runtime]
Create a Plugin¶
- Define entry point:
- Implement registration callable:
- Install and run your CLI.
Best Practices¶
- Keep registration lightweight.
- Avoid side effects in import paths.
- Treat plugin load errors as recoverable.