CLI Reference¶
In addition to M2M agent mode, Razor provides CLI commands for terminal piping and local shell scripting.
Log Scrubbing¶
# Pipe stderr and scrub framework frames
npm test 2>&1 | razor --scrub > sanitized.log
# Sanitize a specific log file
razor --scrub --file /var/log/app/error.log > sanitized.log
AI Provider Diagnosis¶
# With specific AI provider
razor --file error.log --provider openai
razor --file error.log --provider anthropic
# Local-only mode (no network)
razor --file error.log --local-only
MCP Server Mode¶
# Start as MCP server (JSON-RPC 2.0 over stdio)
razor --mcp
# Or via npx
npx -y tokenectomy-razor --mcp
Configuration¶
Configuration values can be set via ~/.tokenectomy.toml: