Getting started (hosted)
This is for hosted customers: someone already runs stylist serve for
you and gave you an API URL, a ruleset ID, and a token. You never build
or run the server yourself. If that’s not your situation, see
Getting started for self-hosting instead.
What you’ll need
Section titled “What you’ll need”Three things from whoever set up your account:
- API URL — the base URL of the hosted API, e.g.
https://api.stylist.dev - Ruleset ID — the name of your organization’s ruleset, e.g.
acme-brand-v1 - API token — a bearer token scoped to your organization
Install the CLI
Section titled “Install the CLI”Download a release binary for your platform from GitHub Releases, or build from source (Go 1.26+):
make build # → dist/styliststylist is a single static binary. It works the same way whether it’s
talking to a hosted API or checking files locally.
Point it at your account
Section titled “Point it at your account”Add a project config so nobody on your team needs to pass flags:
# .stylist.yaml (repo root, checked in)api_url: https://api.stylist.devruleset: acme-brand-v1The token is a secret, so it never goes in this file. Set it as an environment variable instead:
export STYLIST_API_TOKEN=<your token>See Configuration for every setting and how precedence works between flags, environment variables, and this file.
Your first check
Section titled “Your first check”stylist check 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"This works exactly like local mode. The only difference is the content gets POSTed to the hosted API and checked against your ruleset there, instead of a local YAML file.
Wire it into a repo
Section titled “Wire it into a repo”Install the pre-commit hook:
stylist hook installCommits that stage a file violating your 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”- Catch assets as agents generate them: Hooks & CI.
- See conformance over time: Dashboard, if your admin gave you a sign-in.
- Attribute checks to yourself instead of the shared team token: run
stylist loginonce. See Personal attribution.