{"repo":"babashka/cli","free":true,"listed":false,"github":"https://github.com/babashka/cli","clone":"git clone https://github.com/babashka/cli.git","description":"Turn Clojure functions into CLIs!","language":"Clojure","stars":290,"topics":["babashka","clojure","command-line"],"license":"MIT","category":"cli-tools","readme_excerpt":"babashka.cli Turn Clojure functions into Command Line Interfaces! This library can be used from: - Babashka - included as a built-in library - Clojure on the JVM - we support Clojure 1.10.3 and above on Java 11 and above - ClojureScript - we test against the current release - Squint - we test againt the current release - ClojureDart - we test against the current release API Installation For Clojure, ClojureScript, and ClojureDart include a :deps entry in your deps.edn file: For babashka, no changes are needed; org.babashka/cli is a babashka built-in library. For JavaScript, install from NPM: See JavaScript for how to use this library in JS. Intro Turn a Clojure function into a CLI that takes Unix-style command line arguments. E.g.: Where: - program is your executable program or script (other libraries might call this \"command\") - command is a single or multi-word command for your program (other libraries might call this \"subcommand\") - --verbose is a boolean option - --long-opt1 v1 is an option - -o v2 is a short option - arg is a positional argument See Terminology for precise definitions. The main ideas: - Put as little effort as possible into turning a Clojure function into a CLI, similar to -X exec style invocations. For lazy people like me! If you are not familiar with clj -X , read the docs here. - But with a better user experience by not having to use quotes on the command line as a result of having to pass EDN directly: --dir foo instead of :dir '\"foo\"' (or who knows ","default_branch":null,"files":null,"tree":[],"storefront":"/r/babashka","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/babashka/cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}