id = "clojure" name = "Clojure CLI" homepage = "https://clojure.org/reference/clojure_cli" description = "Command line tools to run a Clojure REPL or program and manage dependencies declared in deps.edn." icon = "theSVG:clojure" executables = ["clojure"] [dotfiles] # https://clojure.org/reference/clojure_cli — for the config directory: "If # $CLJ_CONFIG is set, use that path. If $XDG_CONFIG_HOME is set, use # $XDG_CONFIG_HOME/clojure ([configHome]/clojure). Else use $HOME/.clojure". # The same page: "the following files will be copied to it: deps.edn - the # default user deps.edn …, tools/tools.edn - the built-in tool 'tools' for # managing tools". paths = [ "~/.clojure/deps.edn", "~/.clojure/tools/", "[configHome]/clojure/deps.edn", "[configHome]/clojure/tools/", ] # Same page: the classpath cache is ".cpcache in the config directory" when the # project directory cannot hold it. exclude = [ "~/.clojure/.cpcache/", "[configHome]/clojure/.cpcache/", ] secret = [] # Read on every `clojure` invocation; there is no daemon. side_effect = false # No machine_lines: user deps.edn holds aliases, extra dependencies and # :mvn/repos, which are exactly what a developer wants on every machine. EDN is # not a format a rule can name anyway. [commands] format = 1 label = "Run Clojure" description = "Evaluate an expression, run a namespace's -main, or start a REPL with the Clojure CLI. Aliases, -X/-T function invocation and -S dependency flags are left out." quality = "ai-draft" base = "fig:clojure" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/clojure.ts" license = "MIT" [[commands.field]] id = "eval" label = "Expression" description = "Evaluate expressions in this string and print non-nil values." type = "string" option = ["--eval", "-e"] sources = ["fig"] [[commands.field]] id = "main" label = "Main namespace" description = "Call the -main function of this namespace." type = "string" option = ["--main", "-m"] sources = ["fig"] [[commands.field]] id = "init" label = "Init file" description = "Load a file or resource before running." type = "path" option = ["--init", "-i"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "repl" label = "Run a REPL" type = "boolean" option = ["--repl", "-r"] sources = ["fig"] [[commands.field]] id = "prepare" label = "Prepare deps only" description = "Download libs and cache the classpath without executing." type = "boolean" option = ["-P"] sources = ["fig"] [[commands.field]] id = "classpath_only" label = "Print classpath" type = "boolean" option = ["-Spath"] sources = ["fig"] [[commands.field]] id = "tree" label = "Print dependency tree" type = "boolean" option = ["-Stree"] sources = ["fig"] [[commands.field]] id = "force" label = "Force classpath recomputation" type = "boolean" option = ["-Sforce"] sources = ["fig"] [[commands.task]] id = "repl" label = "Start a REPL" set = { repl = [true] } fields = ["repl", "init"] required = [] [[commands.task]] id = "eval" label = "Evaluate an expression" fields = ["eval", "init"] required = ["eval"] [[commands.task]] id = "main" label = "Run a namespace" fields = ["main"] required = ["main"] [[commands.group]] id = "basic" label = "Basic" fields = ["eval", "main", "init", "repl"] [[commands.group]] id = "advanced" label = "Dependencies" fields = ["prepare", "classpath_only", "tree", "force"]