Skip to content

Grenadine

Pomegranate, with the JVM pressed out.

Grenadine is first a pure Clojure library for resolving and installing Maven, Git, and local dependencies. Its resolver core is portable source used by Glojure and Jolt.

It gives Clojure dialects a shared way to support deps.edn-style dependencies without reimplementing resolution for every runtime.

One resolver, many dialects

The portable grenadine.core library:

  • parses and builds effective POMs;
  • resolves transitive dependency graphs;
  • supports newest, Maven-nearest, and tools.deps mediation;
  • downloads artifacts and verifies checksums;
  • emits deterministic locks; and
  • prepares extracted Clojure source roots for non-JVM runtimes.

The portable API lives in grenadine.core. Small runtime integrations provide filesystem, HTTP, digest, and load-path operations. Dialect-facing facades add familiar add-lib, add-libs, add-deps, and sync-deps entry points.

Get started with the library Read the core API reference

Also a standalone CLI

Grenadine also ships as a native command compiled with Gloat. It is useful when you want to install dependencies from a local or remote deps.edn or literal project.clj by hand, without first running a Clojure dialect or a JVM.

Install the latest release on Bash or Zsh:

source <(curl -sL clojurestar.github.io/grenadine/install)

Or install it with Homebrew on Linux or macOS:

brew install clojurestar/grenadine/grenadine

Use an installed grenadine binary like this:

grenadine --install deps.edn
grenadine --repository=my-m2 --install deps.edn
grenadine --quiet --install deps.edn
grenadine --install --unzip deps.edn
grenadine --loadpath deps.edn
grenadine --list
grenadine --list ~/.m2/repository
grenadine --list deps.edn
grenadine --expand project.clj
grenadine --current
grenadine --current deps.edn
grenadine --install nrepl/bencode 1.1.0 clj-commons/clj-yaml
grenadine --delete nrepl/bencode 1.1.0
grenadine --remove clj-commons/clj-yaml
grenadine --expand org.yamlscript/ys.v0
grenadine -M newest --expand org.yamlscript/ys.v0
grenadine --mediators
grenadine --help
grenadine --version

HTTP and HTTPS URLs are accepted directly, including GitHub blob links:

grenadine --repository=my-m2 --install \
  https://github.com/seancorfield/honeysql/blob/develop/deps.edn

Literal Leiningen projects are accepted through the same operations:

grenadine --expand \
  https://github.com/yaml/yamlscript/blob/main/v0/project.clj

Project code and profiles are not evaluated; see the supported project.clj subset.

The command lists each newly installed dependency immediately, then prints the installed, already-present, and total counts. Quiet mode suppresses non-error output.

For ClojureCLR, install grenadine and cljr with in-1, then let --loadpath perform dependency installation and source extraction:

in-1 grenadine cljr
CLOJURE_LOAD_PATH=$(grenadine --loadpath deps.edn) cljr script.clj

The command prints only the platform-native load path. It treats the Clojure, spec.alpha, and core.specs.alpha artifacts as supplied by ClojureCLR.

Install Grenadine Read the CLI reference

Run without installing

On Bash and Zsh, the current release can be downloaded, verified, and run from a temporary cache without installing it on PATH:

$(source <(curl -sL clojurestar.github.io/grenadine/get)) \
  -X https://github.com/yaml/yamlscript/blob/main/core/deps.edn

PowerShell users can run:

& ([scriptblock]::Create((Invoke-RestMethod https://clojurestar.github.io/grenadine/get.ps1))) `
  -X https://github.com/yaml/yamlscript/blob/main/core/deps.edn

Platforms

Release binaries cover Linux on amd64, arm64, and armv6; macOS and Windows on amd64 and arm64; and FreeBSD, OpenBSD, and NetBSD on amd64 and arm64.

See Installation for the complete platform table and archive instructions.

For source, development instructions, and releases, see the Grenadine repository.

Acknowledgements

Grenadine's portable resolver is generated from pinned source files and portability patches based on the Clojure tools.deps, tools.deps.edn, and tools.gitlibs projects. We gratefully credit the Clojure team and contributors, particularly Alex Miller, and the original Clojure copyright holder Rich Hickey. Maven version semantics adapt code from Apache Maven.

See Provenance and license for exact source revisions, file mappings, licenses, and source-availability information.