Clojure utilities to create amazing Command Line Interfaces
See it in action!
ANSI Escapes codes for manipulating the terminal:
clear the screen, move the cursor, delete lines and many more
(use 'pretty.cli.ansi-escapes)
(println "Here")
(println "First")
(println (cursor-up 2))
(println "Second")
(println (clear-screen))
Enrich your text with colors, background and styles
(use 'pretty.cli.colors)
(println (txt-bold "Bold"))
(println (yellow "Yellow"))
(println (cyan-bg (txt-bold "Bold with Cyan Background")))
(println (txt-underscore (red "Underlined Red")))
Print ASCII banners on your terminal
(use 'pretty.cli.figlet)
(println (figlet "Hello world"))
(use 'pretty.cli.colors)
(use 'pretty.cli.figlet)
(println (yellow (figlet "STAR" "starwars")))
(println (cyan (figlet "WARS" "starwars")))
Ask user input with many possibilities:
free input with validation, confirmation, select list and checkbox options
(use 'pretty.cli.prompt)
(input "What's your name" (fn [x] (if (= "" x) "Sorry?")))
(list-select "Choose your meal" ["Pasta" "Pizza" "Hamburger" "Salad"])
(list-checkbox "Add toppings" ["Bacon" "Cheese" "Onions" "Eggs"])
(confirm "Are you sure")
MIT.