Installation

There are three ways to use Lemma. Pick the one that fits your workflow.

LemmaBase.com

No installation needed. Create an account, create a repository, and start writing specs in the browser. The Consult tab lets you test your rules before publishing.

CLI via Cargo

If you have Rust installed, install the Lemma CLI with Cargo:

cargo install lemma-cli

Verify it works:

lemma --version

CLI via npm

If you're working in a JavaScript project:

npm install -g lemma-cli

Editor extension

The Lemma Language extension adds syntax highlighting, inline diagnostics, and formatter support for .lemma files.

Install it from the marketplace in VS Code, Cursor, or any editor that supports VS Code extensions. Search for Lemma Language by lemma.

The extension connects to the Lemma LSP server. If you installed the CLI, it picks up the binary from your $PATH automatically. You can override the path in the extension settings under lemma.lspServerPath.

Ready

That's all the setup there is. Head to Your First Spec to write some rules.