Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved CLI #64

Merged
merged 5 commits into from
Feb 7, 2025
Merged

Improved CLI #64

merged 5 commits into from
Feb 7, 2025

Conversation

mpangrazzi
Copy link
Contributor

The following provides:

  • We use now fastapi[standard] as a dep, so we also have FastAPI CLI and Typer.
  • CLI commands refactoring and rewrite using Typer instead of click (for nicer UX and easier to add CLI tests).
  • Exposed uvicorn's --reload and --workers to hayhooks run commands.

Now there are base CLI commands:

$ hayhooks run
$ hayhooks status

and pipeline CLI commands:

$ hayhooks pipeline deploy
$ hayhooks pipeline deploy-files 
$ hayhooks pipeline undeploy

Sample UX:

hayhooks-cli.mp4

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nice.
(I don't know Typer, so initially I struggled a bit to understand context and callbacks.)

Some questions:

  • this partially breaks the existing CLI, no?
  • (As other recent features and improvement, this would need comprehensive docs.) README needs to be updated as well. When will we do this? When we release a new version?

@mpangrazzi
Copy link
Contributor Author

@anakin87 thanks for reviewing!

this partially breaks the existing CLI, no?

Yes. Actually, I've simply moved pipeline-related ones under pipeline subcommand.

(As other recent features and improvement, this would need comprehensive docs.) README needs to be updated as well. When will we do this? When we release a new version?

Absolutely! I am updating docs now (also README of course), then I was thinking to do a release. WDYT?

@anakin87 anakin87 self-requested a review February 7, 2025 14:18
@mpangrazzi mpangrazzi merged commit 8aa18ca into main Feb 7, 2025
4 checks passed
@mpangrazzi mpangrazzi deleted the cli_rewrite branch February 7, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants