babashka

sheluchin 2026-01-19T18:17:01.105329Z

What are my options for splitting up bb.edn into multiple files?

2026-01-20T10:57:48.541039Z

Hello I'm using Aero to merge different sections of bb.edn (deps, pods, and tasks) to share common configuration between two separate projects. My workflow: 1. Build a merged bb.edn file using Aero 2. Pass it to Babashka via the --config option The merge step adds negligible overhead to execution time but this process requires some kind of alias to the original bb command.

Bob B 2026-01-19T18:45:34.974859Z

I want to say that they're vaguely in line with the options for splitting up deps.edn into multiple files (not overly-plentiful). Is there something specific you're trying to accomplish?

sheluchin 2026-01-19T18:47:48.152919Z

My task list is starting to get long and I'd like to organize them by splitting them up and composing them into a root bb.edn. I vaguely recall seeing this done somewhere (pr or issue comment maybe?) but can't find it now. I know I can just write namespaces and require those but that's not quite the option I'm trying to recall.

Bob B 2026-01-19T18:56:00.353609Z

I won't claim any authoritative knowledge, but I'm not aware of a built-in mechanism. I think in theory you could potentially "chain" tasks where the root bb.edn could "namespace" tasks and exec bb with a different cfg file... definitely a workaround/hack.

borkdude 2026-01-19T18:57:17.760859Z

Bob is right. There's no way to split a tasks file up at the moment

sheluchin 2026-01-19T19:00:38.770229Z

Thanks guys. Guess I'm misremembering something.

borkdude 2026-01-19T19:02:18.867119Z

There are workarounds but nothing out of the box

borkdude 2026-01-19T19:02:33.539879Z

e.g. you can use bb --config other-bb.edn tasks

Bob B 2026-01-19T19:08:35.487019Z

not much, but probably the best I have to offer at the moment

 cat bb.edn
{:tasks
 {two (apply babashka.process/exec
             "bb" "--config" "two.edn" *command-line-args*)}}
 cat two.edn
{:tasks
 {three (println "hi there")}}
 bb two three
hi there
Also, maybe this is the related discussion: <https://github.com/babashka/babashka/discussions/1044>

👍 2
escherize 2026-01-19T23:38:55.297279Z

I had a task that looks for another edn file with tasks in it so we could have our own non-commited tasks. it doesn't exactly solve your question, but it rhymes. So it'd work like bb local <local-task-name> --option=on arg1 arg2