fleetlint Policy for a fleet of repositories
v0.3
Getting started

Getting started

Install

brew install fleetlint/tap/fleetlint                    # macOS, Linux
scoop bucket add fleetlint https://github.com/fleetlint/scoop-bucket
scoop install fleetlint/fleetlint                       # Windows
nix profile install github:fleetlint/nur#fleetlint     # Nix
mise use github:fleetlint/fleetlint                     # mise
curl -fsSL https://raw.githubusercontent.com/fleetlint/fleetlint/main/scripts/install.sh | sh   # to ~/.local/bin
go install github.com/fleetlint/fleetlint/cmd/fleetlint@latest

The container image runs on a checkout mounted at /repo:

docker run --rm -v "$PWD:/repo" ghcr.io/fleetlint/fleetlint check

Every release carries archives for Linux, macOS and Windows, .deb, .rpm, .apk and Arch packages, checksums.txt, a cosign signature bundle for it and one SBOM per archive and package; the release notes show the cosign verify-blob command. The install script checks the archive against checksums.txt and, when cosign is installed, verifies the signature first; FLEETLINT_VERIFY=cosign makes the signature required. The image is signed with cosign too.

fleetlint version prints the version of the tool and of the catalog built into it; fleetlint catalog version shows the catalog version the current repository runs with.

Check a repository

cd your-repo
fleetlint

With no configuration fleetlint discovers the stacks, the forge, the task runner, nested projects and whether a dev container is used, and applies the recommended preset. The report lists each finding with what to do about it; findings marked * are the ones fleetlint fix can repair. The last line names the fleetlint and catalog versions that produced it.

Exit codes: 0 clean, 1 findings at or above --fail-on (default error), 2 configuration error, 3 internal error.

fleetlint facts                       # what was discovered, and where each value came from
fleetlint explain taskrunner/targets  # one rule in full: requirement, rationale, fix

Write the configuration

fleetlint init

writes a .fleetlint.yaml that extends the recommended preset, with what was discovered as a comment. On GitHub or Gitea it asks the forge once whether the repository is public and records the answer, because some rules apply to public repositories only. Nothing else is pinned: facts are detected again on every run.

A repository without a remote and without releases is treated as an experiment (tier 3), which is asked for very little. Say what it is with fleetlint init --tier 1 (production or public) or --tier 2 (a tool you rely on).

Fix what can be fixed

fleetlint fix             # dry run: what it would create, untrack or edit
fleetlint fix --apply

fix creates missing files from templates (editor settings, hook configuration, a task runner file, a check workflow, linter configuration), untracks files that should not be in git, and adds values to existing manifests. It never overwrites a file and never changes a key that is already set. What it writes belongs to your repository: edit it freely; the rules check what the files achieve, not that they match a template.

The rest needs a person or a coding agent:

fleetlint check --format agent   # an ordered task list with a precise instruction per rule

Existing repositories with many findings

fleetlint baseline

records today’s findings so that only new ones fail from now on. See configuration.

Keep it running

fix wires fleetlint into what it writes: a git hook, the task runner’s check target and the check workflow. For an existing setup see integrations.

Many repositories

fleetlint fleet ~/src/*                   # paths
fleetlint fleet --from github:your-org    # or every repository of an owner

writes one report for all of them. See fleet mode.