Pull, init, and validate StyleRef styles — reusable creative style specs (colors, typography, mood, voice, composition…) that any AI tool follows as a hard constraint.
# Print a style compiled for an AI tool
npx styleref pull 1an6edgp-c42c0cba5315 --format flux
# Set a project's style: writes STYLE.md + adds a note to AGENTS.md
npx styleref init 1an6edgp-c42c0cba5315
# Lint a STYLE.md document
npx styleref validate
# Find public styles
npx styleref search warm editorial
# Connect your account (OAuth) — your private styles then resolve
npx styleref login
npx styleref pull e7c1f2a9-2f65-4f0e-9a3d-2b1c4d5e6f70 # your own style, by id- Backed by the public REST API (
https://styleref.io/api/v1, OpenAPI at /api/v1/openapi.json). Zero dependencies, Node ≥ 18. loginruns OAuth 2.1 (authorization code + PKCE, loopback redirect) against styleref.io and stores tokens in~/.config/styleref/credentials.json(0600).STYLEREF_TOKENoverrides.validatelints offline by default (--remoteuses the API).- Agents can do the same over MCP:
claude mcp add --transport http styleref https://styleref.io/api/mcp— docs at https://styleref.io/mcp.
This package lives in the StyleRef monorepo (packages/styleref-cli) and is
published manually (npm publish from this directory — verify the styleref
npm name is available/owned first). Point it at a local dev server with
STYLEREF_API=http://localhost:3000/api/v1 or --api.