Metadata-Version: 2.4
Name: sprawl-guard
Version: 0.7.0
Summary: Repository sprawl checker CLI.
License-Expression: MIT OR Apache-2.0
License-File: LICENSE-APACHE
License-File: LICENSE-MIT
Project-URL: Documentation, https://kpozin.github.io/sprawl-guard/
Project-URL: Source, https://github.com/kpozin/sprawl-guard
Project-URL: Issues, https://github.com/kpozin/sprawl-guard/issues
Project-URL: Changelog, https://github.com/kpozin/sprawl-guard/blob/main/CHANGELOG.md
Description-Content-Type: text/markdown

# sprawl-guard

`sprawl-guard` checks that source files stay short and directories stay small. It records existing
violations in a ratchet file so they can shrink but not grow.

Every language bundled with [Tokei](https://github.com/XAMPPRocky/tokei) is enabled by default.
Sprawl Guard counts the lines in each file and the source files directly inside each directory.

## Install

Add the CLI to a uv project. `pip install sprawl-guard` and `uvx sprawl-guard` work too:

```sh
uv add --dev sprawl-guard
```

## Quick start

From the repository root:

```sh
uv run sprawl-guard init --write
uv run sprawl-guard check
```

`init --write` creates `sprawl-guard.toml`. Run `init` without `--write` to preview it first. A
passing check prints:

```text
Configuration: sprawl-guard.toml

No sprawl-guard violations found.
Checked 2 source files in 2 directories across 2 languages.
```

If an existing repository exceeds the limits you want, keep the limits and
[record the current violations in the ratchet file](https://kpozin.github.io/sprawl-guard/quick-start/#record-existing-violations).

## Documentation

- [Get started](https://kpozin.github.io/sprawl-guard/quick-start/)
- [Configure checks](https://kpozin.github.io/sprawl-guard/configure-checks/)
- [Run in CI](https://kpozin.github.io/sprawl-guard/run-in-ci/)
- [Work with the ratchet](https://kpozin.github.io/sprawl-guard/ratchet/)
- [Agent skill for coding agents](https://github.com/kpozin/sprawl-guard/blob/main/skills/sprawl-guard/SKILL.md)
  and [how to install it](https://kpozin.github.io/sprawl-guard/ratchet/#guide-coding-agents)
- [CLI and output reference](https://kpozin.github.io/sprawl-guard/reference/cli-and-output/)
- [Source and issue tracker](https://github.com/kpozin/sprawl-guard)
