Getting started
Copy MarkdownGetting started
Preflight is a command-line tool that scans your codebase for launch readiness. It finds missing configuration, broken integrations, security gaps, SEO metadata that isn’t there, and the other mistakes that are easy to ship and embarrassing to find in production.
It runs on your machine or in CI. Your code never leaves it, and you don’t need an account.
Install
Pick whichever fits your machine:
Homebrew
brew install preflightsh/preflight/preflightnpm
npm install -g @preflightsh/preflightGo
go install github.com/preflightsh/preflight@latestDocker
docker pull ghcr.io/preflightsh/preflightcurl
curl -fsSL https://preflight.sh/install.sh | shOr download a binary for your platform from GitHub Releases. Each archive carries signed build provenance, so you can check that a download was built by the project’s release workflow:
gh attestation verify preflight_<version>_<os>_<arch>.tar.gz --repo preflightsh/preflightSet up a project
Run preflight init in your project’s root. It detects your stack and the services you use, asks for your staging and production URLs, and writes what it learned to preflight.yml.
cd your-project
preflight initinit asks questions, so it needs a terminal. In a script or a CI job, pass --yes to accept the detected defaults; without it, init stops and writes nothing when its input ends before the questions do. It asks before replacing an existing preflight.yml, and --force skips that question.
Commit preflight.yml. Everyone on the project, and your CI, then scans with the same settings. Configuration covers every key in it.
Run a scan
preflight scanEach check prints one line: ✓ OK, ⚠ WARN, or ✗ FAIL, followed by what it found and how to fix it. A check with nothing to verify, such as a network check with no URL, is counted as skipped, never as passed. The last line says whether the project is ready to launch. A scan that finds only warnings exits 1, and one that finds an error exits 2, so a CI step fails exactly when it should. Scanning has every flag and exit code.
Where next
- Checks: what each check looks for, and its ID.
- Ignoring checks: silence a check that doesn’t apply, or allow one known secret.
- CI: run Preflight on every pull request.
- Agent skill: let your coding agent run scans and fix what they find.
- Dashboard: keep a history of runs and get AI fix suggestions.
Questions and false positives
Preflight tries hard to be right, but a check can misread an unusual project. If one does, or you have a question, write to us or open an issue on GitHub.