Skip to content

Install Clojureλ︎

Clojure CLI is the minimum Clojure environment, although a Clojure aware editor with Clojure LSP server is highly recommended.

Clojure CLI provide the foundation for Clojure development, providing a declarative approach to:

  • Run Clojure programs and tools
  • Run a REPL process (Read-Eval-Print Loop) and provides a basic interactive terminal UI
  • Manage packaged dependencies from Maven (jars) and use Git repositories as dependencies

Practicalli Clojure CLI config provides a user configuration that extends Clojure CLI with tasks to create, develop, build and deploy Clojure applications and services. Configuration for cljstyle Clojure format tool is also included.

Clojure aware editors provide the most effective way to write and maintain Clojure projects, connecting to (or even starting) a Clojure REPL and evaluating code as its typed and seeing the results instantly in line with the code.

Practicalli Clojure LSP configuration for static code analysis with Clojure LSP server and live code formatting with cljfmt.

Complete Clojure environmentλ︎

Establish an effective Clojure development environment by installing the following:

Fundamental Tools Purpose
Java 17 LTS Java virtual machine hosts Clojure. Java 17 is the current Long Term Support version providing a stable platform to run Clojure
Clojure CLI Run Clojure REPL and other tools for development and production
Practicalli Clojure CLI config Curated aliases providing common development tasks and tools across all projects (used heavily in this guide)
Recommended Tools Purpose
Clojure aware editors Editors providing a complete Clojure development environment
Clojure LSP server Lint tool to detect syntax bugs and suggest idiomatic code
Data inspectors Visualize results of Clojure code, navigate nested data and page through large data sets

Aliases in Practicalli Clojure provided by Practicalli Clojure CLI config

Practicalli Clojure CLI Config provides a user configuration of over 50 aliases to support Clojure development. These aliases are used heavily in the Practicalli Clojure book.

If the Practicalli Clojure CLI config is not used, review the deps.edn file from the GitHub repository and add relevant aliases definitions to your own Clojure CLI configuration.

optional: clj-kondo static analysis tool

Code analysis (clj-kondo) is a Clojure syntax analysis tool that can detect syntax bugs and suggest idiomatic code. clj-kondo is included in clojure-lsp, so only recommended if clojure-lsp is not available.

Alternative development tools

Leiningen is the long-standing development tool for Clojure. All the code examples in this book should work with Leiningen when a correctly configured project.clj file is created which includes all the necessary library dependencies. Libraries included via aliases should be added as either :dev-dependencies or :aliases in the Leiningen project.clj file.

Last update: November 18, 2023