-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcli.py
More file actions
50 lines (38 loc) · 1.08 KB
/
cli.py
File metadata and controls
50 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import typer
from .commands.deploy import deploy
from .commands.env import env_app
from .commands.link import link
from .commands.login import login
from .commands.logout import logout
from .commands.logs import logs
from .commands.setup_ci import setup_ci
from .commands.unlink import unlink
from .commands.whoami import whoami
from .logging import setup_logging
from .utils.sentry import init_sentry
setup_logging()
app = typer.Typer(rich_markup_mode="rich")
cloud_app = typer.Typer(
rich_markup_mode="rich",
help="Manage [bold]FastAPI[/bold] Cloud deployments. 🚀",
no_args_is_help=True,
)
# TODO: use the app structure
# Additional commands
# fastapi cloud [command]
cloud_app.command()(deploy)
cloud_app.command()(link)
cloud_app.command()(login)
cloud_app.command()(logs)
cloud_app.command()(logout)
cloud_app.command()(whoami)
cloud_app.command()(unlink)
cloud_app.command()(setup_ci)
cloud_app.add_typer(env_app, name="env")
# fastapi [command]
app.command()(deploy)
app.command()(login)
app.add_typer(cloud_app, name="cloud")
def main() -> None:
init_sentry()
app()