Skip to content

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.

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

Download a release binary for your platform from GitHub Releases, or build from source (Go 1.26+):

Terminal window
make build # → dist/stylist

stylist is a single static binary. It works the same way whether it’s talking to a hosted API or checking files locally.

Add a project config so nobody on your team needs to pass flags:

# .stylist.yaml (repo root, checked in)
api_url: https://api.stylist.dev
ruleset: acme-brand-v1

The token is a secret, so it never goes in this file. Set it as an environment variable instead:

Terminal window
export STYLIST_API_TOKEN=<your token>

See Configuration for every setting and how precedence works between flags, environment variables, and this file.

Terminal window
stylist check page.html
FAIL 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.

Install the pre-commit hook:

Terminal window
stylist hook install

Commits 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:

Terminal window
stylist baseline
  • 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 login once. See Personal attribution.