Fork me on GitHub
Carsten Behring20:01:56

What is the best way to use a certain babashka script from "anywhere" ? I was thinking that it could be nice, if I could execute a "public gist", like this: So the "gist" needed to follow a certain convention of the "main.clj" and the "bb.edn", see my gist as an example.

bb --gist 


you could do something simple like: bb -e '(load-string (slurp ""))' note that it doesnt do redirects


for a better solution and experience id recommend

👍 2

A gist would only work with a single script. When you want to support multiple files, a github repo (not gist) + some config in your bb.edn will work well with #babashka-bbin

Carsten Behring21:01:56

bbin will mostly do what I want. 👍 Just saw that " bbin exec" idea was closed. Any reason for this ? I see as well that "install a script" is not always needed. Some script I just want to run ones, without polluting the machine by installing it.


I don't know why it was closed. Feel free to bring this up in #C0400TZENE7 - @U0CLCL6T0 is the most active maintainer of the bbin project


Alternatively you could just git clone the project, cd into it and then run bb whatever - and maybe write a small script that does this for you


Oh wait, I also know another one, you can do:

bb -Sdeps '{:deps {...}}' -x 


Note that your bb project must have a deps.edn in this case if it's going to be used as a library


You use a multi-file gist as a git dep, at least for clj, so I'd expect a similar technique would work with bb? Example:

👍 4

Ah nice and then you can use that along with -m or -x


I think the bb -Sdeps approach is the right solution here. For my thoughts on bbin exec see here:;cid=C0400TZENE7