Establish a Clojure environment by installing the following:
|Clojure CLI tools||Essential||Run Clojure REPL for development and production|
|Aliases for CLI tools||Recommended||Additional tools to enhance Clojure development experience|
|clj-kondo||Recommended||Static analysis of code to find all those little bugs|
|rlwrap||Optional||A simple read line for command history, only used by
Aliases provided by practicalli/clojure-deps-edn
practicalli/clojure-deps-edn provides a user wide configuration of over 30 aliases to support Clojure devlopment. These aliases use meaningful names to avoid clashes with project specific aliases, ensuring that the user wide aliases remain available in all projects.
Clojure CLI tools
A command line REPL provides the essential tool for Clojure development. Installing a Clojure aware editor is recommended when developing Clojure projects.
Use the Linux script installer from Clojure.org
sudo apt install curl rlwrap curl -O https://download.clojure.org/install/linux-install-22.214.171.1246.sh chmod +x linux-install-126.96.36.1996.sh sudo ./linux-install-188.8.131.526.sh
The installation creates
/usr/local/bin/clj wrapper and
Install the command line tools with brew from the clojure/tools tap:
brew install clojure/tools/clojure
For Windows 10 use Windows Subsystem for Linux and Windows Terminal are recommended if you have administrative privileges and are happy to use a Unix system on the command line.
Follow the scoop-clojure install instructions, summarized here:
scoop install git scoop bucket add java scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure scoop install adoptopenjdk-lts-hotspot scoop install clojure scoop update clojure
To also use scoop to install clj-kondo
scoop bucket add extras scoop install clj-kondo
Clojure CLI tools common aliases
Create a fork of the practicalli/clojure-deps-edn on GitHub
Clone that fork to
~/.clojure/ and instantly have access to dozens of tools for Clojure software development across all projects.
git clone firstname.lastname@example.org:your-fork/clojure-deps-edn.git ~/.clojure/
All tools are provided via libraries and are only installed on first use.
If you choose to use your own
~/.clojure/deps.edn then add an alias for the clj-new tool and rebel readline as this is extensively used in this guide.
clj-kondo static analyser / linter
Follow the clj-kondo install guide for your operating system.
clj-kondo provides a paring buddy
Configuring clj-kondo with your preferred editor will greatly enhance the joy of coding in Clojure by keeping your code idiomatic and free from a wide range of syntax bugs.
Optional: rlwrap readline
rlwrap binary to support the
clj wrapper, which launches a basic repl with command history. This approach is not as useful as using rebel readline.
rlwrap is available with most Linux systems and install instructions should be discoverable by searching for rlwrap in a web browser.