Skip to content

Commit

Permalink
readme, formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vachillo committed Dec 15, 2023
1 parent e6937dd commit f837577
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 6 additions & 3 deletions griptape/cli/commands/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -73,13 +72,17 @@ 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.
"""

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()
2 changes: 1 addition & 1 deletion griptape/cli/core/structure_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f837577

Please sign in to comment.