Establish an effective Clojure development environment by installing the following:
| Tools | Required | Purpose |
|---|---|---|
| Clojure CLI tools | Essential | Run Clojure REPL for development and production |
| Community tools | Recommended | Additional tools to enhance Clojure development experience |
| Clojure aware editor | Recommended | Complete Clojure development experience |
| Code analysis (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 clj |
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.
A command line REPL provides the essential tool for Clojure development. Installing a Clojure aware editor is recommended when developing Clojure projects.
{% tabs linux="Linux", homebrew="Homebrew", windows="Windows" %}
{% content "linux" %}
Use the Linux script installer from Clojure.org - Getting Started
The installation creates /usr/local/bin/clojure, /usr/local/bin/clj wrapper and /usr/local/lib/clojure directory.
{% content "homebrew" %}
Use the Homebrew command with the clojure/tools tap, as defined in the Clojure.org Getting started guide
brew install clojure/tools/clojure{% content "windows" %} 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.
Alternatively install scoop.sh, a command line installer for windows. Powershell 5 or greater is required. Follow the scoop-clojure getting started guide, summarized here:
Open "Windows PowerShell" and enter the following commands to configure the shell:
iwr -useb get.scoop.sh | iex
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -ForceThen in the same PowerShell window, install the Clojure related tools using the following commands:
scoop bucket add extras
scoop bucket add java
scoop bucket add scoop-clojure https://github.com/littleli/scoop-clojure
scoop install git 7zip pshazz adoptopenjdk-lts-hotspot clojure leiningen clj-kondo vscode coreutils windows-terminal{% endtabs %}
Install the rlwrap binary to support the clj wrapper, which launches a Clojure REPL with command history.
rlwrap is available with most Linux systems and install instructions should be discoverable by searching for rlwrap in a web browser.
rebel readline provides even more features in the command line REPL.