Skip to content

Commit fa05e8a

Browse files
authored
Merge branch 'main' into login-and-token-2
2 parents 7cfde6d + c0a5690 commit fa05e8a

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Latest Changes
44

5+
### Features
6+
7+
* ✨ Show help on `fastapi cloud` with no args. PR [#181](https://github.com/fastapilabs/fastapi-cloud-cli/pull/181) by [@buurro](https://github.com/buurro).
8+
59
## 0.16.1 (2026-04-08)
610

711
### Fixes

src/fastapi_cloud_cli/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
cloud_app = typer.Typer(
2020
rich_markup_mode="rich",
2121
help="Manage [bold]FastAPI[/bold] Cloud deployments. 🚀",
22+
no_args_is_help=True,
2223
)
2324

2425
# TODO: use the app structure

tests/test_cli.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
import subprocess
22
import sys
33

4+
from typer.testing import CliRunner
5+
6+
from fastapi_cloud_cli.cli import app
7+
8+
runner = CliRunner()
9+
10+
11+
def test_shows_help() -> None:
12+
result = runner.invoke(app, ["cloud", "--help"])
13+
14+
assert result.exit_code == 0
15+
assert "Usage:" in result.output
16+
17+
18+
def test_shows_help_without_args() -> None:
19+
result = runner.invoke(app, ["cloud"])
20+
21+
assert result.exit_code == 2
22+
assert "Usage:" in result.output
23+
424

525
def test_script() -> None:
626
result = subprocess.run(

0 commit comments

Comments
 (0)