This commit is contained in:
2019-10-14 20:29:39 +02:00
commit c5a2bb56b2
3 changed files with 129 additions and 0 deletions

24
README.md Normal file
View File

@@ -0,0 +1,24 @@
# cli
A simple CLI library for Carp.
```clojure
(load "git@github.com:carpentry-org/cli.carp.git@master")
(defn main []
(let [p (=> (CLI.new @"My super cool tool!")
(CLI.add &(CLI.option "--flag" "-f" "my flag" true)))]
(match (CLI.parse &p)
(Result.Success p) (IO.println &(str &(CLI.get &p "--flag")))
(Result.Error msg) (do (IO.errorln &msg) (CLI.usage &p)))))
```
## Usage
```clojure
(load "git@github.com:carpentry-org/cli.carp.git@master")
```
<hr/>
Have fun!