Your new jeeves-super-plugin
- Create a Python 3.10+ virtual env for your new plugin project
pip install -U pip poetrypoetry initpoetry add jeeves-shell --extras=all- Write into
pyproject.toml:
[tool.poetry.plugins.jeeves]
super-plugin = "jeeves_super_plugin:app"
- Create your Typer instance:
jeeves_super_plugin/__init__.py
import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def hi(name: str):
"""Greet the user."""
@app.command()
def bye():
"""Bid farewell."""
poetry installj super-plugin
You should see hi and bye as available commands.
Special plugin name: __root__
[tool.poetry.plugins.jeeves]
__root__ = "jeeves_super_plugin:app"
This will mean that your plugin replaces the default root Jeeves app, and your commands will be available as
j hiinstead ofj super-plugin hij byeinstead ofj super-plugin bye.
This is useful for plugins like jeeves-yeti-pyproject, to make the commands you very often use, like lint, faster to type.