Install the CLI

The Moderne CLI (mod) runs OpenRewrite recipes and compiler-accurate code search on your machine or in CI, against your own repositories or the public Code Genome corpus. One command to install.

Open Terminal and run:

curl https://app.moderne.io/cli | bash

For more details and setup instructions, see the CLI documentation.

Free to get started on open source code. Installing the CLI and searching the public Code Genome corpus needs no sign-in. A repository token is required when you want mod to resolve recipes and artifacts from the packages repository.

Inspect the script first

Piping a script straight into your shell? Read it first. Each installer lives at a stable URL you can open in a browser or curl on its own before running it:

https://app.moderne.io/cli
Open app.moderne.io/cli to review exactly what runs. The script detects your OS and architecture, downloads the matching mod binary, and puts it on your PATH, with no privileges beyond your own shell.

Direct downloads

Prefer to grab a specific build for a CI image, an air-gapped install, or a pinned version? Every platform binary is published to the public artifact repository. Browse them at artifacts.codegenomeproject.org/maven/io/moderne/.

PlatformArchitectureArtifact
macOSApple Silicon & Intelmoderne-cli-osx
Linuxx86-64moderne-cli-linux-x64
LinuxARM64 · aarch64moderne-cli-linux-aarch64
Windowsx86-64moderne-cli-windows
Any (JVM)Requires Java 17+moderne-cli.jar

The one-line installer above resolves the right one automatically. This table is for when you want to pick it yourself.

Recipes & enterprise setup

Add the recipe repository

Recipes resolve from the token-gated artifact repository: both open source (all of the OpenRewrite and Moderne OSS recipes) and licensed (MSAL & proprietary). Point mod at it with your repository token. This is the only step that needs credentials:

mod config recipes artifacts maven add https://artifacts.codegenomeproject.org/maven --user=<email> --password=<token>
Don't hand-fill this. Get it filled in for you — email and token already in place — alongside the matching Maven, Gradle, and MCP configs.

Enterprise tenants

Enterprise customers can install the CLI from their own tenant instead. The install command is served per tenant and delivers a custom mod wrapper that comes pre-configured for the connector and repositories their organization uses, so the CLI lands fully set up with no manual configuration. See configuring the CLI to work with internal tools for details.

Verify the install

Confirm the CLI is on your PATH and print its version:

mod --version