-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a --args-file
flag to kurtosis run
#1112
Comments
Extra reason we might want to do this: now that we have typehint comments in Starlark, we can actually allow users to treat Starlark packages like "CLIs", generating arguments. For example, let's say we had Starlark like so: def run(plan, image, optional_arg = "default"):
"""
Args:
image (string): The image that's needed
optional_arg (string): Some optional arg The GUI already uses this type-hinting information to generate a pretty form for users to fill in, and I'd like to do something similar in the CLI (so generating "args" and "flags" for the user). E.g.: kurtosis run github.com/the-user/the-package "some-new-image" --optional_arg "New value of optional arg" However, if we do this, we'll need to have a way for the user to say, "I have a JSON/YAML file, and each key of the root-level object is actually an argument" |
+1 to this |
Requested again by Barnabas this morning (pain: it's difficult and annoying to remember the syntax) |
Also @leeederek had 3 people ask about this at Protocolberg, because the |
Abhi from web3-labs asked for this on Discord, I am on it |
## Description: To make this change work with previous versions of Kurtosis the argument takes precedence over value provided by the flag; so if a user provides a non `{}` for input-args; and a value for flag as well, we will go with the value for the arg ## Is this change user facing? YES ## References (if applicable): Closes #1112
🤖 I have created a release *beep* *boop* --- ## [0.83.16](0.83.15...0.83.16) (2023-10-02) ### Features * add font ([#1454](#1454)) ([75ce332](75ce332)), closes [#1386](#1386) * added --args-file to Kurtosis run ([#1451](#1451)) ([fdc6220](fdc6220)), closes [#1112](#1112) ### Bug Fixes * Remove mouse wheel capture ([#1452](#1452)) ([2d35d77](2d35d77)), closes [#1438](#1438) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Anders Schwartz <adschwartz@users.noreply.github.com>
## Description: To make this change work with previous versions of Kurtosis the argument takes precedence over value provided by the flag; so if a user provides a non `{}` for input-args; and a value for flag as well, we will go with the value for the arg ## Is this change user facing? YES ## References (if applicable): Closes #1112
🤖 I have created a release *beep* *boop* --- ## [0.83.16](0.83.15...0.83.16) (2023-10-02) ### Features * add font ([#1454](#1454)) ([75ce332](75ce332)), closes [#1386](#1386) * added --args-file to Kurtosis run ([#1451](#1451)) ([fdc6220](fdc6220)), closes [#1112](#1112) ### Bug Fixes * Remove mouse wheel capture ([#1452](#1452)) ([2d35d77](2d35d77)), closes [#1438](#1438) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: Anders Schwartz <adschwartz@users.noreply.github.com>
Background & motivation
While reviewing the guidance around how to pass args to
run
from a file, I realized that the quoting/spaces thing is a hassle, especially for people unfamiliar with Bash. We can make this much easier for folks.Desired behaviour
We should add an
--args-file
option, so that the second argument tokurtosis run
can be interpreted as a file, and read in as args for the user (no escaping or"$(cat params.json)"
nonsense needed)How important is this to you?
Nice to have; this feature would make using Kurtosis more enjoyable.
The text was updated successfully, but these errors were encountered: