clojure
TLDR
Start a Clojure REPL
SYNOPSIS
clojure [dep-opts] [init-opts] [main-opts] [args]
DESCRIPTION
clojure is the official command-line launcher for the Clojure programming language. It manages dependencies through deps.edn configuration files and provides a streamlined workflow for REPL-driven development, script execution, and building applications.
The CLI integrates with Maven and Git repositories for dependency resolution, automatically downloading and caching libraries as needed. Aliases in deps.edn allow defining different configurations for development, testing, and production environments.
Clojure provides three main execution modes: -M for traditional main function execution, -X for executing functions with keyword arguments, and -T for tool invocation. The REPL supports interactive development with immediate feedback, a core practice in Clojure development.
PARAMETERS
-M [:aliases]
Use concatenated aliases for running main entry point.-X [:aliases]
Execute a function with exec arguments.-T [:aliases]
Execute tool with exec arguments.-A [:aliases]
Use concatenated aliases for REPL.-Sdeps EDN
Additional dependencies in EDN format.-Spath
Print the classpath and exit.-Stree
Print the dependency tree.-Sdescribe
Print environment and command info.-e, --eval STRING
Evaluate the given expression.-r, --repl
Run a REPL.-h, --help
Display help information.
CAVEATS
Requires Java Runtime Environment (JRE) version 8 or higher. Initial dependency downloads can take time but are cached locally. The CLI requires a deps.edn file for project-specific configurations; global defaults apply without one.
HISTORY
Clojure was created by Rich Hickey and released in 2007 as a modern Lisp for the JVM. The clojure CLI and deps.edn tooling were introduced in 2018 as an official alternative to Leiningen and Boot, providing a simpler, more composable approach to dependency management.


