Getting started
This is for self-hosting: you build or download stylist and run it
yourself. If someone else already runs it for you and gave you an API
URL and a token, see Getting started
(hosted) instead.
Install
Section titled “Install”Build from source (Go 1.26+):
make build # → dist/stylistOr cross-compile release binaries for every platform:
make release # darwin/linux/windows × amd64/arm64 in dist/stylist is a single static binary with no runtime dependencies.
Your first check
Section titled “Your first check”Create a ruleset (see Rulesets for the full schema):
id: acme-brand-v1colors: allowed: ["#1A2B3C", "#FFFFFF"]fonts: allowed: [Inter, Georgia]terms: banned: - term: cheap reason: use "affordable" required: - term: ACMECheck a file:
stylist check -ruleset rules/brand.yaml page.htmlFAIL page.html (ruleset: acme-brand-v1) page.html:5 [colors] color #ff4136 is not in the allowed brand palette page.html:10 [terms] banned term "cheap" found: use "affordable"Exit codes are CI-friendly: 0 pass, 1 violations, 2 error.
Wire it into a repo
Section titled “Wire it into a repo”Add a project config so nobody needs flags:
# .stylist.yaml (repo root, checked in)ruleset: rules/brand.yamlInstall the pre-commit hook:
stylist hook installCommits that stage HTML violating the ruleset are now blocked, with the violation list printed. If the repo already has violations, accept them as tracked debt first. See Baselines:
stylist baselineNext steps
Section titled “Next steps”- Point the repo at a central server instead of a local ruleset file: Server.
- Catch assets as agents generate them: Hooks & CI.
- See conformance over time: Dashboard.