CLI Reference

CLI Reference

Complete reference for every Rezos command. All commands accept --help for inline documentation.

rezos init

init

Initialize a Rezos project in the current directory. Creates .rezosignore, validates your API key, and optionally runs rezos learn to generate an initial SKILL.md.

Usage

$ rezos init [options]

Flags

FlagDescriptionDefault
--skip-learnSkip initial skill pack generationfalse
--providerDefault provider: anthropic | openai | deepseekanthropic

Example

$ rezos init
✓ Environment validated
✓ .rezosignore created
✓ Running rezos learn...
✓ SKILL.md generated (12 rules)
Ready. Run: rezos chat

rezos chat

chat

Start an interactive session. Every file operation goes through SWD. Budget tracking runs in real time. Session state is saved for resumption.

Usage

$ rezos chat [options]

Flags

FlagDescriptionDefault
--modelLLM model to useclaude-opus-4-7
--budgetMax token budget for the session500000
--turnsMax turns before graceful save25
--dry-runPreview file ops without writingfalse
--effortThinking effort: high | medium | lowhigh
--resumeResume a previous session by ID

Example

$ rezos chat --effort medium
✦ Session #4831 · claude-opus-4-7
✦ Budget: 500k tokens · 25 turns
> Refactor the auth middleware to add rate limiting
✦ Analyzing codebase...
[SWD] Snapshot: src/auth/middleware.ts → sha256:a3f9c2...
[SWD] Writing 247 bytes...
[SWD] ✓ Verified — hash match
✦ Done. 1 file touched. Receipt sealed.

rezos run

run

One-shot prompt with the same SWD verification pipeline as chat. Ideal for scripting and CI use cases.

Usage

$ rezos run <prompt> [options]

Flags

FlagDescriptionDefault
--modelLLM model to useclaude-opus-4-7
--dry-runPreview without writingfalse
--jsonOutput receipt as JSONfalse

Example

$ rezos run "Add a healthcheck endpoint to app/api/health/route.ts" --json
{
"session": "#4832",
"files": ["app/api/health/route.ts"],
"verified": true,
"drift": 0,
"cost": "$0.02"
}

rezos verify

verify

Scan MEMORY.md against the actual filesystem to detect drift. CI-safe — exits with code 1 if drift is found. No API key required.

Usage

$ rezos verify [paths...]

Flags

FlagDescriptionDefault
--strictExit non-zero on any unlogged file changefalse
--reportOutput a JSON drift reportfalse

Example

$ rezos verify
Scanning 247 logged operations...
✓ 244 verified
⚠ 3 drift detected:
src/config.ts (unlogged change)
.env.local (excluded from scan)
prisma/migrations/ (new files)
Exit code: 1

rezos swd apply

swd

Route an external agent's file operations through SWD. Accepts FILE_ACTION JSON blocks via stdin. Enables any agent (Claude Code, Cursor, etc.) to benefit from Rezos verification.

Usage

$ rezos swd apply --stdin --json [options]

Flags

FlagDescriptionDefault
--stdinRead FILE_ACTION blocks from stdin
--jsonParse structured JSON inputfalse
--agent-idIdentity tag for the receiptexternal

Example

# Pipe any agent output through SWD
$ claude-code run "update auth.ts" | rezos swd apply --stdin --json
[SWD] Agent: claude-code
[SWD] Parsing 1 FILE_ACTION...
[SWD] ✓ src/auth.ts verified
Receipt #ext-0012 sealed.

rezos mcp

mcp

Start the Rezos MCP server, exposing SWD tools over the Model Context Protocol (stdio transport). Any MCP-compatible host can route file actions through Rezos.

Usage

$ rezos mcp [options]

Flags

FlagDescriptionDefault
--portTCP port for HTTP transportstdio
--allow-riskyEnable delete and shell-surface operationsfalse

Example

# Add to your MCP host config
{
"servers": {
"rezos": {
"command": "rezos",
"args": ["mcp"]
}
}
}

rezos learn

learn

Analyze the current repository structure and generate a project-local SKILL.md. The model reads your code, package.json, and git history to infer conventions.

Usage

$ rezos learn [options]

Flags

FlagDescriptionDefault
--depthAnalysis depth: shallow | standard | deepstandard
--outputOutput path for SKILL.md.rezos/skills/project.md

rezos stats

stats

View token usage, cost breakdown, and drift statistics across all sessions.

Usage

$ rezos stats [options]

Flags

FlagDescriptionDefault
--sinceFilter from date (YYYY-MM-DD)
--providerFilter by providerall

rezos receipts

receipts

List and inspect SWD trust receipts. Each receipt contains the session ID, touched files, hashes, provider, and cost.

Usage

$ rezos receipts [receipt-id] [options]

Flags

FlagDescriptionDefault
--limitNumber of receipts to show20
--jsonOutput as JSONfalse
--drift-onlyOnly show receipts with driftfalse