> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raigal.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Authenticate, configure, scan, and apply automated fixes in minutes.

Evaluate a repository and review your code health score in four steps.

**1. 1. Authenticate with your organization**

Log in to connect your local terminal with Raigal Cloud:

```bash theme={null}
npx @methiu/raigal login
```

This opens your browser to approve the session. For headless environments, containers, or CI runners, export your API key instead:

```bash theme={null}
export RAIGAL_TOKEN="rgl_live_your_token_here"
```

> [!NOTE]
>
> New organizations at [app.raigal.dev](https://app.raigal.dev) include a 14-day evaluation trial with access to all six analysis engines.

**2. 2. Initialize project configuration**

Generate a configuration tailored to your repository:

```bash theme={null}
npx @methiu/raigal init
```

The wizard inspects your dependencies and creates:

* `.raigal/config.yml`: score thresholds, engine toggles, and file exclusions.
* `.raigal/rules.yml`: custom severity overrides and architecture rules.
* A CI workflow template for GitHub Actions, GitLab CI, or Bitbucket Pipelines.

**3. 3. Run your first scan**

Run the scan command from your repository root:

```bash theme={null}
npx @methiu/raigal scan .
```

Raigal runs formatting, linting, code quality, AI pattern, architecture, and security checks in parallel and returns a score from 0 to 100:

```text theme={null}
   94 / 100  Healthy       0 errors  ·  1 warning  ·  1 fixable
   12 files  ·  6 engines  ·  48ms

 Top findings
   #  Finding                 Rule                       Status
   1  console.log leftover    ai-slop/console-leftover   warn [auto]
```

To see individual file locations and line numbers, add `-d`:

```bash theme={null}
npx @methiu/raigal scan . -d
```

**4. 4. Apply automated fixes**

Apply safe fixes for formatting, unused imports, and trivial comments:

```bash theme={null}
npx @methiu/raigal fix .
```

To preview changes before writing them to disk, pass `--dry-run`:

```bash theme={null}
npx @methiu/raigal fix . --dry-run
```

For structural issues that require generative refactoring (such as swallowed exceptions or complex type assertions), run `npx @methiu/raigal agent .` to launch an isolated repair session with Claude Code, Cursor, or OpenCode.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.