leiningen
Moved to Codeberg; this is a temporary convenience mirror
The standard build and project management tool for Clojure, handles dependencies, testing, packaging, and publishing with a single script you download and run. Java must already be installed.
Leiningen is a build and project management tool for Clojure, a programming language that runs on the Java platform. It handles the routine tasks involved in developing a Clojure project: creating the initial folder structure for a new project, downloading and managing library dependencies, running tests, starting an interactive coding session, packaging the project for distribution, and publishing it to public repositories for others to use.
The name comes from a 1938 short story, "Leiningen Versus the Ants," in which a plantation owner holds off a massive ant swarm through sheer determination. The project uses this as a playful nod to the frustration that build tooling can cause.
Installation is intentionally minimal. You download a single script file called lein, place it somewhere your system can find it, make it executable, and run it. Leiningen downloads everything else it needs on that first run. Java must already be installed on the machine.
Projects are configured through a file called project.clj in the project's root folder. This file lists the project name, version, description, and any external libraries the project depends on. Leiningen reads this file to know what to download and how to build things. Profiles let you vary configuration between environments, for example having different settings for development versus testing.
The tool supports plugins that extend its list of available tasks. A large community ecosystem of plugins covers additional use cases beyond what ships in the core tool.
Note: the canonical home of this repository has moved to Codeberg. The GitHub version is a temporary mirror. If you use Leiningen, update your bookmarks and links to point to the Codeberg location.
Where it fits
- Create and manage a new Clojure project with all dependencies downloaded automatically from a single project.clj config file.
- Start an interactive Clojure REPL with all project dependencies available for live experimentation.
- Package a Clojure project as a standalone JAR and publish it to Clojars or Maven Central for others to use.
- Extend your build workflow with community plugins that add tasks beyond the built-in core.