1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
|
.\"to render: groff -Tascii -man doc/clojure.1 > clojure.man"
.TH CLOJURE 1 "2019 June 6"
.SH NAME
clj, clojure \- runners to launch Clojure programs
.SH SYNOPSIS
.B clj
[\fBclj-opts\fR] [\fB-Aaliases\fR]
.br
.B clojure
[\fBclj-opts\fR] \fB-X\fR[\fBaliases\fR] \fBmy/fn?\fR [\fBkpath v\fR ...] \fBkv-map?\fR
.br
.B clojure
[\fBclj-opts\fR] \fB-T\fR[\fBname|aliases\fR] \fBmy/fn\fR [\fBkpath v\fR ...] \fBkv-map?\fR
.br
.B clojure
[\fBclj-opts\fR] \fB-M\fR[\fBaliases\fR] [\fBinit-opts\fR] [\fBmain-opts\fR] [\fBargs\fR]
.SH DESCRIPTION
The
.B clojure
tool is a runner for Clojure programs.
.B clj
is a wrapper for
.B clojure
that uses rlwrap to provide a better interactive experience.
Users will typically run
.BR clj .
.SH EXAMPLES
You can launch a Clojure REPL by running
.BR clj .
See the Deps and CLI Guide below for more complex usage.
.SH OPTIONS
The
.B clj
and
.B clojure
scripts can take three types of options, as shown in the
synopsis.
.B clj-opts
are used to build the java-opts and
classpath.
.B init-opts
refer to Clojure code to execute.
.B main-opts
are options to clojure.main.
.SS clj-opts
.TP
.BI \-J opt
Pass opt through in java_opts, ex: -J-Xmx512m
.TP
.BI \-A aliases
Concatenated aliases for REPL execution, ex: -A:dev:mem
.TP
.BI \-X aliases\ \fIfn\fR " " \fIKPATH\fR " " \fIV\fR " "
Exec alias to invoke one or more functions that take a map,
with keypath/value overrides. Function must either be
supplied or be in :exec-fn argmap for alias
.TP
.BI \-M aliases
Exec clojure.main, either from opts in alias or command line
.TP
.BI \-P
Prepare - download libs, cache classpath without executing
.TP
.BI \-Sdeps\ EDN
Deps data to use as the last deps file to be merged
.TP
.BI \-Spath
Compute classpath and echo to stdout only
.TP
.BI \-Stree
Print dependency tree
.TP
.BI \-Scp\ CP
Do NOT compute or cache classpath, use this one instead
.TP
.BI \-Srepro
Ignore the ~/.clojure/deps.edn config file
.TP
.BI \-Sforce
Force recomputation of the classpath (don't use the cache)
.TP
.BI \-Sverbose
Print important path info to console
.TP
.BI \-Sdescribe
Print environment and command parsing info as data
.TP
.BI \-Sthreads\ N
Set specific number of download threads
.TP
.BI \-Strace
Write a trace.edn file that traces deps expansion
.TP
.BI \-\-
Stop parsing dep options and pass remaining arguments to clojure.main
.TP
.BI \-\-version
Write version to stdout and exit
.TP
.BI \-version
Write version to stderr and exit
.SS init-opts
.TP
.BR \-i ", " \-\-init\ \fIpath\fR
Load a file or resource located at \fIpath\fR
.TP
.BR \-e ", " \-\-eval\ \fIstring\fR
Eval exprs in \fIstring\fR; print non-nil values
.TP
.BR \-\-report\ \fItarget\fR
Report uncaught exception to \fItarget\fR: "file" (default), "stderr", or "none", overrides System property clojure.main.report
.SS main-opts
.TP
.BR \-m ", " \-\-main\ \fIns-name \fR
Call the -main function from namespace w/args
.TP
.BR \-r ", " \-\-repl
Run a repl
.TP
.I path
Run a script from a file or resource located at \fIpath\fR
.TP
.B \-
Run a script from standard input
.TP
.BR \-h ", " \-? ", " \-\-help
Print this help message and exit
.SH CONFIGURATION
This script reads configuration from
.B deps.edn
files. It will check against
.B deps.edn
files in the system root location, the user
configuration directory (usually
.BR ~/.clojure ),
and the local directory. Files in each of these locations, if
they exist, are merged to form one combined configuration
file. The last specified configuration file's options
overwrites any earlier files (e.g. local configs take
priority).
.SH SEE ALSO
.IP https://clojure.org/guides/deps_and_cli
Deps and CLI Guide
.IP https://clojure.org/reference/deps_edn
deps.edn Reference
.IP https://clojure.org/reference/clojure_cli
Clojure CLI Reference
.IP https://clojure.org/reference/repl_and_main
REPL and Main Entrypoints
.IP https://clojure.org/releases/tools
Release history and changelog
.SH BUGS
File issues at
https://ask.clojure.org under category Libs / tools.deps.
.SH AUTHORS
clojure and clj are maintained by Alex Miller <alex.miller@cognitect.com>.
This man page was written by Elana Hashman <ehashman@debian.org>.
.SH COPYRIGHT
Copyright \(co Rich Hickey, Alex Miller and contributors.
Distributed under the Eclipse Public License 1.0, the same as
Clojure.
|