README.markdown

DEPRECATED

This plugin is now deprecated in favor of the built-in run task in Leiningen
1.4 and later. The built-in run task is a subset of the lein-run plugin with
some undesired functionality removed.

lein-run Leiningen Plugin

A leiningen plugin to call a function in a new process or run a .clj file.

lein-run is extremely useful when you want to launch long-running
Clojure process from the command line. For example, it can be used to
start a server (a web server like Compojure) or to start a process
that will run in an infinite loop (a process waiting for messages from
a message queue, a twitter client etc.)

Setup

lein-run is available from clojars.
Just add it as a dependency in your project.clj and you're good to
go. Refer the clojars page for the
latest version to use.

:dev-dependencies [[lein-run "1.0.0"]]

Usage

lein run <file> [<arg> ...]

file must be a path relative to the project root. It will be run
using clojure.main/main. Args will be passed on as *command-line-args*.

lein run <namespace> [<function> [<arg> ...]]

If function is not given, it defaults to -main. Calls
namespace/function passing it all the args.

lein run <alias> [<arg> ...]

Aliases for running a file or calling a function can be defined in
project.clj and referred to here. Args from the command line are
appended to args from the alias definition.