Skip to content

Releases: lambdaisland/cli

v0.8.39

24 May 15:47
Compare
Choose a tag to compare

Added

  • Added :required for :flags
  • Support commands with arguments and subcommands at the same time

v0.7.33

27 Feb 17:39
Compare
Choose a tag to compare

Fixed

  • Remove debug call

v0.6.30

27 Feb 16:25
Compare
Choose a tag to compare

Added

  • -h can now be used to get help, in addition to --help

Changed

  • When encountering parse errors (invalid arguments), print a message and exit,
    rather than throwing (which looks quite ugly from a bb script)

v0.5.27

26 Feb 10:45
Compare
Choose a tag to compare

Added

  • Allow a command spec to be just a function

Fixed

  • Preserve command order in help text when using a vector

v0.4.24

17 Feb 12:39
Compare
Choose a tag to compare

Added

  • Bind the options map to cli/*opts*, for easy access.
  • Show the default for a flag in the help text.
  • Add a docstring to the main entry point (dispatch)
  • Bind *opts* during flag handler execution

Fixed

  • Recognize - and \\--foo as positional args

Changed

  • When given both a :default and a :handler for a flag, call the handler
    with the default, rather than just assoc-ing it.
  • When given a string :default and a :parse function for a flag, run the
    default value through the parse function, rather than using it directly. Using
    the unparsed string form for the default is preferable over for instance using
    a keyword, since it leads to better help text rendering.
  • Improve and document the processing logic, especially when it comes to
    subcommand flags with handler functions.

v0.3.19-alpha

11 Feb 16:54
Compare
Choose a tag to compare

Much expanded and improved version, see README for all details. This is
approaching the envisioned scope for this library.

  • take docstring/command from var
  • :strict? mode
  • :handler and :middleware on flags
  • Much improved help text rendering
  • More lenient flag parsing
  • Add :default and :parse

v0.2.11-alpha

08 Feb 07:51
Compare
Choose a tag to compare

Added

  • Handle named command arguments
  • Support --flag FOO and --flag=<foo> (and --flag <foo>)
  • Boolean flags count by default, e.g. -vvv => {:verbose 3}

Changed

  • Command handlers take a single unified map

v0.1.6-alpha

04 Feb 18:44
Compare
Choose a tag to compare

Added

  • subcommand handling
  • rudimentary flag handling
  • help text generation