Skip to content

Pro pre-sale is open. Installation opens January 2027. See Pro

Docs

CLI

The CLI is published on npm as werewolf-ui; this page describes 0.1.0-alpha.1. Run every command from your app as npx werewolf-ui <command>. Do not use npx wolf: that runs an unrelated package.

Commands

CommandWhat it doesWrites files
initSeed, token stylesheet, CSS import and agent rulesYes
add <name...>Component source and its dependenciesYes, and runs the package manager
themeChanges seed choices and regenerates the stylesheetSeed and stylesheet
lint [paths...]Static styling checks, optional safe fixesOnly with --fix
mcpLocal MCP server with five read-only toolsNever
tokens buildExports tokens for one platformUnder --out
docs [component]Prints the docs URL and opens it in a terminalNever

init

npx werewolf-ui init
npx werewolf-ui init --cwd ./apps/web --package-manager pnpm
npx werewolf-ui init --agent claude,copilot

Sets up an app once. Creates werewolf.json and the seed only if they are missing, writes the token stylesheet, adds one import after your Tailwind import, and installs the agent rules. A repeat run with no changes writes nothing.

OptionValue
--cssThe app stylesheet that imports Tailwind
--seedSeed path. Default tokens/seed.json
--outputGenerated stylesheet. Default styles/werewolf.css
--package-managernpm, pnpm, yarn or bun, when there is no lockfile or they disagree
--agentclaude, copilot, windsurf, gemini, cline, cursor, codex, jules, amp, other or all, as a comma list

add

npx werewolf-ui add button input dialog
npx werewolf-ui add button --overwrite src/components/ui/button.tsx

Requires init. Resolves registry dependencies, installs missing npm packages first, maps imports to your aliases, then writes the files. Identical files are skipped; a differing file conflicts until you pass its path to --overwrite.

theme

npx werewolf-ui theme --accent "<hex>" --gray-tint 0.25 --radius-base round

Changes only the choices you pass and regenerates the stylesheet. Both modes must pass every contrast check before anything is written.

OptionValue
--accentA 3 or 6 digit hex color
--gray-tintA number from 0 to 1
--radius-basesharp, default, round, pill, or a px value such as 6px

lint

npx werewolf-ui lint
npx werewolf-ui lint src --fix

Checks .js, .jsx, .ts, .tsx, .mjs and .css files, up to 500 files and 1 MiB per file. Paths are project-relative files or folders, without globs. It installs nothing and works before init too. --fix applies only exact edits and reanalyzes before writing.

mcp

npx werewolf-ui mcp --cwd ./my-app

Starts the local MCP server over stdio for a client to launch. Any existing directory works. See AI agents and MCP for the client setup.

tokens build

npx werewolf-ui tokens build --out exported-tokens
npx werewolf-ui tokens build --platform android --out exported-tokens

Requires init. Exports json/dark.json and json/light.json plus one platform's files, without changing the seed.

OptionValue
--platformweb (default), ios or android
--outRequired. A directory inside the project

docs

npx werewolf-ui docs
npx werewolf-ui docs date-picker

Prints a component's page URL, or the installation page without a name. It opens a browser only in an interactive terminal without --json. The site describes its latest version, which can differ from your installed CLI.

Options for every command

  • --help prints every command; <command> --help prints only that command.
  • --yes is accepted everywhere. No command prompts, and --yes never authorizes an overwrite.
  • --json prints exactly one result document on stdout and nothing else: schemaVersion, command, ok, data and diagnostics.
  • --cwd <path> selects the app. Options take one value each, as --cwd ./apps/web, not --cwd=./apps/web.
  • --overwrite <path> replaces one exact generated file after you review it. It is the only option you can repeat.

Exit codes

CodeMeaning
0Success. Lint found no errors, though warnings may remain.
1Operational failure: a conflict, a write or install failure. Lint found errors.
2Invalid arguments, an unknown component, an invalid seed, or an unsupported or ambiguous project.
130Cancelled.

Conflicts and overwrites

  • The CLI records what it generated in .werewolf/managed.json. Unchanged generated files update; files you edited return WW_CONFLICT with their exact path, and nothing is written.
  • --overwrite selects only generated output, components in the current request or exported files. It can never select your seed, werewolf.json, your app stylesheet or AGENTS.md.
  • File writes roll back on failure. Package installs are not rolled back.

Diagnostic codes

Messages are in English and may change; codes are stable. Troubleshooting explains the common ones.

CodeExitMeaning
WW_ARGUMENT2Unknown, missing, repeated or malformed option or value.
WW_ASSETS1The packaged catalog is missing, unreadable or invalid. Reinstall the package.
WW_CANCELLED130Lint or a file transaction was cancelled. No clean result is available.
WW_CLASS_REMOVEDlint errorA palette utility that the system does not generate.
WW_COLOR_LITERALlint errorA hardcoded color where a semantic color token is required.
WW_COMMAND2Unknown command or unsupported top-level arguments.
WW_COMPONENT2Unknown component name.
WW_CONFLICT1A file differs from what the CLI expects, or changed during the command.
WW_CSS_IMPORT2The app stylesheet is missing or malformed, or its styling and theme imports are missing, duplicated or misplaced.
WW_CURSOR2A pagination cursor is invalid, stale or from different filters (MCP).
WW_DARK_VARIANTlint errorA dark: variant; tokens switch with data-theme.
WW_DEPENDENCY2Invalid dependency spec or unsupported package manager.
WW_DEPENDENCY_CONFLICT2Requested and declared dependency versions disagree.
WW_DYNAMIClint warningA style expression that cannot be resolved statically.
WW_ENCODINGlint error, or 1A source file is not valid UTF-8; fixes are not applied in that run. An ignore file that is not valid UTF-8 stops lint with exit 1.
WW_FIX_INVALID1Proposed fixes are invalid or cannot be fully reanalyzed. Nothing was written.
WW_FIX_OVERLAP1Proposed fixes overlap. Nothing was written.
WW_FIX_PARSE1A fix would introduce a parse failure. Nothing was written.
WW_IMPORT2Component source imports cannot be parsed or mapped to the app's aliases.
WW_INSTALL1The package manager failed or its launcher cannot be resolved. No component files were committed.
WW_INTERNALnoneAn MCP tool could not complete or produced an invalid result.
WW_IO1An unexpected filesystem or runtime error.
WW_LIMITlint error, or 1A file, file count or traversal limit was exceeded. An ignore file over 1 MiB stops lint with exit 1. MCP returns it for oversized input.
WW_NOT_INITIALIZED1The app has no werewolf.json, seed or ownership record. Run npx werewolf-ui init --yes.
WW_OPACITYlint errorA color with alpha, or an opacity outside the role tokens.
WW_OPEN0 (warning)The docs URL could not be opened in a browser. Open it yourself.
WW_PARSElint errorA source file cannot be parsed. Its styles were not checked.
WW_PATH2A path is absolute, escapes the project, crosses a symlink or changed its target.
WW_PLATFORM2--platform is not web, ios or android.
WW_PROJECT_ALIAS2Compiler aliases are missing, ambiguous or disagree with werewolf.json.
WW_PROJECT_AMBIGUOUS2A workspace root, several frameworks, stylesheets or lockfiles, or a lockfile that disagrees with packageManager. Select explicitly.
WW_PROJECT_CONFIG2werewolf.json or a compatible registry config is invalid.
WW_PROJECT_ROOT2No app package.json at the selected directory.
WW_PROJECT_VERSION2Node, React or the styling framework version is unsupported or undeclared.
WW_PROTOCOL1MCP input or output failed; the connection is closed.
WW_SEED2The seed is malformed or a choice is out of range.
WW_SIZElint errorA control height outside the element size tokens, or a per-breakpoint size.
WW_SOLID_PAIRlint errorAn on-solid text or icon token paired with a different fill.
WW_SPACINGlint errorNumeric or arbitrary spacing where a spacing token is required.
WW_SYMLINKlint warningA symbolic link was skipped during traversal.
WW_TOKEN_PROPERTYlint errorA real token used for a property it does not supply.
WW_TOKEN_UNKNOWNlint errorA token name that does not exist.
WW_TRUNCATED1 (lint)The diagnostic limit was reached; rerun on fewer files.
WW_WRITE1A file transaction failed. Retained backup paths are listed if rollback was incomplete.
WW_WRITE_PLAN2--overwrite names a path this command does not manage, or an internal write plan is invalid.