Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

styleref CLI

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.
  • login runs OAuth 2.1 (authorization code + PKCE, loopback redirect) against styleref.io and stores tokens in ~/.config/styleref/credentials.json (0600). STYLEREF_TOKEN overrides. validate lints offline by default (--remote uses 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.

Development

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.

About

Pull, init, and validate StyleRef styles (STYLE.md) from the terminal — reusable creative style specs for any AI tool.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages