Babashka runs Clojure scripts with quick startup and no JVM install. It targets tasks you might otherwise write in bash, with built-in libraries and cross-platform binaries.
Overview
Babashka is a native Clojure interpreter aimed at scripting. It starts quickly and ships as a self-contained binary, so you can use Clojure in automation where a full JVM Clojure process would be heavier.
It implements a substantial Clojure subset via the Small Clojure Interpreter, compiled with GraalVM native-image. Built-in namespaces cover common scripting needs, including tools.cli, cheshire, filesystem and process helpers, and java.time. It supports threads, pmap, and future, and can load additional Clojure libraries from source when needed.
The tool is meant to run alongside existing shells, not replace them. Installation paths include Homebrew, Nix, OS packages, asdf, mise, Windows scoop or manual binaries, and an installer script for Linux and macOS. Optional pods let Babashka call external programs through a defined protocol.
Babashka also includes a built-in task runner for common makefile-style workflows. Interpreted code is slower than JVM Clojure for heavy loops; the project notes when a full Clojure JVM run may be preferable.
Key features
- Single native binary without JVM
- Built-in scripting libraries
- Classpath loading for Clojure libs
- Pod protocol for external binaries
- Built-in task runner
- REPL with configurable history
- Multi-threaded pmap and future
- AWS Lambda packaging notes
Use cases
- Clojure one-off scripts on the CLI
- Glue between shell and JVM libraries
- Cross-platform automation tasks
- Fast CI scripts in Clojure syntax
- Lightweight data processing scripts