Skip to content
Command lineExport reports

Reports and exports

Save a scan as JSON, Markdown, a self-contained HTML page or CSV, with home-folder names hidden when you share it.

census exportRead-only

Usage

census export json|md|html|csv [SCOPE] [--output PATH] [--force] [--sections LIST] [--limit N] [--redact] [--refresh] [--progress] [--json]

Saves one saved scan as a report. Without --output, the report goes to stdout.

OptionDescription
--scope KINDdrive (the default) or data
-p, --path PATHA folder’s own scan
--output PATHWrite to this file or folder (default: stdout)
--forceReplace an existing file
--sections LISTComma-separated sections. duplicates isn’t included by default.
--limit NRows per list (default: 50; 0 means all)
--redactHide names beneath home folders
--refreshRescan first; otherwise the saved scan is read
--progressWrite progress as NDJSON to stderr
--jsonWith --output, print a JSON summary of the file written
Terminal
# A JSON report on the Desktop, named after the scan
census export json --output ~/Desktop/

# A Markdown report of four sections
census export md --sections summary,findings,folders,files --output report.md

# An HTML page you can share, with home-folder names hidden
census export html --redact --output ~/Desktop/shared-report.html

# Every row, as CSV
census export csv --limit 0 --output ~/Desktop/disk-usage.csv

Sections

Sections come in this order: summary, breakdown, findings, folders, files, types, apps, leftovers and duplicates. By default a report has every section that applies, except duplicates, which has to read file contents; add it with --sections. --limit applies only to folders, files and duplicate groups. apps and leftovers need a drive or data scan; sections that don’t apply are left out and named in warnings.

Where the file goes

  • No --output: the report is written to stdout. --json isn’t allowed then, since stdout already holds the report.
  • An existing folder: it receives census-<scan_id>.<format>.
  • A file that exists: kept, unless you add --force (output_exists otherwise).

With --output and --json, census prints an envelope whose results has format, path, bytes and sections:

Terminal
census export json --sections summary,duplicates --limit 5 --output report.json --json

Formats

FormatWhat you get
jsonThe v5 envelope, one scan object, and results with generated_at_unix_ms, redacted and sections
mdA Markdown report
htmlOne self-contained page, with no scripts and no external resources
csvCRLF records, exact byte columns, and a guard against formula injection

--redact replaces names in home-folder paths with salted tokens, and Markdown and HTML reports say that names are hidden. Export is available only on macOS.

Updated · census JSON schema 5