cli module better

This commit is contained in:
2026-03-15 18:06:45 +03:00
parent 7ffc6cd987
commit a3d7630219
4 changed files with 74 additions and 67 deletions
+25 -6
View File
@@ -1,14 +1,33 @@
from typer import Typer
from .commands import run_handler, init_handler, new_handler
from .commands import init_handler, new_handler, run_handler
def main() -> None:
app = Typer()
app.command("run", help='Command to start the orchestrator repl; the path to the callable object is required')(run_handler)
app.command("init", help="Creates a flat/src boilerplate architecture in an existing project")(init_handler)
app.command("new", help="Creates a project and in it flat/src boilerplate architecture")(new_handler)
app.command(
"run",
help="Command to start the orchestrator repl; the path to the callable object is required",
short_help="Start the orchestrator REPL",
epilog="Example: run app/main.py:main",
)(run_handler)
app.command(
"init",
help="Creates a flat/src boilerplate architecture in an existing project",
short_help="Initialize architecture in existing project",
epilog="Make sure you are in the project root before running this command.",
)(init_handler)
app.command(
"new",
help="Creates a project and in it flat/src boilerplate architecture",
short_help="Create a new project with boilerplate",
epilog="This will create a new directory with the project structure.",
)(new_handler)
app()
if __name__ == '__main__':
main()
if __name__ == "__main__":
main()