Skip to content

Commit f16db03

Browse files
committed
Add README
1 parent 34c044c commit f16db03

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Minimal command-line interface plugin for [minimal-pba-cli](https://github.com/easy-as-python/minimal-pba-cli)
2+
3+
This is a minimal example of a plugin that can be discovered, installed, and used in a command-line interface using a plugin-based architecture.
4+
5+
## Key moving parts
6+
7+
The main components of a working plugin are:
8+
9+
- The distribution name: Plugins must have a distribution name with a known prefix (in the case of this project, `minimal-pba-cli-plugin-`).
10+
- `[project.entry-points.minimal_pba_cli]`: This section must exist in `pyproject.toml` and must contain one key-value pair,
11+
where the key is the "proper" name of the plugin (without the distribution name prefix)
12+
and the value is the dotted module path of the plugin's main entry point
13+
- The plugin entry point: This module must contain either or both of `groups` and `commands`.
14+
Each of these is a dictionary whose keys are the name of the command or command group that the plugin will provide to the core CLI,
15+
and whose values are the [Typer](https://typer.tiangolo.com/) command group objects or command objects, respectively, to execute.

0 commit comments

Comments
 (0)