# Getting started

> Install quality and run the first repository check.

## Install a native release

On macOS or Linux:

```bash
curl --proto '=https' --tlsv1.2 -fsSL \
  https://raw.githubusercontent.com/santi020k/quality/v2.1.0/install.sh \
  | sh -s -- santi020k/quality v2.1.0
```

Install from a local checkout when developing the CLI itself:

```bash
cargo install --path crates/quality-cli
```

The release includes checksum-protected archives for x86-64 and ARM64 Linux,
Apple Silicon and Intel macOS, and x86-64 Windows.

Quality 2 and newer support an optional `.quality-version` in the project root.
Install the required release, then write its version without a leading `v`:

```text
2.0.0
```

When the active CLI differs, Quality stops before executing project commands.
It prints the checksum-verified installation command on macOS and Linux and the
matching archive and checksum location on Windows. Older binaries ignore this
file. A nested project selected with `--root` needs its own pin.

## Initialize a repository

Run these commands from the repository you want to check:

```bash
quality init
quality doctor
quality check
```

To bootstrap analyzer configuration as well as `quality.yml`, apply the
balanced preset:

```bash
quality preset apply recommended --dry-run
quality preset apply recommended --install
quality preset diff
quality doctor
quality check
```

Use `minimal` for essential checks or `strict` for tighter limits and
warning-free policies. Presets generate ordinary ecosystem configuration
files; checks remain deterministic and use repository-local tools.
The generated `.quality-preset.json` lets future releases safely preview and
apply catalog upgrades with `quality preset update`.

Preview the generated policy without writing a file with `quality init
--dry-run`.

`quality init` creates a minimal `quality.yml`. ESLint, Prettier, SwiftLint,
and SwiftFormat require evidence that the repository intends to use them, such
as configuration, a dependency, or a package script; language files alone do
not enable them.

If the root package already exposes `verify:quality`, `verify`, `validate`,
`check`, `pre-push`, or `prepush`, initialization preserves that canonical gate as a repository task.
Detected analyzers remain available for formatting and fixes without repeating
their checks alongside the canonical script.

When there is no composite gate, a root `typecheck` or `type-check` script is
imported as a change-aware task so existing workspace and Turborepo behavior is
preserved.

`quality doctor` explains which tools are enabled, where each executable resolves, and which required dependencies are missing.

## Check only your changes

For a quick local loop:

```bash
quality check --changed
```

To compare a branch with its base:

```bash
quality check --changed origin/main
```

File-capable tools receive relevant paths. Project analyzers such as Android Lint continue to run at project scope when Android files change.

## Next steps

- Explore [language-aware presets](/presets/) for your repository.
- Review [configuration](/configuration/) options.
- Add [GitHub Actions](/github-actions/) annotations and SARIF.
- Use a [baseline](/changed-files-and-baselines/) for an existing codebase.
