Skip to main content

Quickstart

Get up and running with RML in just a few steps. This guide will show you how to install RML and run your first analysis as quickly as possible.

Example

This quickstart will show you how to install RML and run your first analysis as quickly as possible. Below is the sort of output you can expect from RML when it finds an issue in your code:

$ rml path/to/your/file.py
─────────────────────────────────────────────────────────────────────────────────────────
@@ -61,6 +61,7 @@
async def lifespan(app: FastAPI):
db_manager.initialize()
+ db_manager.close()
redis_client.connect()
─────────────────────────────────────────────────────────────────────────────────────────

Found 1 issue in 1 file
Premature database connection close in FastAPI lifespan event ...

1. Install RML

RML can be installed on Linux and macOS. Choose the method that works best for your environment:

For the sake of this quickstart, we will use macOS as an example. If you are using a different operating system, please refer to the appropriate installation guide.

Open your terminal and run the following command:

curl install.recurse.ml | sh

2. Navigate to Your Git Repository

RML only works inside of Git repositories. To begin, navigate to your project directory:

cd path/to/your/project

3. Run RML

Once inside the repository, modify a file and run:

rml path/to/your/file.js

By default rml analyzes unstaged changes (i.e. the ones displayed by git diff without any arguments).

4. Optional: Configure Custom Rules

Want to enforce project-specific conventions? You can create custom rules to check for coding standards, naming patterns, or highlight sensitive areas that need extra attention.

To get started with custom rules, see the Rules documentation.

🎉 That's it! You're now ready to start using RML to catch bugs early in your development process.