cli.py 610 B

12345678910111213141516171819202122232425262728293031
  1. import typer
  2. from .commands.deploy import deploy
  3. from .commands.env import env_app
  4. from .commands.login import login
  5. from .commands.logout import logout
  6. from .commands.unlink import unlink
  7. from .commands.whoami import whoami
  8. from .logging import setup_logging
  9. from .utils.sentry import init_sentry
  10. setup_logging()
  11. app = typer.Typer(rich_markup_mode="rich")
  12. # TODO: use the app structure
  13. # Additional commands
  14. app.command()(deploy)
  15. app.command()(login)
  16. app.command()(logout)
  17. app.command()(whoami)
  18. app.command()(unlink)
  19. app.add_typer(env_app, name="env")
  20. def main() -> None:
  21. init_sentry()
  22. app()