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 | bashFor more details and setup instructions, see the CLI documentation.
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/climod 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/.
| Platform | Architecture | Artifact |
|---|---|---|
| macOS | Apple Silicon & Intel | moderne-cli-osx |
| Linux | x86-64 | moderne-cli-linux-x64 |
| Linux | ARM64 · aarch64 | moderne-cli-linux-aarch64 |
| Windows | x86-64 | moderne-cli-windows |
| Any | Requires Java 17+ | moderne-cli |
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>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