knoc-plugin-template/src/knoc_plugin_template/cli.py
phil 7c129cc81b
All checks were successful
/ build (push) Successful in 5s
Inital commit
2025-05-28 17:36:06 +02:00

24 lines
698 B
Python

from hatchet_sdk.runnables.types import EmptyModel
import typer
from knoc.settings import settings
from knoc_plugin_template.workflows import do_nothing_wf, SimpleOutput
app = typer.Typer(no_args_is_help=True)
@app.command()
def do_nothing():
"""A CLI command that does very litle"""
typer.echo("Just a template of a CLI command.")
typer.echo(
f"The plugin has a setting, which is: {settings.plugin_template.setting}."
)
@app.command()
def run_wf():
"""A CLI command that runs a workflow"""
typer.echo("Just a template of a CLI command that runs a workflow.")
typer.echo("Requesting the workflow to tun...")
typer.echo(do_nothing_wf.run(EmptyModel()))