Install Clojure

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

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 - Getting Started

The installation creates /usr/local/bin/clojure, /usr/local/bin/clj wrapper and /usr/local/lib/clojure directory.

Use the Homebrew command with the clojure/tools tap, as defined in the Getting started guide

brew install clojure/tools/clojure

Homebrew on Linux or Windows with WSL

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, 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 | iex
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

Then 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
scoop install git 7zip pshazz adoptopenjdk-lts-hotspot clojure leiningen clj-kondo vscode coreutils windows-terminal

Optional: rlwrap readline

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.

results matching ""

    No results matching ""