Skip to content

CLI Reference

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

CLI Reference (fs2rust)


1. Global Flags & Policy Controls

-y, --allow-mutating       Allow mutating ActionCommands (required with --confirm-destructive)
    --confirm-destructive  Explicit destructive confirmation required by MCP/action policy gates
    --dry-run              Preview mutating actions without modifying filesystem/volume state
    --format <FORMAT>      csv, tsv, json, jsonl, html, html-vertical, markdown (md) [default: markdown]
-o, --export <EXPORT>      Write table output to file and compute SHA-256/512 custody hashes [alias: --output]
    --custody <CUSTODY>    Write SHA-256/SHA-512 Merkle CustodyManifest JSON to path
    --filter <FILTER>      Tabular filter expression (e.g. "size_bytes > 100" or "filename ~ txt")
    --sort <SORT>          Sort column specification (e.g. "size_bytes:desc" or "~filename")
    --limit <LIMIT>        Maximum rows to display/export
    --offline              Use offline synthetic backends and sample fixtures
-v, --verbose              Verbose stderr logging

2. Subcommands

  • search (6): files, bulk-time (bulk-change), folder-time, report (folders), shortcuts, hash
  • ntfs (11): drives, counters (disk-counters), file-watch (file-activity), folder-watch (folder-changes), access-err (file-errors), app-io, smart, ads, links, props, usn
  • data (7): csv, diff (compare), query, exif, codegen, html2text (html), addr
  • mcp: Run or inspect the JSON-RPC 2.0 (2024-11-05) stdio MCP server (mcp --tools)
  • gui: Launch the desktop GUI (fs2rust-win32 native by default, or --iced)
  • action: Execute a registered mutating ActionCommand under policy gates
  • list (alias: catalog): List all 24 tools and 8 mutating actions across search, ntfs, and data
  • export: Export a multi-table bundle + SHA-256/512 custody_manifest.json into --export directory
  • diag: Print host platform and offline/live capability diagnostics

3. Examples

# Hash a tree in single-pass streaming mode & export JSONL with custody hashes
fs2rust search hash --format jsonl -o .\out\hashes.jsonl --custody .\out\custody.json

# Offline $UsnJrnl or ATA SMART check + pure-Rust JPEG EXIF extraction
fs2rust --offline ntfs usn --format table
fs2rust --offline data exif --format json

# Preview a mutating filesystem ActionCommand safely
fs2rust --dry-run action alternate_stream_delete

Clone this wiki locally