Emacs interface for babashka tasks.
The main entry point is babashka-tasks
. If called from a buffer visiting a file in a project with bb.edn
in it, it will look up the directory tree recursively until bb.edn
is found, parses it for tasks and offer a menu to select a task to run:
If your task accepts command line arguments, just type them after the task name:
If you want to specify a bb.edn
to run tasks from, simply call babashka-tasks
with an interactive argument:
C-u M-x babashka-tasks RET
project-switch-project
can be extended with custom dispatch
actions. To add a dispatch action which runs a Babashka task from the
project's root, add babashka-project-tasks
to your
project-switch-commands
list. For example:
(setq project-switch-commands
'((babashka-project-tasks "Babashka task" "t") ;; <--
(magit-project-status "Magit status" "m")
(project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell")
))
Babashka.el is available on MELPA and MELPA Stable and can be installed with:
M-x package-install RET babashka RET
or using use-package
:
(use-package babashka)
The project uses break versioning, meaning that upgrading from 1.0.x to 1.0.y will always be safe, upgrade to 1.y.0 might break something small, and upgrade to y.0.0. will break almost everything. That was a versioning spec in one sentence, by the way.
If you have more ideas about using babashka from Emacs — please submit a PR or a feature request.