Code Monkey home page Code Monkey logo

tools-cli's Introduction

tools-cli

Clojars Project CircleCI

Simple tools for building CLI apps and interacting with the CLI, and building a consistent CLI experience across projects.

Although the source code for this library is now open source, it is offered as a demonstration, not as a promise of continued development or support.

Click the Clojars badge above to see available versions and to get Lein/Boot/deps.edn information.

Usage

sparkfund.cli.prompts

sparkfund.cli.prompts> (choice "please pick a flavor" {"vanilla" 1 "chocolate" 2})
please pick a flavor ✏️  raspberry
expecting one of: (vanilla chocolate)
please pick a flavor ✏️  chocolate
2

sparkfund.cli.shell

sparkfund.cli.shell> (sh! "cowsay" "-f" "flaming-sheep" "example")
[sh!] cowsay -f flaming-sheep example
 _________ 
< example >
 --------- 
  \            .    .     .   
   \      .  . .     `  ,     
    \    .; .  : .' :  :  : . 
     \   i..`: i` i.i.,i  i . 
      \   `,--.|i |i|ii|ii|i: 
           UooU\.'@@@@@@`.||' 
           \__/(@@@@@@@@@@)'  
                (@@@@@@@@)    
                `YY~~~~YY'    
                 ||    ||     
{:out
 " _________ \n< example >\n --------- \n  \\            .    .     .   \n   \\      .  . .     `  ,     \n    \\    .; .  : .' :  :  : . \n     \\   i..`: i` i.i.,i  i . \n      \\   `,--.|i |i|ii|ii|i: \n           UooU\\.'@@@@@@`.||' \n           \\__/(@@@@@@@@@@)'  \n                (@@@@@@@@)    \n                `YY~~~~YY'    \n                 ||    ||     \n",
 :err "",
 :exit 0}
sparkfund.cli.shell> (sh! "echo" "secret" {:print-cmd? false :print-out? false})
{:out "secret\n", :err "", :exit 0}

sparkfund.cli.style

sparkfund.cli.style> (git-branch-ok "feature/good")
"�[1m�[35mfeature/good�[0m" ;; magenta color
sparkfund.cli.style> (wrap-with-emoji <tada> "finished")
"🎉 🎉 🎉  finished 🎉 🎉 🎉 "

License

Copyright © Sparkfund 2020

Distributed under the Apache License, Version 2.0. See LICENSE for details.

tools-cli's People

Contributors

calvis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

calvis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.