element.version === currentVersion)) { versionNodes.unshift({ version: currentVersion, url: "#" }); } document.querySelector("#project-version").innerHTML = versionNodes.reduce( (acc, element) => { const status = currentVersion === element.version ? "selected disabled" : ""; return ` ${acc} `; }, `
cosmo_cli · v1.1.1

Package Version Hex Docs

cosmo_cli

A Gleam library for building command line interfaces. cosmo_cli is strongly inspired by spf13/cobra.

gleam add cosmo_cli@1

Further documentation can be found at https://hexdocs.pm/cosmo_cli.

Examples

All examples are in the examples directory.

  • simple … A simplest CLI that shows us cosmo_cli can be received the raw List(String) arguments.
  • simple_argv … A simplest CLI that shows us we don’t need to import argv library directly.

Development

gleam run   # Run the project
gleam test  # Run the tests

Roadmap

  • subcommands
  • flags(short, long)
    • inherit persistent flags to its subcommands
  • dynamic completion
Search Document