<!-- Canonical page: https://docs.radforge.dev/quickstart/ -->

# Quickstart

Set up a repository and run mutation tests against its current Git changes.

## Prepare the repository

From the repository root, preview and apply the setup changes. Then check the repository:

```bash
rad init --dry-run
rad init
rad doctor
```

`rad init` detects supported TypeScript and Python setups. It can propose missing test dependencies, add `.radforge/` to `.gitignore`, and install the Radforge coding-agent skill for the repository, your user account, or both. The first command previews every change.

## Authenticate the CLI

Set the hosted credentials from Radforge onboarding, then verify access:

```bash
export RADFORGE_REMOTE_URL="https://api.radforge.dev"
export RADFORGE_API_TOKEN="your-repository-scoped-token"
rad remote doctor
```

Store the token in your shell or CI secret store. Do not put it in shell history, repository files, CI logs, or command arguments.

## Test the current changes

Compare the current branch with your main branch:

```bash
rad changed --since-ref origin/main
```

The command submits the plan and prints a run ID. Use `rad remote status --run <run-id>` until the run completes, fails, or is canceled. Then read its findings with `rad remote findings --run <run-id>`.

## Review a plan before submission

Write the plan to a file, inspect it, then submit it:

```bash
rad changed --since-ref origin/main --dry-run --json > plan.json
rad remote run --artifact plan.json
```

## Limit the run

If the plan contains too many mutations, set `--budget`, add one or more `--exclude` patterns, or use a scope file that lists exact source paths. Use `--allow-broad-tests` only when you accept running a broad test set because Radforge could not select a smaller one.
