Skip to content

Commit 9589c76

Browse files
committed
Make command "firefly image generate"
1 parent 05f2e3e commit 9589c76

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

firefly/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
app = typer.Typer()
1919

20+
image_app = typer.Typer()
21+
2022

2123
mock_image = "https://developer.adobe.com/firefly-services/docs/static/82044b6fe3cf44ec68c4872f784cd82d/96d48/cat-coding.webp"
2224

@@ -85,7 +87,7 @@ def download_image(image_url: str):
8587
typer.echo(f"Downloaded image ({size} bytes) to {filename}")
8688

8789

88-
@app.command()
90+
@image_app.command()
8991
def generate(
9092
client_id: str = typer.Option(
9193
None,
@@ -176,5 +178,8 @@ def capture_request(*args, **kwargs):
176178
typer.secho(f"[warn] Could not display image in terminal using imgcat: {e}", fg=typer.colors.YELLOW, err=True)
177179

178180

181+
app.add_typer(image_app, name="image")
182+
183+
179184
if __name__ == "__main__":
180185
app()

0 commit comments

Comments
 (0)