# Getting started

Track dependency trust in your repository and analyze your own source code. Install Lafke, scan a project, and record your first trust decisions.

> **Your code stays on your machine.**
> Analysis runs locally. Your source code is never uploaded.

## Install Lafke

The installer supports macOS and Linux on amd64 and arm64.

### Before you install

Install the [GitHub CLI](https://cli.github.com) and sign in with `gh auth login`. Attestation verification requires an authenticated GitHub CLI; without it, the installer stops.

```sh
curl -fsSL https://lafke.sh/install | sh
```

The installer checks the download's SHA-256 and GitHub attestation, and installs Lafke with its source-code analysis engine.

Lafke is installed to `/usr/local/bin`, or `~/.local/bin` if that directory is not writable. Set `INSTALL_DIR` to choose another location.

Using Windows? Download a ZIP from [GitHub Releases](https://github.com/lafke/lafke/releases).

## Run your first scan

Open a terminal in your project directory and generate a dependency trust report.

```sh
lafke scan .
```

The `scan`, `lock`, and `verify` commands work without the source-code analysis engine.

## Record trust decisions

Save your dependency trust decisions in `lafke.lock`, then verify that the recorded state has not drifted.

### Record decisions

```sh
lafke lock .
```

### Check for drift

```sh
lafke verify .
```

Use `verify` in CI to fail when dependency trust state drifts. Commit `lafke.lock` alongside your project so those decisions stay in your repository.

## Next steps

- [Commands](/docs/commands): Explore audit, sast, security, and other commands.
- [Trust model](/docs/trust-model): Understand how Lafke records dependency trust.
