larzcli
Functions into CLIs.
Turn a function into a command-line interface by naming its parameters explicitly - no runtime introspection to derive them from - with CLI > env var > default config layering, real subcommands, and a testable run() that never force-exits the process.
larzscript pkg install cli
What you get
- Function -> CLI, params named explicitly
- CLI > env > default config
- Subcommands
- Testable, never force-exits
Try it
import "cli" as cli
let app = cli.new("todo", "a tiny todo tool")
cli.from_function(app, "greet", "say hi", ["name"], fn(name) { print("hi " + name) })
cli.run(app, ["greet", "--name=Ada"])Output
hi Ada
Why it's in the Larz Stack
larzcli is a real Larzscript package (larzscript pkg install cli) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.