CLI Commands
The Navil CLI manages your proxy, configuration, and cloud connection.
navil secureZero-to-governed in 60 seconds. Auto-discovers your MCP configs, wraps every server with the security proxy, generates baseline policies, and shows a before/after coverage score.
--config <path> --dry-run --skip-policy --no-color
navil initInitialize Navil and connect to the cloud. Creates ~/.navil/config.yaml with your API key and sync settings.
--api-key <key>
navil scan <config.json>Analyze MCP configuration for security vulnerabilities (hardcoded credentials, insecure protocols, malicious patterns)
--format text|sarif|json --output <path>
navil wrap <config.json>Wrap all MCP servers in your config with Navil’s transparent security shim. Agents connect as usual — Navil intercepts and inspects every tool call.
--only <servers> --skip <servers> --policy <path> --dry-run --undo
navil shim --cmd <command>Wrap a single stdio MCP server binary with Navil security checks. Supports policy enforcement and scope filtering.
--agent <name> --policy <path>
navil proxyStart the security proxy — intercepts and inspects MCP traffic in real-time with JSON-RPC inspection
--target <url> --port <port> --verbose --require-auth
navil policy checkCheck if a specific tool call would be allowed by the current policy.
--tool <name> --agent <name> --action <action>
navil policy auto-generateGenerate an initial security policy from observed behavioral baselines (zero-config onboarding).
navil cloud serveLaunch the local web dashboard for visual security monitoring. Open http://localhost:8484 in your browser.
--host <addr> --port <port> --no-demo
navil cloud loginLink this machine to your Navil Cloud account. Opens a browser window for authentication.
navil cloud logoutDisconnect from cloud. Anonymous sharing continues — only removes API key from local config.
navil cloud statusShow current cloud connection status (enrolled org, tier, machine ID, sync state).
navil pentestRun adversarial attack scenarios against your Navil instance to verify detection coverage across all 11 anomaly types
--json --output <path>
navil seed-databasePopulate ML baselines with simulated agent traffic (82K+ invocations). Required on first run for anomaly detection to work.
--full --export
Examples
# Auto-discover and secure all MCP configs on your system
navil secure
# Target a specific config
navil secure --config ~/.cursor/mcp.json
# Preview what would happen without making changes
navil secure --dry-runnavil proxy --target http://localhost:3000 --port 9090 --require-auth
# All MCP traffic is now intercepted, inspected, and logged
# Access the dashboard at http://localhost:8484navil cloud serve --host 0.0.0.0 --port 8484
# Dashboard available at http://localhost:8484
# Real-time monitoring of agents, alerts, and policy decisions