CLI
Do not edit this file. pnpm census writes it from the live registries.
The commands (28)
This page lists each command with its arguments and options. The text comes
from the definitions that parse them. rule-mcp <command> --help prints the same data.
rule-mcp with no command starts the stdio server. An agent starts it this way. -h, --help works on every command; -v, --version prints
the package version from anywhere. An error exits 1 and prints to stderr;
--help exits 0.
| Command | Options | What it does |
|---|---|---|
help |
0 | Show the full usage guide |
serve |
4 | Start the MCP server (STDIO by default) |
up |
1 | Same as "serve --transport sse" (on-demand HTTP daemon) |
daemon |
1 | Manage the MCP daemon (process and native platform services) |
install |
26 | Install rule-mcp into an agent/IDE (edits mcp.json) |
uninstall |
7 | Remove rule-mcp from an agent/IDE |
setup |
37 | Full-screen install/uninstall wizard (falls back to flags when piped) |
tools |
1 | List or call MCP tools directly |
config |
5 | Print the mcp.json snippet, or manage RULE_MCP_* env vars with config env |
feature |
0 | List or change user-facing feature switches |
project |
0 | Configure or take back a project-scope install |
doctor |
4 | Run system health check |
adr |
9 | Create a new Architecture Decision Record (ADR) |
handoff |
9 | Generate a compressed LLM context handoff summary |
skills |
4 | Manage the rule-mcp AI skill system |
fix |
3 | Apply the deterministic guardrail fixes of every skill |
completions |
1 | Generate shell auto-completion script |
handon |
4 | Verify the last handoff against the repo now |
stats |
0 | Show telemetry statistics from the local log |
cache |
1 | Inspect the on-disk tool cache |
roles |
7 | Manage review persona roles |
guard |
3 | Permission-guard payload processor (invoked by PreToolUse hooks, reads stdin) |
update |
0 | Self-update to the newest release tag (or fast-forward when none exist) |
agent-commands |
13 | Registry-driven agent slash-command management |
reinstall |
0 | Purge node_modules and pnpm-lock.yaml, install again, refresh the global bin |
commit-lint |
6 | Validate commits against type(scope): subject (the git hooks call this) |
secrets |
3 | Scan a patch for credentials with betterleaks (offline, redacted) |
init |
2 | Prepare a project: recorder directory, git hooks, tokensave and the dependency pin report |
rule-mcp help
Show the full usage guide
rule-mcp help
Takes no options beyond the global -h, --help.
rule-mcp serve
Start the MCP server (STDIO by default)
rule-mcp serve
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--transport <type> |
- | - | stdio (default), http (Streamable HTTP), or sse (HTTP+SSE) |
--port <number> |
- | - | port for http/sse transport |
--ssl-cert <path> |
- | - | TLS certificate (requires --ssl-key) |
--ssl-key <path> |
- | - | TLS private key (auto-generates self-signed if missing) |
rule-mcp up
Same as "serve --transport sse" (on-demand HTTP daemon)
rule-mcp up
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--port <number> |
- | - | port for the SSE server |
rule-mcp daemon
Manage the MCP daemon (process and native platform services)
rule-mcp daemon action
Arguments
| Argument | Default | Description |
|---|---|---|
action |
status | start\ |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dry-run |
- | - | preview changes without writing (install/uninstall only) |
rule-mcp install
Install rule-mcp into an agent/IDE (edits mcp.json)
rule-mcp install
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--agent <name> |
all | - | target agent, or 'all' for every supported agent |
--mode <name> |
- | stdio, daemon, sse, docker, skills |
stdio (default), daemon (SSE), docker, or skills (no MCP server, ADR 081) |
--global |
- | - | use clean command path (requires global install) |
--force |
- | - | override existing configuration |
--dry-run |
- | - | preview without writing |
--json |
- | - | print machine-readable JSON instead of Terminal UI |
--no-wizard |
- | - | skip the full-screen wizard even on a terminal |
--no-interactive |
- | - | run the plan with defaults and no wizard |
--rules |
- | - | write agent instruction files |
--no-rules |
- | - | skip agent instruction files |
--commands |
- | - | write agent slash commands |
--no-commands |
- | - | skip agent slash commands |
--level <name> |
- | L0, L1, L2, L3, L4 |
integration depth for the selected host: L0 server, L1 rules, L2 commands, L3 hooks, L4 handler; the host ceiling is enforced |
--hooks |
- | - | install guard hooks for the selected agents that document them |
--no-hooks |
- | - | skip guard hooks |
--skills |
- | - | install the bundled rule-mcp-* skills |
--no-skills |
- | - | skip the bundled skills |
--surface <spec> |
- | - | server tool surface: standard, full, areas:<a,b> or skills:<s,...> |
--service |
- | - | register the platform daemon service |
--no-service |
- | - | skip the platform daemon service |
--doctor |
- | - | run the health check at the end |
--no-doctor |
- | - | skip the health check |
--commands-preset <name> |
- | minimal, standard, full |
which commands to write: minimal, standard or full |
--commands-families <list> |
- | - | comma-separated: areas, personas, tasks |
--commands-areas <list> |
- | - | comma-separated area names, e.g. frontend,data |
--commands-skills <list> |
- | - | comma-separated skill names |
rule-mcp uninstall
Remove rule-mcp from an agent/IDE
rule-mcp uninstall
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--agent <name> |
all | - | target agent, or 'all' for every configured agent |
--dry-run |
- | - | preview without removing |
--json |
- | - | print machine-readable JSON instead of Terminal UI |
--no-wizard |
- | - | skip the full-screen wizard even on a terminal |
--no-interactive |
- | - | run the plan with defaults and no wizard |
--purge |
- | - | also remove the runtime home and caches |
--keep-config |
- | - | keep user configuration when purging |
rule-mcp setup
Full-screen install/uninstall wizard (falls back to flags when piped)
rule-mcp setup
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--agent <name> |
- | - | narrow the run to one target |
--mode <name> |
stdio | - | stdio (default), daemon (SSE), or docker |
--scope <s> |
- | global, project |
global (default) or project MCP configs |
--project <path> |
- | project root for --scope project (repeatable) | |
--project-config <kind> |
- | shared, local |
shared (portable) or local launcher |
--refresh-projects |
- | - | re-apply MCP configs into every recorded project |
--feature <id=level> |
- | set a feature level before install (repeatable) | |
--adr-policy <level> |
- | - | ADR write policy: full, handoff, or on-demand |
--attribution <mode> |
- | keep, hide |
commit attribution per agent: keep (default) or hide |
--attribution-agent <id> |
- | narrow attribution to one agent (repeatable) | |
--uninstall |
- | - | run the uninstall direction |
--rules |
- | - | write agent instruction files |
--no-rules |
- | - | skip agent instruction files |
--commands |
- | - | write agent slash commands |
--no-commands |
- | - | skip agent slash commands |
--hooks |
- | - | install guard hooks (Claude) |
--no-hooks |
- | - | skip guard hooks |
--skills |
- | - | install the bundled rule-mcp-* skills |
--no-skills |
- | - | skip the bundled skills |
--minimal |
- | - | minimal server tool surface (--no-minimal for full) |
--no-minimal |
- | - | full server tool surface |
--surface <spec> |
- | - | server tool surface: minimal, standard, full, areas:<a,b> or skills:<s,...> |
--service |
- | - | register the platform daemon service |
--no-service |
- | - | skip the platform daemon service |
--doctor |
- | - | run the health check at the end |
--no-doctor |
- | - | skip the health check |
--commands-preset <name> |
- | minimal, standard, full |
which commands to write: minimal, standard or full |
--commands-families <list> |
- | - | comma-separated: areas, personas, tasks |
--commands-areas <list> |
- | - | comma-separated area names, e.g. frontend,data |
--commands-skills <list> |
- | - | comma-separated skill names |
--purge |
- | - | also remove the runtime home and caches (uninstall) |
--keep-config |
- | - | keep user configuration when purging |
--force |
- | - | override existing configuration |
--dry-run |
- | - | preview without writing |
--no-wizard |
- | - | run the plan with flags and no wizard |
--no-interactive |
- | - | run the plan with defaults and no wizard |
--json |
- | - | print machine-readable output instead of the wizard |
rule-mcp tools
List or call MCP tools directly
rule-mcp tools subcommand name
Arguments
| Argument | Default | Description |
|---|---|---|
subcommand |
- | list \ |
name |
- | tool name (only for call) |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--json [value] |
- | - | list as JSON, or JSON arguments for call |
rule-mcp config
Print the mcp.json snippet, or manage RULE_MCP_* env vars with config env
rule-mcp config section
Arguments
| Argument | Default | Description |
|---|---|---|
section |
- | env to configure RULE_MCP_* variables (default: print mcp.json snippet) |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--global |
- | - | use clean command path (requires global install) |
--mode <name> |
- | - | stdio (default), daemon (SSE), or docker |
--set <pair> |
- | KEY=VALUE to save (repeatable) | |
--list |
- | - | list saved RULE_MCP_* env vars |
--unset <key> |
- | - | remove a saved RULE_MCP_* env var |
rule-mcp feature
List or change user-facing feature switches
rule-mcp feature
Takes no options beyond the global -h, --help.
rule-mcp project
Configure or take back a project-scope install
rule-mcp project
Takes no options beyond the global -h, --help.
rule-mcp doctor
Run system health check
rule-mcp doctor
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--json |
- | - | print machine-readable JSON to stdout |
--json-out <path> |
- | - | export JSON report to a file and keep Terminal UI on stdout |
--output <path> |
- | - | alias for --json-out |
--telemetry |
- | - | include anonymous usage stats in the report |
rule-mcp adr
Create a new Architecture Decision Record (ADR)
rule-mcp adr action title
Arguments
| Argument | Default | Description |
|---|---|---|
action |
- | new |
title |
- | - |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--status <s> |
- | - | proposed \ |
--context <text> |
- | - | context forcing factors |
--decision <text> |
- | - | decision made and why |
--consequences <text> |
- | - | positive and negative consequences |
--tags <list> |
- | - | comma-separated tags (default: architecture) |
--ends-when <text> |
- | - | what would end this decision: the observation that makes it wrong |
--alternatives <text> |
- | an alternative considered (repeatable) | |
--supersedes <n> |
- | - | three-digit number of the record this one replaces |
--superseded-by <n> |
- | - | three-digit number of the record that replaces this one |
rule-mcp handoff
Generate a compressed LLM context handoff summary
rule-mcp handoff subcommand args
Arguments
| Argument | Default | Description |
|---|---|---|
subcommand |
- | doctor \ |
args |
- | merge-index receives %O %A %B %P from git |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dir <path> |
. | - | project root (default: .) |
--format <f> |
- | - | full (default), brief, minimal |
--compress |
- | - | aggressively truncate values |
--mode <m> |
- | - | handoff (default) or close-session |
--no-archive |
- | - | render without archiving completed docs or repairing the ADR numbering |
--fix |
- | - | apply the ADR renumber plan; with compact: close the holes and rewrite citations |
--fix-commits |
- | - | amend local commit messages to match renumbered ADRs |
--commit |
- | - | with land: commit the numbered ADRs |
--quiet |
- | - | with land: suppress progress |
rule-mcp skills
Manage the rule-mcp AI skill system
rule-mcp skills action
Arguments
| Argument | Default | Description |
|---|---|---|
action |
- | install \ |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--scope <s> |
global | - | global (default, ~/.agents/skills/) or project (.agents/skills/) |
--all |
- | - | pre-select all skills |
--dry-run |
- | - | report what would be removed without removing it |
--json |
- | - | list as machine-readable JSON |
rule-mcp fix
Apply the deterministic guardrail fixes of every skill
rule-mcp fix
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dir <path> |
. | - | project root (default: .) |
--mode <m> |
lint | - | lint (report what would change) or fix (write) |
--no-dry-run |
- | - | apply fixes instead of previewing |
rule-mcp completions
Generate shell auto-completion script
rule-mcp completions
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--shell <s> |
zsh | - | zsh (default), bash, fish |
rule-mcp handon
Verify the last handoff against the repo now
rule-mcp handon
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dir <path> |
. | - | project root (default: .) |
--file <path> |
- | - | verify a single handoff file |
--list |
- | - | list handoffs |
--no-archive |
- | - | verify without archiving completed docs |
rule-mcp stats
Show telemetry statistics from the local log
rule-mcp stats
Takes no options beyond the global -h, --help.
rule-mcp cache
Inspect the on-disk tool cache
rule-mcp cache action
Arguments
| Argument | Default | Description |
|---|---|---|
action |
stats | stats or other cache subcommands |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dir <path> |
- | - | cache directory to inspect |
rule-mcp roles
Manage review persona roles
rule-mcp roles action id
Arguments
| Argument | Default | Description |
|---|---|---|
action |
list | list \ |
id |
- | role id (for new/deprecate) |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--json |
- | - | machine-readable JSON output |
--role <name> |
- | - | parent role name |
--skills <list> |
- | - | evidence skills (comma-separated) |
--years <n> |
- | - | required years of experience |
--lenses <list> |
- | - | review lenses (comma-separated) |
--evidence-skills <list> |
- | - | evidence skills alias |
--by <role> |
- | - | role that deprecates this one |
rule-mcp guard
Permission-guard payload processor (invoked by PreToolUse hooks, reads stdin)
rule-mcp guard action
Arguments
| Argument | Default | Description |
|---|---|---|
action |
bash | bash or other guard scope |
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--loop |
- | - | keep the process warm; NDJSON lines in, one JSON answer per line out |
--daemon |
- | - | listen on the guard Unix socket (one warm process for many --send clients) |
--send |
- | - | send one stdin payload to the guard daemon and print the answer |
rule-mcp update
Self-update to the newest release tag (or fast-forward when none exist)
rule-mcp update
Takes no options beyond the global -h, --help.
rule-mcp agent-commands
Registry-driven agent slash-command management
rule-mcp agent-commands
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--dir <path> |
- | - | write commands to this directory |
--format <f> |
- | - | args (default), workflow, gemini, prompt, plain |
--list |
- | - | list command names |
--targets |
- | - | print resolved target directories |
--sync |
- | - | write to EVERY detected agent dir |
--remove |
- | - | remove instead of writing |
--force |
- | - | overwrite existing files |
--dry-run |
- | - | preview without writing |
--agent <name> |
- | - | limit to these agents (comma-separated) |
--preset <name> |
- | minimal, standard, full |
minimal, standard or full |
--families <list> |
- | - | comma-separated: areas, personas, tasks |
--areas <list> |
- | - | comma-separated area names, e.g. frontend,data |
--skills <list> |
- | - | comma-separated skill names |
rule-mcp reinstall
Purge node_modules and pnpm-lock.yaml, install again, refresh the global bin
rule-mcp reinstall
Takes no options beyond the global -h, --help.
rule-mcp commit-lint
Validate commits against type(scope): subject (the git hooks call this)
rule-mcp commit-lint
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--msg-file <path> |
- | - | validate a commit-message file (commit-msg hook) |
--range <revspec> |
- | - | validate every commit in a revision range |
--base <ref> |
- | - | base ref for the range |
--head <ref> |
- | - | head ref for the range (default: HEAD) |
--stdin-push |
- | - | validate the refs git is about to push, read from stdin (pre-push hook) |
--dir <path> |
- | - | project directory (default: cwd) |
rule-mcp secrets
Scan a patch for credentials with betterleaks (offline, redacted)
rule-mcp secrets
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
--range <revspec> |
- | - | scan a revision range instead of the staged patch |
--repo <path> |
- | - | repository directory (default: cwd) |
--json |
- | - | print findings as JSON |
rule-mcp init
Prepare a project: recorder directory, git hooks, tokensave and the dependency pin report
rule-mcp init
Options
| Flag | Default | Choices | Description |
|---|---|---|---|
-d, --dir <path> |
- | - | project root (default: the current directory) |
--no-tokensave |
- | - | skip tokensave init |