clojure.tools.tools.api

This api provides functions that can be executed from the Clojure tools using -Ttools.

install

(install {:keys [as], :as args})
Install a tool under a local tool name for later use. On install, the tool is procured, and
persisted with the tool name for later use.

Options:
  lib-name (required) - value is coord map (git coords may omit sha)
  :as (required) - tool name

Example:
  clj -Ttools install io.github.clojure/tools.deps.graph '{:git/tag "v1.0.63"}' :as deps-graph

Also see:
  clj -X:deps find-versions :lib <lib>

install-latest

(install-latest args)
Install the latest version of a tool under a local tool name for later use.
On install, the tool is procured, and persisted with the tool name for later use.
Either :tool or both :lib and :as are required to install a single tool.
If neither is provided, install the newest version of all tools.

The latest version is determined by listing the versions in semver order,
filtering out versions with special strings, and choosing the last one.
Special strings that cause a version to be ignored are:
    alpha a beta b miletone m rc cr snapshot

It is recommended that Maven tool releases use Maven release version
conventions, and that git tool releases use tags in the format "vA.B.C".

Options:
  :tool tool-name - currently installed tool
  :lib lib-name - mvn lib or git lib with inferrable url
  :as - tool name

Example:
  clj -Ttools install-latest :lib io.github.clojure/tools.deps.graph :as deps-graph
  clj -Ttools install-latest :tool tools

Also see:
  clj -X:deps find-versions :lib <lib>
  clj -Ttools install <lib> <coord> :as tool-name

list

(list _)
List available tools.

Options:
  none

Example:
  clj -Ttools list

remove

(remove {:keys [tool], :as args})
Remove :tool, if it exists.

Options:
  :tool (required) - tool name to remove

show

(show {:keys [tool], :as args})
Print info and usage for this :tool.

Options:
  :tool (required) - tool name to show

Example:
  clj -Ttools show deps-graph