id = "leiningen" name = "Leiningen" homepage = "https://leiningen.org" description = "Automating Clojure projects without setting your hair on fire." # The apple-touch-icon from leiningen.org. icon = "https://leiningen.org/img/favicon/apple-touch-icon.png" executables = ["lein"] [dotfiles] # doc/PROFILES.md, "Declaring Profiles": profiles that should apply to every # project go in "~/.lein/profiles.clj. These will be available in all # projects", and the same section describes ~/.lein/profiles.d, a directory of # one file per profile ("The semantics within such files differ slightly ... # declaring a user-wide profile in both ~/.lein/profiles.clj and in # ~/.lein/profiles.d is considered an error"). # # ~/.lein is a directory Leiningen hard-codes in the home directory — the lein # script and the docs name it literally, with no XDG or %APPDATA% spelling — so # it is written as a plain `~/` path. paths = [ "~/.lein/profiles.clj", "~/.lein/profiles.d/", ] # doc/DEPLOY.md, "GPG": ":creds :gpg" makes Leiningen "decrypt # ~/.lein/credentials.clj.gpg and use that to find the credentials", and the # instructions above it have the user "write your credentials map to # ~/.lein/credentials.clj" and then encrypt it ("Remember to delete the # plaintext credentials.clj once you've encrypted it"). Both spellings are # listed: the plaintext one is only supposed to be a step on the way, but a # machine that skipped the last step still has it, and either file is a # repository username and password end to end. secret = [ "~/.lein/credentials.clj.gpg", "~/.lein/credentials.clj", ] # No machine_lines, and one thing a consumer should know instead: DEPLOY.md's # "Full-disk Encryption" section documents an :auth profile inside # profiles.clj itself, holding :repository-auth with a plain :username and # :password. That is a credential inside a file worth syncing, but profiles.clj # is EDN and `match` only understands line-oriented files, TOML, YAML and JSON, # so it cannot be written as a secret_paths rule here. A consumer that scans # content will still catch it. [commands] format = 1 label = "Run a Leiningen task" description = "Run a lein task such as test, repl, uberjar or new, optionally offline or forcing snapshot updates. Task-specific options are typed as plain arguments." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false } [[commands.source]] id = "man" kind = "manual" url = "https://manpages.debian.org/unstable/leiningen/lein.1.en.html" revision = "2.11.2" evidence = """ lein [-o] [-U] [TASK [ARGS]] lein new NAME lein test [TESTS] lein repl lein uberjar lein install lein deploy [REPOSITORY] lein clean lein deps lein run -o Run a task offline. -U Run a task after forcing update of snapshots. """ [[commands.field]] id = "offline" label = "Offline" description = "Run the task offline." type = "boolean" option = ["-o"] sources = ["man"] [[commands.field]] id = "update_snapshots" label = "Force snapshot update" type = "boolean" option = ["-U"] sources = ["man"] [[commands.field]] id = "task" label = "Task" type = "string" position = 0 suggestions = [{ value = "new", label = "New project" }, { value = "test", label = "Run tests" }, { value = "repl", label = "REPL" }, { value = "uberjar", label = "Build standalone jar" }, { value = "install", label = "Install locally" }, { value = "deploy", label = "Deploy" }, { value = "clean", label = "Clean target" }, { value = "deps", label = "Download dependencies" }, { value = "run", label = "Run -main" }] sources = ["man"] [[commands.field]] id = "args" label = "Task arguments" description = "For example a project name for new, or test namespaces for test." type = "string" position = 1 multiple = true sources = ["man"] [[commands.task]] id = "run_tests" label = "Run tests" fields = ["task", "args", "offline"] required = ["task"] set = { task = ["test"] } [[commands.task]] id = "new_project" label = "Create a project" fields = ["task", "args"] required = ["task", "args"] set = { task = ["new"] } [[commands.task]] id = "build_uberjar" label = "Build uberjar" fields = ["task", "offline", "update_snapshots"] required = ["task"] set = { task = ["uberjar"] } [[commands.group]] id = "basic" label = "Basic" fields = ["task", "args"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["offline", "update_snapshots"]