Skip to main content

babashka.cli

A

  • auto-coerce

    Auto-coerces `s` to data. Does not coerce when `s` is not a string. If `s`: * is `true` or `false`, it is coerced as...

C

  • coerce

    Coerce string `s` using `f`. Does not coerce when `s` is not a string. `f` may be a keyword (`:boolean`, `:int`, `:dou...

D

  • dispatch

    Subcommand dispatcher. Dispatches on longest matching command entry in `table` by matching subcommands to the `:cmd...

F

M

  • merge-opts

    Merges babashka CLI options.

N

O

P

  • parse-args

    Same as `parse-opts` but separates parsed opts into `:opts` and adds `:cmds` and `:rest-args` on the top level instead...

  • parse-cmds

    Parses sub-commands (arguments not starting with an option prefix) and returns a map with: * `:cmds` - The parsed subc...

  • parse-keyword

    Parse keyword from `s`. Ignores leading `:`.

  • parse-opts

    Parse the command line arguments `args`, a seq of strings. Instead of a leading `:` either `--` or `-` may be used as ...

S

  • spec->opts

    Converts spec into opts format. Pass existing opts as optional second argument.