Cellar
Look up the public API of any JVM dependency from the terminal.
When a coding agent needs to call an unfamiliar library method, its options are bad: parse HTML docs (expensive, unreliable), find source on GitHub (requires knowing the URL), or hallucinate the API.
Cellar gives agents — and humans — a single shell command that returns exactly the type signatures, members, and docs needed to write correct code. Output is plain Markdown on stdout, ready to be injected into an LLM prompt with zero post-processing.
Supported artifacts
| Format | Support |
|---|
| Scala 3 (TASTy) | Full — signatures, flags, companions, sealed hierarchies, givens, extensions, docstrings; default values from the -sources.jar |
| Scala 2 (pickles) | Good — signatures, members; default values, docstrings and source positions from the -sources.jar |
| Java (.class) | Good — signatures, members; parameter names and Javadoc from the -sources.jar when the classfile lacks them |
Installation
Coursier (recommended)
If you have Coursier installed:
cs install --contrib cellar
This pulls the GraalVM native binary for your platform from the latest GitHub Release. Update with cs update cellar.
Nix
Run without installing:
nix run github:VirtusLab/cellar -- get-external org.typelevel:cats-core_3:2.10.0 cats.Monad
Install into your profile:
nix profile install github:VirtusLab/cellar
A Nix overlay is also available at github:VirtusLab/cellar#overlays.default.
Manual
Download the native binary for your platform from https://github.com/VirtusLab/cellar/releases/latest, then extract and install:
tar xz -f cellar-*.tar.gz
sudo mv cellar /usr/local/bin/
To verify checksums and signatures, see RELEASING.md.
Development snapshots
Unstable builds of the latest development code are published as snapshot-<sha>-<run> prereleases. Each run publishes a fresh, immutable prerelease and prunes the previous one, so there is always exactly one snapshot. Because immutable releases require a unique tag per build, download URLs are no longer static — resolve the newest snapshot with gh:
# Latest snapshot tag (requires the GitHub CLI, `gh`)
TAG=$(gh release list --repo VirtusLab/cellar --limit 100 --json tagName \
--jq 'map(.tagName | select(startswith("snapshot-"))) | first')
# Linux x86_64 (also: linux-aarch64, macos-arm64, macos-x86_64)
gh release download "$TAG" --repo VirtusLab/cellar --pattern 'cellar-linux-x86_64.tar.gz' --output - | tar xz
sudo mv cellar /usr/local/bin/
Snapshots are not published to Maven Central and are not picked up by cs install. See RELEASING.md for how they are produced.
Updates
Once a day cellar asks GitHub for the latest release (a single request to github.com/VirtusLab/cellar/releases/latest; nothing about you or your usage is sent). If a newer version exists, it prints the matching upgrade command (cs update cellar, nix profile upgrade cellar, or the download link) to stderr. Disable with update-check.enabled = false or CELLAR_UPDATE_CHECK_ENABLED=false; it never runs when CI is set.
Quick start
# Look up a trait from cats
cellar get-external org.typelevel:cats-core_3:2.10.0 cats.Monad
# Look up a symbol from the current project
cellar get --module core cats.Monad
# List top-level symbols in a package
cellar list-external org.typelevel:cats-core_3:2.10.0 cats
# Search for a method name
cellar search-external org.typelevel:cats-core_3:2.10.0 flatMap
# View source code
cellar get-source org.typelevel:cats-core_3:2.10.0 cats.Monad
# Dependency tree
cellar deps org.typelevel:cats-effect_3:3.5.4
Commands
Cellar has two modes: project-aware commands that work against your current project's classpath, and external commands that query arbitrary Maven coordinates.
Project-aware commands
Run from your project root. Cellar auto-detects the build tool (Mill, sbt, or scala-cli), extracts the classpath, and queries your project's code and all its dependencies.
cellar get [--module <name>] <fqn>
cellar list [--module <name>] <package>
cellar search [--module <name>] <query>
- Mill / sbt:
--module is required (e.g. --module lib, --module core)
- scala-cli:
--module is not supported — omit it
Add --test to query the test-scope classpath (test dependencies and test sources):
- sbt: resolves
<module>/Test/fullClasspath
- scala-cli: compiles with
--test
- Mill: not supported — test code is a separate module, query it directly (e.g.
--module foo.test)
The classpath is cached after the first run. Use --no-cache to force re-extraction.