Skip to content

CLI Reference

Andrew Paolucci edited this page Nov 26, 2026 · 2 revisions

CLI Reference (net2rust)


1. Global Offline, Capture, Filter & Policy Options

--offline             Run in deterministic offline synthetic fixture mode
--fixture-dir <PATH>  Directory containing offline JSON fixtures (activates offline mode)
--pcap <PATH>         Path to offline PCAP/PCAPNG file for capture tools (activates offline mode)
--etl <PATH>          Path to offline ETL trace file (activates offline mode)
--scenario <NAME>     Named offline fixture scenario (activates offline mode)
--max-rows <N>        Maximum rows returned after filtering and sorting [alias: --limit]
--format <FMT>        csv, tsv, json, jsonl, html, html-vertical, markdown [default: markdown]
--out <PATH>          Write formatted report to file (or directory for batch export) [aliases: --output, --export]
--custody-out <PATH>  Write SHA-256/SHA-512 Merkle custody manifest JSON to file [alias: --custody]
--filter <EXPR>       Tabular filter expression (e.g. "protocol == TCP AND local_port >= 443")
--sort <SPEC>         Sort specification (e.g. "port:desc", "-port", "~port", "a:asc,b:desc")
-y, --allow-mutating  Permit policy-gated mutating ActionCommands (required for non-read-only actions)
--dry-run             Preview mutating ActionCommands without applying OS/network changes
--log-level <LEVEL>   Tracing log level written to stderr (trace, debug, info, warn, error) [default: warn]

2. Top-Level Commands

  • sockets — 13 socket, route, neighbor, interface, and ETW tools
  • capture — 11 packet capture & protocol dissectors (PCAP/PCAPNG/ETL)
  • lan — 11 ping, trace, LAN scan, WoL, NetBIOS, SMB, speedtest tools
  • osint — 10 WHOIS/RDAP, offline GeoIP/OUI, DNS, profile tools
  • radio — 10 Wi-Fi BSS/profile and Bluetooth/BLE radio tools
  • mcp — Start policy-gated MCP JSON-RPC 2.0 stdio server (or dump --tools manifest)
  • export — Export single tool or batch category/all tools with Merkle custody manifest
  • list-tools (aliases: list, catalog) — List all 55 tools and 13 mutating ActionCommands
  • gui — Launch native Win32 (net2rust-win32) or cross-platform Iced (net2rust-iced) GUI
  • action — Invoke a policy-gated mutating ActionCommand directly by ID

3. Usage Examples

# Inspect offline PCAP with GuapQuery filter and export to JSON
net2rust capture http --pcap .\evidence\net\sample_http.pcap --format json --filter "method == GET"

# Inspect offline IEEE MAC OUI vendor or GeoIP database without network traffic
net2rust --offline osint oui --format table --max-rows 10

# Dry-run a policy-gated ActionCommand safely without network changes
net2rust --dry-run action lan.wol.send

Clone this wiki locally