Skip to content

Installation

codelens ships as two artifacts that travel together: the codelens CLI binary and the codelens-server-all.jar server. The server runs on a JDK 21+, which you provide.

brew tap charliek/tap
brew install codelens

This installs the codelens binary and the server JAR. The CLI finds the JAR automatically (it sits next to the binary — see Server & JAR Discovery).

Provide a JDK 21+

The server needs a JDK 21 or newer at runtime. codelens auto-discovers JDKs from SDKMAN and Homebrew and runs the server on the newest it finds in the supported range (21–25). Install one if you don't have it:

curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.9-amzn
brew install openjdk@21

If you prefer to point at a specific JDK, set CODELENS_JAVA_HOME (or JAVA_HOME) to a JDK 21+ home. See JDK Resolution for the full resolution order and the floor/ceiling rules.

Analyzing a target project may need its own JDK

The server JVM runs codelens itself. A target project built with an older Gradle may additionally need its own JDK to resolve the classpath; codelens auto-discovers that too. See JDK Resolution.

Verify

codelens version

Install the skills

codelens publishes four agent skills — JVM analysis, source lookup, Kotlin linting, and Ratpack migration analysis — that drive the codelens CLI for you. Install the CLI (above) first; the skills shell out to it.

Installs into Claude Code, GitHub Copilot, OpenCode, and many other agents, auto-detecting the ones you have:

npx skills add charliek/codelens

A native alternative that namespaces the skills as codelens:<name>:

/plugin marketplace add charliek/codelens
/plugin install codelens@codelens

What the skills do — composing the general primitives into framework-specific analysis — is covered in Framework Analysis.

Manual / standalone install

You don't need Homebrew. Put the codelens binary on your PATH and make the server JAR discoverable in one of these ways:

Method How
Alongside the binary Place codelens-server-all.jar in ../libexec/ relative to the binary
Home directory Place it at ~/.codelens/codelens-server-all.jar
Environment variable export CODELENS_SERVER_JAR=/path/to/codelens-server-all.jar

Download both from the GitHub releases. The full priority order is documented in Server & JAR Discovery.

From source

See Development → Setup to build the CLI and server from a checkout.