Forrest logo
tool overview
On this page you find all important commands for the CLI tool lein. If the command you are looking for is missing please ask our AI.

lein

Lein is a command line tool for Clojure, a dynamically-typed functional programming language that runs on the Java Virtual Machine (JVM). It is short for "Leiningen," which is a build automation and dependency management tool specifically designed for Clojure projects. Lein provides a simple and intuitive way to create, manage, and build Clojure projects without requiring deep knowledge of the JVM or complex build configurations. It allows developers to easily generate new projects with pre-configured templates and provides a standard project structure for Clojure applications. Lein offers a unified interface to handle dependency management, making it effortless to add external libraries and frameworks to Clojure projects. It automatically downloads and manages external dependencies from various repositories, such as Maven Central and Clojars. Lein makes it simple to run and test Clojure code by providing built-in task functions for compiling, running, and testing Clojure projects. It facilitates project automation by allowing developers to define custom tasks, known as Leiningen plugins, to extend functionality. Lein also provides integration with popular development tools, such as Git, Emacs, and IntelliJ, enabling a smooth workflow for Clojure developers. Overall, Lein greatly simplifies the development process for Clojure projects and enhances productivity by automating common tasks and managing dependencies effectively.

List of commands for lein:

  • lein:tldr:1092d lein: Run the project's `-main` function with optional args.
    $ lein run ${args}
    try on your machine
    explain this command
  • lein:tldr:61c04 lein: Start a REPL session either with the project or standalone.
    $ lein repl
    try on your machine
    explain this command
  • lein:tldr:8f1c9 lein: Run the project's tests.
    $ lein test
    try on your machine
    explain this command
  • lein:tldr:9703f lein: Package up the project files and all its dependencies into a jar file.
    $ lein uberjar
    try on your machine
    explain this command
  • lein:tldr:fddb5 lein: Generate scaffolding for a new project based on a template.
    $ lein new ${template_name} ${project_name}
    try on your machine
    explain this command
tool overview