Skip to content
/patternsdocs
Using patterns

CLI workflows

Find, install, update, route, and enforce patterns with deterministic commands.

Find and install

patterns find <query>
patterns add <owner/repo[/subdir][#tag-or-sha]>
patterns list
patterns remove <name>
patterns update [name]

name is the stable machine ID shown beside the human title. It is also the directory under .patterns/, so updates refuse a bundle that silently changes it.

Inspect before installing

patterns inspect <owner/repo[/subdir] | name>

inspect resolves the exact detail of one indexed pattern — by ref or by stable name — through the directory's GET /api/patterns endpoint. It shows the pattern's identity, facets, related patterns, and the indexed commit. Use it before add to verify exactly what you are about to install.

Apply and enforce

patterns sync [dir]
patterns check [path]

sync writes a managed “Project patterns” block into supported agent files and installs the consume skill. It preserves content outside the managed markers.

check resolves local imports and compares them with every installed manifest's declared forbidden boundaries. It reports only deterministic violations; prose-only constraints still require tests and review.

Author and publish

patterns init <name>
patterns validate [path]
patterns scan [path]
patterns detect [path]
patterns emit [dir]
patterns publish [ref]

init creates an empty pattern bundle for authors. It does not initialize or scaffold an application. scan, detect, and emit support the extraction skill that turns an existing architecture into generalized guidance.

Run patterns <command> --help for the command's current options and defaults.

On this page