https://github.com/babashka/cli: turn Clojure functions into CLIs!
v0.8.67 (2025-11-21)
• https://github.com/babashka/cli/issues/126: - value accidentally parsed as option, e.g. --file -
• https://github.com/babashka/cli/issues/124: Specifying exec fn that starts with hyphen is treated as option
• Drop Clojure 1.9 support. Minimum Clojure version is now 1.10.3.
io.github.hlship/cli-tools 0.16.0-beta-3
https://github.com/hlship/cli-tools
cli-tools is a complement to Babashka used to create tools with sub-commands, much like Babashka tasks.
It is effectively a layer on top of org.clojure/tools.cli.
BREAKING CHANGES
• Groups are now defined in the options passed to net.lewisship.cli-tools/dispatch, not in
namespace metadata
• Command names are matched as prefixes (not substrings)
• The tool's documentation must now be specified in top-level :doc option key (not from namespace meta-data)
• net.lewisship.cli-tools:
◦ In a defcommand:
▪︎ The :summary key has been renamed to :title
▪︎ The :as keyword is no longer supported
◦ abort has been stripped down, it no longer writes the tool name, command path, etc.
◦ The two-arg variant of print-errors has been removed
◦ dispatch* has been removed
◦ expand-dispatch-options has been removed
• When an arg is ambiguous during dispatch, the error text now says "could match" and uses "or" as the conjunction, e.g. "ex could match exhume or extract"
• Tool and command help is now printed to \out\, not \err\*
• The builtin help command now as an option, -c / --commands, that can be one of none, root, or all, and the --flat switch was removed.
• Dependencies no longer include those provided by Babashka itself, reverting the change in 0.15.1; new documentation identifies what to add back in
Changes
• Groups may now be nested, to arbitrary depth
• You may now enter -h or --help after a group to get help for just that group
• Tool help output has been reordered, with top-level tool commands first (previously, those were in a "Builtin" group and listed last)
• Tool help now displays just root-level commands by default (add --commands all to list nested commands)
• When extracting the first sentence as the single-line title, embedded periods are no longer considered the end of the sentence
• net.lewisship.cli-tools:
◦ Added function tool-name
◦ Added function command-root
◦ Added function read-password
◦ New command-path function returns a composed string of the tool name and command path
◦ dispatch function has new options:
▪︎ :extra-tool-options - vector of additional tool options to prefix the default
▪︎ :tool-options-handler - callback function for handling extra tool options
▪︎ :transformer provides a function to add additional commands and groups after namespaces are loaded
▪︎ :source-dirs specifies extra directories to consider when caching
▪︎ :pre-dispatch - callback function invoked before dispatch
▪︎ :pre-invoke - callback function invoked before the dispatched command function is invoked
▪︎ Can now handle the case where a command has the same name as a group
• Cache files are now stored in ~/.cache/net.lewisship.cli-tools by default
• Added initial support for commands defined as Babashka CLI functions
• Added net.lewiship.cli-tools.test namespace
• Added net.lewisship.cli-tools.styles namespace
https://github.com/hlship/cli-tools/milestone/9?closed=1
Since beta-2: • Ensure that :extra-tool-options shows up in a generated zsh completion script • Tweaks to how the cache hash key is generated • Style support (map semantic names to org.clj-commons/pretty fonts) • Include the tool name when printing help for a group