FolderManifest CLI
Every FolderManifest feature, from the terminal — scriptable, reproducible, and built for bulk. Schedule nightly verifications, dedupe spreadsheets in batches, and wire integrity checks into CI. The CLI ships inside the Windows and Linux app and is included with the trial and every license.
The FolderManifest CLI brings every feature of the desktop app to your terminal so you can automate the boring, prove the important, and clean up in bulk. Instead of clicking through the GUI, you run a command — and because each command has a stable exit code and optional JSON output, those commands drop straight into Windows Task Scheduler, batch files, and CI pipelines.
The CLI ships inside the desktop app and is available to trial and paid users (the same license as the GUI). It is not a separate install and is not published to a package manager — it lives in the app you already installed, and it runs whether the app window is open or closed.
Install & first run
Install FolderManifest, activate a trial or license, and the CLI is ready. Open any terminal and just type foldermanifest:
Included with the 7-day trial and every lifetime license · No credit card · Runs locally on Windows & Linux
foldermanifest --version
foldermanifest --helpEvery command follows the same shape: foldermanifest <command> [paths...] [options].
Quick start
Three commands cover most of what people reach for first:
# Create a manifest of a folder (Markdown, with SHA-256 checksums)
foldermanifest generate "C:\Projects\Photos"
# Verify a folder against a saved JSON manifest (great for Task Scheduler/CI)
foldermanifest verify "C:\Projects\Photos" --manifest photos.json
# Hash some files
foldermanifest checksum report.pdf invoice.xlsxCreate a manifest — generate
generate <dir> walks a folder, hashes every file, and writes a manifest: a complete, timestamped record of exactly what was there and what it contained. Think of it as a notarized photograph of a folder at a moment in time.
| Option | Description | Default |
|---|---|---|
--format <list> | One or more of html, md, json (comma-separated) | md |
--algo <a> | Checksum algorithm: crc32 or sha256 | sha256 |
--duplicates | Also detect duplicate files | off |
--out <path> | Output file (single format) or base path (multiple formats) | ./<folder>-manifest.<ext> |
foldermanifest generate "C:\Photos" --format md,json --algo sha256 --out photos
# writes photos.md and photos.jsonTurn “I delivered everything” into proof
A design studio ships a 4 GB folder of final assets to a client, then generates a Markdown manifest and attaches it to the handoff email. Months later the client claims three logos were “never sent.” The manifest lists every file, its size, and its SHA-256 — dated and signed off. The dispute ends in one reply instead of a week of finger-pointing and re-exports.
Benefit: fewer disputes, no unpaid rework, a paper trail you control.
Prove nothing changed — verify
verify <dir> --manifest <file> compares a folder's current state to a saved manifest and tells you what drifted. It exits 0 when everything matches and 1 when anything was added, removed, or modified — so a one-line script can react.
| Option | Description |
|---|---|
--manifest <file> | Required. The manifest to check against (.json or .html). |
--algo <a> | Override checksum algorithm (crc32 / sha256). |
foldermanifest verify "C:\Photos" --manifest photos.json
# Branch on the result in a script:
foldermanifest verify "C:\Photos" --manifest photos.json || echo "FILES CHANGED!"Markdown manifests are read-only and rejected by verify — use .json or .html as the verify input.
Catch silent corruption and ransomware early
A managed-services provider keeps a JSON baseline of each client's critical share. A scheduled verify runs every morning at 5 a.m.; if the exit code is 1, the script emails the on-call tech the list of changed files. When a ransomware process quietly starts rewriting documents over a weekend, the Monday-morning alert lands hours before anyone opens a file — turning a full restore into a contained incident.
Benefit: hours of early warning, smaller blast radius, lower recovery cost.
Hash files — checksum
checksum <paths...> computes SHA-256 for files (and for files inside given folders). Add --json for machine output or --report for an HTML report.
foldermanifest checksum *.iso --json
foldermanifest checksum *.iso --report checksums.htmlTrust that a transfer arrived intact
Before shipping a drive of raw footage to a post house, an editor hashes the source folder; the post house hashes it on arrival and compares. Identical SHA-256s mean every byte survived the trip — no re-shoots because of a corrupt clip discovered three weeks later.
Benefit: confidence at the handoff, not a nasty surprise downstream.
Reclaim storage — duplicates
duplicates <paths...> finds — and optionally cleans — duplicate files across the given files/folders by comparing contents, so it catches copies even when the filenames differ. (This is distinct from sheet-analyze/sheet-dedupe, which work on rows inside a spreadsheet.)
| Option | Description | Default |
|---|---|---|
--clean | Move extra copies to the Recovery Bin, keeping one per group | off (find only) |
--keep first|last | With --clean, which copy to keep | first |
--report <path> | Write an HTML report | — |
--out <path> | Write the result as JSON | — |
# Find duplicates in a folder
foldermanifest duplicates "C:\Downloads" --report dupes.html
# Find AND clean: move extra copies to the Recovery Bin (reversible)
foldermanifest duplicates "C:\Photos" --cleanCleaning never hard-deletes — copies move to the Recovery Bin and can be restored anytime; each group always keeps one file.
Stop paying to store the same file ten times
A small firm's NAS is nearly full and a storage upgrade is being quoted. A duplicates scan of the shared drive produces an HTML report showing 180 GB of byte-identical copies — the same proposal PDF saved into nine project folders, years of re-downloaded installers, duplicated photo imports. They delete with confidence (matches are content-verified) and defer the upgrade.
Benefit: real money saved, decisions backed by a shareable report.
Compare files & folders
compare-files <a> <b> compares two files and compare-folders <a> <b> compares two folders (added / removed / modified). Both exit 1 when they differ, so they gate scripts just like verify.
foldermanifest compare-files old.pdf new.pdf
foldermanifest compare-folders ".\backup" ".\live"Confirm a move copied everything — before deleting the source
Migrating a 50,000-file project archive to a new server, an admin runs compare-folders between the old and new locations. The report flags 12 files that failed to copy (locked during the run). They re-copy those 12 and re-run until the exit code is 0 — then they wipe the old volume. No silent data loss, no "we'll notice in six months."
Benefit: migrate without fear; delete the source only when it's provably safe.
Inspect metadata — metadata
metadata <paths...> extracts metadata (MIME type, size, embedded fields) from files. Add --json to feed an inventory pipeline or --out to save it.
foldermanifest metadata photo.jpg song.mp3 --json
foldermanifest metadata photos/* --out metadata.jsonClean spreadsheets — sheet-dedupe & sheet-analyze
The spreadsheet commands are namespaced (sheet-) to keep them clearly separate from the file-level duplicates tool. They operate on rows and values inside a CSV/XLSX, not on files.
sheet-dedupe — remove or merge duplicate rows
It has two modes:
- Single file — one file +
--keyremoves duplicate rows. - Cross-source — two or more files are combined and deduped across all of them, matching the key columns by name.
| Option | Description | Default |
|---|---|---|
--key <cols> | Required. Column names or 0-based indices (cross-source matches by name) | — |
--action <a> | keep-first, keep-last, or merge-fill-blanks | keep-first |
--sheet <name> | Worksheet name (XLSX) | first sheet |
--format <f> | Output csv or xlsx | csv |
--out <path> | Cleaned output file | <file>-deduped / combined-deduped |
--report <path> | Also write an HTML report | — |
--list-sheets | List the .xlsx worksheet names and exit (then pick one with --sheet) | — |
# Single file — collapse repeats by Email, filling blanks from later rows
foldermanifest sheet-dedupe contacts.xlsx --key Email --action merge-fill-blanks --format xlsx
# Combine + dedupe across multiple files (key matched by column name)
foldermanifest sheet-dedupe list-a.csv list-b.csv list-c.csv --key Email --out master.csv --report dedupe.htmlsheet-analyze — duplicate-value report (no changes)
Finds duplicate values across cells and reports them per column — so you can see which columns have repeated values before you change anything. Nothing is modified; run it first to understand your data. Limit it with --columns (optional — defaults to all columns), and note this uses --columns, not --key:
# All columns (default)
foldermanifest sheet-analyze contacts.xlsx --report duplicate-values.html
# Only specific columns
foldermanifest sheet-analyze contacts.xlsx --columns Email,PhoneOn either spreadsheet command, --list-sheets prints an .xlsx file's worksheet names and exits (mirroring the app's worksheet picker) so you can pick the right --sheet:
foldermanifest sheet-analyze quarterly.xlsx --list-sheetsMerge three lists without burning your sender reputation
Before a campaign, ops has a webinar list, a trade-show list, and the CRM export — overlapping, with the same person appearing in two or three with different missing fields. One sheet-dedupe with --key Email --action merge-fill-blanks combines all three into a single clean master, filling blank phone numbers and titles from whichever row had them. No contact gets emailed twice, bounce rates stay low, and the mailbox provider keeps trusting the domain.
Benefit: protect deliverability, stop annoying customers, save the cost of a damaged sender reputation.
Recovery Bin — recovery
When the duplicate cleaner removes files (duplicates --clean here, or the app), they go to the Recovery Bin rather than being deleted outright — the same safety net the desktop app uses. The recovery commands manage that bin from the terminal, so you can undo a bulk cleanup or reclaim space without opening the GUI. Restores are reversible; nothing is hard-deleted until you empty it.
| Command | What it does |
|---|---|
recovery list | List items (id, path, size, removed / expiry dates) |
recovery restore <ids...> | Restore the given items (or --all) |
recovery purge | Permanently delete only expired items (those past their retention period) |
recovery empty | Permanently delete all items now, regardless of retention |
foldermanifest recovery list
foldermanifest recovery restore item-12 item-15
foldermanifest recovery restore --allRetention period
Each item is kept for a set time before it is deleted automatically — 7, 30, 90 days, or never (default 30), configured in the app under Settings → Recovery. When an item is moved in, its expiry is removed date + retention. Expired items are auto-purged when the app starts; recovery purge does the same on demand, while recovery empty deletes everything regardless of expiry. A never retention keeps items until you restore or empty them.
Undo a too-aggressive cleanup in seconds
A late-night duplicates --clean sweep removed more than intended. Instead of hunting through folders or a backup, one recovery list shows what moved and recovery restore --all puts it back — and with a 30-day retention, the files were still there to restore.
Benefit: clean aggressively without fear of permanent loss.
Organize folders — organize
The No-Stress File Organizer, from the terminal. It plans first, applies only with your explicit approval, and can undo the entire operation — every move is journaled, destinations are never overwritten, and files stay on one volume (no copy-and-delete).
| Subcommand | What it does |
|---|---|
organize rules | Show built-in presets, conditions, and template tokens (no license required) |
organize preset validate <file> | Validate a .folderpreset.txt rule book |
organize plan <sources...> | Scan and save a reviewable plan — nothing moves |
organize apply <plan> --yes | Apply an approved plan; prints the undo operation id |
organize undo <id> --yes | Restore every file the operation moved |
foldermanifest organize rules --json
foldermanifest organize plan "C:\Downloads" --target "C:\Downloads" --preset tidy-by-type --out plan.folderplan.json
foldermanifest organize apply plan.folderplan.json --yes
foldermanifest organize undo <operation-id> --yesRules are deterministic — ordered, first match wins, no AI required. Four built-in presets ship with the app (minimal-cleanup, tidy-by-type, media-by-date, consolidate-backups), and custom rule books are plain JSON with conditions (name, extension, type, size, dates) and destination templates like Media/{year}/{month}. The saved plan is the same format the desktop app's Organize page edits visually — plan in the terminal, review in the GUI, or vice versa. apply and undo refuse to run without --yes.
The rule book, in full
Each rule has a matchMode (all = every condition must hold, any = at least one), one or more match conditions, and an action (move into a folder, optionally renamed, or leave in place). A file matching no rule stays where it is — add a catch-all “types: all → Other” rule last to sweep up leftovers.
| Condition | Meaning |
|---|---|
nameContains / nameStartsWith / nameEndsWith / nameEquals | Case-insensitive file-name tests |
extensions | File extension, with or without the dot |
types | document, image, video, audio, archive, code, other |
sourceFolders | File lives inside any of these folders (e.g. .git) |
modifiedBefore / modifiedAfter | Modified-date bounds (ISO dates) |
olderThanDays | Modified more than N days ago |
minBytes / maxBytes | File-size bounds |
Tokens for destinations and filenames: {project}, {sourceFolder}, {relativePath}, {name}, {stem}, {ext}, {type}, {year}, {month}, {monthName}, {day}, {shortHash}.
{
"schemaVersion": 1,
"name": "My PDFs",
"rules": [
{ "id": "pdfs", "name": "PDF documents", "enabled": true,
"matchMode": "any",
"match": { "extensions": ["pdf"] },
"action": { "kind": "move", "destination": "PDF" } }
]
}The desktop app's Organize page has a full visual rule editor — no need to write JSON by hand.
Output formats — and why each one matters
- Markdown (
md) — branded, human- and AI-readable, and diffs cleanly in git. Because the brand and URL travel inside the file, an AI agent that ingests your manifest also ingests where it came from. Read-only — not a verify input. - JSON (
json) — the exact machine format. Use it forverifyand for any tool or agent that parses manifests. - HTML (
html) — a rich, shareable human report. (CSV and PDF outputs were dropped.)
Every result command can also save where you choose: --report <file.html> for a formatted report (works for checksum, duplicates, metadata, compare-files, compare-folders, sheet-analyze, and sheet-dedupe) and --out <file.json> for the raw result, manifest, or cleaned spreadsheet.
Reproducible bulk with --config
Define a list of jobs once in a JSON file, then run them anytime. Each job takes the same option names as the equivalent flag, and the overall exit code is the worst (non-zero) result among the jobs — so one command can guard a whole runbook.
{
"jobs": [
{ "cmd": "generate", "paths": ["C:\\Photos"], "format": "json", "out": "photos" },
{ "cmd": "generate", "paths": ["C:\\Docs"], "format": "md,json", "out": "docs" },
{ "cmd": "verify", "paths": ["C:\\Photos"], "manifest": "photos.json" }
]
}foldermanifest --config nightly.jsonOne file becomes the team's repeatable routine
An operations lead encodes the month-end evidence routine — snapshot four controlled folders, verify two baselines — into a single config.json checked into the team repo. Anyone can run it, it produces identical output every time, and when the auditor asks "how do you know this folder is unchanged?", the answer is a version-controlled file and a dated report, not tribal knowledge in one person's head.
Benefit: institutional memory that survives turnover; audits answered in minutes.
For a full walkthrough of scheduling this on Windows, see Automate folder verification with the FolderManifest CLI.
For AI agents (Claude Code, Codex, Cursor)
The CLI is built for coding agents: --help --json makes every command self-describing, output uses a stable { ok, data | error } envelope, exit codes are fixed, and anything destructive requires an explicit --yes. An agent can discover the whole surface without reading these docs:
foldermanifest --help --json # name, version, capabilities
foldermanifest organize --help --json # any command family
foldermanifest organize rules --json # presets, conditions, tokensPaste this prompt into your agent to organize a folder safely:
You have the FolderManifest CLI installed as `foldermanifest`.
It is self-describing: start with `foldermanifest --help --json`, then
`foldermanifest <command> --help --json` for any command. Always pass --json
and parse the { ok, data | error } envelope. Exit codes: 0 ok, 1 drift/error,
2 no license, 3 usage or missing approval. Never invent flags — discover them.
Task: organize the folder <FOLDER> safely.
1. foldermanifest organize rules --json (discover presets and tokens)
2. foldermanifest organize plan "<FOLDER>" --target "<FOLDER>" \
--preset tidy-by-type --out plan.folderplan.json --json
3. Read plan.folderplan.json. Require data.summary.conflicts == 0 — resolve
conflicts by editing entries' relativeDestination, then re-check.
4. Show me the plan summary and WAIT for my explicit approval.
5. foldermanifest organize apply plan.folderplan.json --yes --json
(record data.operationId — it is the undo key)
6. If I ask to revert:
foldermanifest organize undo <operationId> --yes --json
Rules: never run apply or undo without my approval; never delete files
(the CLI cannot — it only moves within one volume and journals every step).The same pattern works for every command family — swap the steps for generate + verify (integrity checks in CI), duplicates --clean (reversible cleanup via the Recovery Bin), or sheet-dedupe (spreadsheet row dedupe). The prompt also ships with a copy button in the desktop app's CLI tab.
Exit codes
Stable codes let Windows Task Scheduler and CI pipelines branch on the result:
| Code | Meaning |
|---|---|
0 | Success / no changes |
1 | Drift detected (verify, compare-*) or a runtime error |
2 | No active license — trial ended or not activated |
3 | Usage error (bad / missing arguments) |
Global options available on every command:
--json Machine-readable JSON to stdout (scripting / agents)
--out <path> Write the result to a custom file
--report <path> Write an HTML report to a custom path
--config <file> Run a batch of jobs from a JSON file (reproducible)
--quiet Suppress the trial reminder line
--help Show usage
--version Show the app versionTrial & licensing
- While on trial, every run prints a one-line reminder to stderr:
Trial: 5 days left — upgrade at https://foldermanifest.com(silence it with--quiet). - When the trial ends (or no license is active), commands stop with exit code
2and an upgrade notice. Your files are never modified in this case. - A paid license removes the reminder. Activate once in the desktop app and the CLI picks up the same license automatically.
Start scripting your folders
The CLI is included with the 7-day trial and every lifetime license — install once on Windows, macOS, or Linux and run it from any terminal.
Troubleshooting
| Symptom | Fix |
|---|---|
foldermanifest not found | Reopen the terminal so it picks up the updated PATH, then try again. |
Exit code 2 | Activate a trial/paid license in the desktop app. |
verify reports everything changed | Make sure the manifest is .json or .html, not .md. |
| Need exact output for a script | Add --json. |
Frequently asked questions
What is the FolderManifest CLI?
It is a command-line interface to every FolderManifest feature — generate manifests, verify folders, hash files, find duplicate files, extract metadata, compare files and folders, and dedupe spreadsheets. It ships inside the desktop app on Windows, macOS, and Linux and is included with the trial and every paid license. Run `foldermanifest <command>` in any terminal.
Is the FolderManifest CLI free or a separate download?
It is not a separate download and not published to npm or winget. The CLI is part of the installed desktop app and is available to trial and paid users — the same license as the GUI. Without an active trial or license, commands print an upgrade notice and do not modify files.
How do I verify folder integrity from the command line?
First create a JSON manifest with `foldermanifest generate "C:\Path" --format json --out baseline`, then run `foldermanifest verify "C:\Path" --manifest baseline.json`. Exit code 0 means nothing changed; exit code 1 means drift was detected, so the command slots straight into scripts, Windows Task Scheduler, and CI pipelines.
What are the CLI exit codes?
0 = success / no changes, 1 = drift detected (verify, compare-*) or a runtime error, 2 = no active license (trial ended or not activated), 3 = usage error (bad or missing arguments). Stable codes let Windows Task Scheduler and CI pipelines branch on the result.
Can I merge and dedupe multiple CSV files from the command line?
Yes. `foldermanifest sheet-dedupe list-a.csv list-b.csv list-c.csv --key Email --out master.csv` combines all the files and removes duplicates, matching the key columns by name across sources. Use `--action merge-fill-blanks` to combine partial records instead of dropping them.
Does the CLI need the app window to be open?
No. Each command starts a short-lived headless process, does the work, and exits — it works whether the app window is open or closed, which is exactly what you want for Windows Task Scheduler or a Linux cron job.
What operating systems does the FolderManifest CLI support?
Windows, macOS, and Linux. The same commands, flags, and exit codes behave identically on every platform, so scripts stay portable — schedule with Task Scheduler on Windows, launchd on macOS, or cron / a systemd timer on Linux.
How long does the Recovery Bin keep cleaned duplicates?
Each item is kept for its retention period — 7, 30, 90 days, or never (default 30), set in the app under Settings → Recovery. Expiry is the removed date plus the retention period. Expired items are auto-purged when the app starts; `foldermanifest recovery purge` deletes only expired items on demand, while `recovery empty` permanently deletes everything regardless of expiry. Until then, `recovery restore <ids...>` or `recovery restore --all` brings files back.
Can the CLI organize messy folders automatically?
Yes — `foldermanifest organize` plans a cleanup from deterministic rules (built-in presets like tidy-by-type and media-by-date, or your own rule book), saves the plan as JSON for review, applies it only with an explicit --yes, and can undo the entire operation by id. Destinations are never overwritten and every step is journaled, so nothing is ever lost.
Can AI agents like Claude Code or Codex use the FolderManifest CLI?
Yes — the CLI is self-describing. An agent runs `foldermanifest --help --json` to discover every command, then `<command> --help --json` for flags. All output uses a stable { ok, data | error } JSON envelope with fixed exit codes, and destructive steps (organize apply/undo, duplicates --clean) require an explicit --yes, so agents cannot mutate files without an approval step. A paste-ready agent prompt is in the docs and in the app’s CLI tab.
What output formats does the CLI produce?
Markdown (md) — branded, human- and AI-readable, and git-friendly; JSON — the exact machine format used for verification and by tools and AI agents; and HTML — a rich human report. Markdown is read-only and rejected by verify; use JSON or HTML to verify against. (CSV and PDF outputs were dropped.)