Scroll to navigation

LEININGEN(1) General Commands Manual LEININGEN(1)

NAME

lein - Automate Clojure projects

SYNOPSIS

lein [-o] [-U] [TASK [ARGS]]
lein [-h|--help]
lein [-v|--version]

DESCRIPTION

Leiningen is for automating Clojure projects without setting your hair on fire.

Working on Clojure projects with tools designed for Java can be an exercise in frustration. With Leiningen, you just write Clojure.

TASKS

lein help will show the complete list of tasks, while lein help TASK shows usage for a specific one.

lein help tutorial has a detailed walk-through of the various tasks, but the most commonly-used are:

generate a new project skeleton
run the tests in the TESTS namespaces, or all tests
launch an interactive REPL session in a networked REPL server
package up the project and its dependencies as a standalone .jar file
install a project into your local repository
deploy a library to a remote repository

Rewrite project.clj by applying a function.

Check syntax and warn on reflection.

Print the classpath of the current project.

Remove all files from project's target-path.

Compile Clojure source into .class files.

Download all dependencies.

Higher-order task to perform other tasks in succession.

Package up all the project's files into a jar file.

Compile Java source files.

Write a pom.xml file to disk for Maven interoperability.

Perform :release-tasks.

Run only the test namespaces which failed last time around.

Run a -main function with optional command-line arguments.

Search remote maven repositories for matching jars.

List all available profiles or display one if given an argument.

Run a task without nesting the project's JVM inside Leiningen's.

Perform arbitrary transformations on your project map.

Interact with the version control system.

Print version for Leiningen and the current JVM.

Apply the given task with the profile(s) specified.

OPTIONS

Run a task offline.

Run a task after forcing update of snapshots.

Print this help or help for a specific task.

Print Leiningen's version.

CONFIGURATION

Leiningen reads its configuration from the project.clj file in your project root. Either use lein new to create a fresh project from which to work, or see the exhaustive list of configuration options with lein help sample.

You can customize your project map further with profiles; see lein help profiles.

BUGS

Check https://codeberg.org/leiningen/leiningen/issues to see if your problem is a known issue. If not, please open a new issue on that site. Please include the output of lein version as well as your project.clj file and as much of the relevant code from your project as possible.

COPYING

Copyright (C) 2009-2017 Phil Hagelberg and contributors.

Distributed under the Eclipse Public License, the same as Clojure uses. See the file /usr/share/doc/leiningen/copyright.

AUTHOR

This manpage is written by Phil Hagelberg <technomancy@gmail.com>

2017 August 10