Support for keyworded arguments when running a Pack formula locally

Feature request for the ability to call a pack formula locally when running from the CLI, but supplying arguments to the formula as keyword:value pairs rather than only by position.

E.g. npx coda execute path/to/pack.ts <formula> [positionalParams...] keywordParam1:value1 keywordParam2:value2

There may be some ambiguity with syntax where a param value string could reasonably contain a colon, but would be curious if this would still be feasible.

1 Like

Thanks for the feature request @loucadufault. I was running into this annoyance myself the other day, and I think it would make sense to support it. The CLI is open source, so if you or someone else is interested in submitting a PR I think this is the relevant code:

What kind of syntax would you expect for these named arguments? The POSIX-like --name=value or the Coda-like name:value?

My inclination would be that --name=value would be more familiar to CLI users, but would probably be a larger change, since I think you’d need to pipe those values through more layers.