diff --git a/README.md b/README.md index dfbcb9b..3611ad0 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ poetry run gt app new --directory ~/workplace demo_app Test an App locally: ```shell -poetry run gt app run --directory ~/workplace/demo_app --arg "what is griptape?" +poetry run gt app run --directory ~/workplace/demo_app --arg "what is griptape?" --init-param "key" "value" ``` Create an App on the Cloud: diff --git a/griptape/cli/commands/app.py b/griptape/cli/commands/app.py index f9acabb..0a2f47e 100644 --- a/griptape/cli/commands/app.py +++ b/griptape/cli/commands/app.py @@ -63,7 +63,6 @@ def new(name: str, package_manager: str, directory: str, griptape_version: str) multiple=True, help="Initialization parameters for the app in the format 'key value'.", required=False, - ) @click.option( "--directory", @@ -73,7 +72,9 @@ def new(name: str, package_manager: str, directory: str, griptape_version: str) default=os.getcwd(), show_default=True, ) -def run(arg: list[str], init_params: list[tuple[str,str]], directory: str) -> TextArtifact: +def run( + arg: list[str], init_params: list[tuple[str, str]], directory: str +) -> TextArtifact: """ Run a Griptape app. """ @@ -81,5 +82,7 @@ def run(arg: list[str], init_params: list[tuple[str,str]], directory: str) -> Te echo(f"Running app") params = {k: v for k, v in init_params} - structure_runner = StructureRunner(args=arg, init_params=params, app_directory=directory) + structure_runner = StructureRunner( + args=arg, init_params=params, app_directory=directory + ) structure_runner.run() diff --git a/griptape/cli/core/structure_runner.py b/griptape/cli/core/structure_runner.py index aef5bb9..cc455e0 100644 --- a/griptape/cli/core/structure_runner.py +++ b/griptape/cli/core/structure_runner.py @@ -9,7 +9,7 @@ @define class StructureRunner: args: list[str] = field(kw_only=True) - init_params: Optional[dict[str,str]] = field( + init_params: Optional[dict[str, str]] = field( kw_only=True, default=Factory(lambda: dict()) ) app_directory: Optional[str] = field(