All Projects → cldwalker → bb-clis

cldwalker / bb-clis

Licence: MIT license
Babashka CLIs

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to bb-clis

scoop-clojure
Install Clojure on Windows with Scoop
Stars: ✭ 73 (+58.7%)
Mutual labels:  babashka
nbb
Scripting in Clojure on Node.js using SCI.
Stars: ✭ 461 (+902.17%)
Mutual labels:  babashka
spartan.spec
A spartan version of clojure.spec compatible with babashka
Stars: ✭ 29 (-36.96%)
Mutual labels:  babashka
ffclj
Clojure ffmpeg wrapper
Stars: ✭ 42 (-8.7%)
Mutual labels:  babashka
nota
Static Markdown Blog/Site using Fulcro & Pathom with no backend
Stars: ✭ 35 (-23.91%)
Mutual labels:  babashka
jirazzz
A jira rest client for the command line, written in clojure as a babashka script.
Stars: ✭ 26 (-43.48%)
Mutual labels:  babashka
babashka-sql-pods
Babashka pods for SQL databases
Stars: ✭ 64 (+39.13%)
Mutual labels:  babashka
corona cases
🦠 Coronavirus Information on Telegram Chatbot
Stars: ✭ 19 (-58.7%)
Mutual labels:  babashka
holy-lambda
The extraordinary simple, performant, and extensible custom AWS Lambda runtime for Clojure.
Stars: ✭ 318 (+591.3%)
Mutual labels:  babashka
Babashka
Native, fast starting Clojure interpreter for scripting
Stars: ✭ 2,462 (+5252.17%)
Mutual labels:  babashka
process
Shell out in Clojure with simplicity and ease
Stars: ✭ 116 (+152.17%)
Mutual labels:  babashka

Description

An assortment of handy Babashka CLIs: scripts and tasks. scripts strive to be compatible with Clojure.

Prerequisites

Babashka >= 0.7.2 is required.

Tasks

bb.edn contains global tasks i.e. tasks that are useful in any directory or project. To run these tasks from any directory, clone this repo and then use a shell function to reference the cloned directory:

function bbg() { BABASHKA_EDN=/path/to/this-repo/bb.edn bb --config
/path/to/this-repo/bb.edn $@ }

Run bbg tasks to see all the available tasks.

Scripts

Setup

Scripts/commands/executables are located in bin/. To use an individual script, simply copy and use it:

$ curl -o bb-github-repo https://raw.githubusercontent.com/cldwalker/bb-clis/master/bin/bb-github-repo
$ chmod +x bb-github-repo
$ ./bb-github-repo -h

If you want to use all scripts in this repo, then put bin/ on $PATH:

$ git clone https://github.com/cldwalker/bb-clis
$ export PATH=$PATH:$HOME/path/to/bb-clis/bin

Usage

See scripts.md which provides useful examples of several scripts.

Development

Code is organized as follows:

  • src/cldwalker/bb-clis/tasks/ - Namespaces that are mainly run within babashka tasks
  • src/cldwalker/bb-clis/cli/ - Namespaces that useful to scripts and possibly tasks.
  • src/cldwalker/bb-clis/util/ - Namespaces that are useful to any clojure or bb program, not just CLIs.

Misc bb tips

Preloads

Babashka supports $BABASHA_PRELOADS which allows arbitrary clojure to be run at the start of each invocation. This is handy for loading one's preferred set of vars and namespaces, especially when paired with an alias. For example, alias bbp="BABASHKA_PRELOADS='(load-file (str (System/getenv \"HOME\") \"/path/to/this-repo/preloads.clj\"))' bb"

Preloaded fns like pprint are then available on the commandline:

bbp '(->> (System/getenv) (into {}) pprint)'

License

See LICENSE.md

Additional Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].