Leiningen build automation tool for Clojure
Leiningen will help you create, build and deploy your Clojure projects.
Practicalli recommends using Clojure CLI tools
Install Leiningen
Install the Leiningen tool using the specific instructions for your Operating System
Download the lein script to your local bin
directory. Then make the lein
script executable and run lein
to download the full version.
mkdir ~/bin
curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/bin/lein
chmod u+x ~/bin/lein
lein
If the command lein
is not found, run source ~/.bashrc
to ensure your bin
directory is on the path.
If you have Homebrew installed, run the following command in a terminal window.
brew install leiningen
Windows Chocolatey
If you have Chocolatey installed, add the Leiningen package by running the following command in a terminal window.
choco install lein
GitBash allows you to use the Linux lein
script, which may have less issues when installing.
Create a directory called C:\Users\your-user-name\AppData\Local\Programs\Leiningen
Download the lein
file and save it to the above directory
Open Environment variables for your account
and add the directory to your path
Open a command window and run the command: lein
The full version of Leiningen will be downloaded and Leiningen is ready to use.
Create a directory called C:\Users\your-user-name\AppData\Local\Programs\Leiningen
Download the lein.bat
file and save it to the above directory
Open Environment variables for your account
and add the directory to your path
Open a command window and run the command: lein.bat
The full version of Leiningen will be downloaded and Leiningen is ready to use.
Check Leiningen is working
Open a terminal and use the following command
lein
If a list of Leiningen commands is shown then it is working correctly.