CLI reference
Every peel command: what it does, the flags that matter, a JSON example, and the exit codes to branch on.
peel is both the Mac app’s command-line tool and the simplest way to drive Rind from any language. Run peel --help or peel <command> --help for the live text. This page is the guide to it.
The sixteen commands covered here are extract, list, test, probe, inspect, cat, assess, recover, find-originals, unlock, salvage, repair, create, open, completions and mcp. A few more exist and are listed under More commands.
Conventions
- Default form.
peel archive.zip [members…]is the same aspeel extract archive.zip [members…]. - Output folder. Extraction writes beside the archive unless you pass
-o DIR. - JSON.
-j/--jsonprints a machine-readable result on standard output. A failure is then one JSON line on standard error:{"error": "<kind>", "detail": "…"}, plusneededandavailablefornot_enough_space. - Progress.
--ndjson-progressprints newline-delimited progress events on standard error during extract, at most about ten a second. - Quiet.
-qsuppresses human output that is not an error.
Passwords
Prefer a pipe, which no other process can see. -p / --password is visible in the process list, and PEEL_PASSWORD can be read by any process of the same user while peel runs.
| Flag | Meaning |
|---|---|
--password-stdin | Read the password from standard input. One trailing newline is dropped. |
--password-fd N | Read it from an inherited file descriptor. |
-p, --password PW | On the command line. Shows in ps. |
security find-generic-password -s backup -w | peel extract locked.zip -o out --password-stdinExit codes
| Code | Meaning | Code | Meaning |
|---|---|---|---|
| 0 | success | 9 | decompression bomb |
| 1 | failure | 10 | too large |
| 2 | usage | 11 | not found |
| 3 | password required | 12 | invalid name |
| 4 | incorrect password | 13 | unsafe entry |
| 5 | damaged | 14 | already exists |
| 6 | not enough space | 16 | other I/O |
| 7 | unsupported | ||
| 8 | permission denied |
Read an archive
inspect
The manifest: format, totals, and each entry with its type, size, compressed size and, where the format records them, mode, modified time, owner, symlink target, compression method and CRC-32. It reads the index and does not decompress. Fields a format does not carry are left out, not defaulted.
peel inspect [-j] [-p…] ARCHIVEpeel inspect demo.zip -j{
"format": "zip",
"format_family": "zip",
"zip_kind": "generic",
"has_encrypted_entries": false,
"total_uncompressed_bytes": 12,
"total_compressed_bytes": 16,
"diagnostics": [],
"entries": [
{ "name": "src/a.txt", "kind": "file", "is_dir": false, "size": 6,
"compressed_size": 8, "compression_method": "Deflated", "crc32": 909783072,
"mode": 33188, "modified_unix": 1794121084, "is_encrypted": false }
]
}list
List members, optionally filtered by patterns. For header-encrypted archives pass the password. Aliases: l, ls, lsar.
peel list [-l] [-j] ARCHIVE [PATTERN…]| Flag | Meaning |
|---|---|
-l, --long | Long listing with size and type. |
--expand-payload | Installer packages: also list the files inside each Payload and Scripts. |
peel list demo.zip -j[
{ "name": "src/", "is_dir": true, "size": 0 },
{ "name": "src/a.txt", "is_dir": false, "size": 6 },
{ "name": "src/b.md", "is_dir": false, "size": 6 }
]probe
Identify the format, the multi-volume layout and the entry count, and report what Rind can do with that format.
peel probe [-j] ARCHIVEpeel probe demo.zip -j{
"path": "demo.zip",
"format": "zip",
"entries": 3,
"multipart": false,
"volumes": ["demo.zip"],
"capabilities": {
"list": "supported", "extract_all": "supported", "extract_selected": "supported",
"create": "supported", "password": "supported", "multipart": "supported"
},
"session": { "id": "demo.zip:308:1794121085", "state": "open" }
}cat
Print one member’s contents to standard output without unpacking the rest. Aliases: c.
peel cat [--max-bytes N] ARCHIVE MEMBER| Flag | Meaning |
|---|---|
--max-bytes BYTES | Largest member to read. Default 64 MiB. A bigger member fails with exit code 10. |
peel cat demo.zip src/a.txtExtract and create
extract
Extract everything, or only the members and globs you name. Existing files are not replaced unless you say so. Aliases: x, e, unar.
peel extract [options] ARCHIVE [MEMBER|GLOB…]| Flag | Meaning |
|---|---|
-o, --out DIR | Output directory. Default: the folder containing the archive. |
-f, --force-overwrite | Replace existing files. |
-r, --force-rename | Keep both, renaming the new file. This is the default. |
-s, --force-skip | Leave existing files alone. |
-d, --force-directory | Always extract into an enclosing folder. |
-D, --no-directory | Never create an enclosing folder. |
--deep | Keep unpacking archives found inside, all the way down. |
--delete | Delete the source archive after a successful extract. |
--no-expand-payload | Installer packages: keep Payload and Scripts as archives instead of expanding them. |
--ndjson-progress | Progress events on standard error. |
peel extract demo.zip -o out -j{
"format": "zip",
"destination": "out",
"extracted": ["out/src", "out/src/a.txt", "out/src/b.md"],
"skipped": [],
"sources": ["demo.zip"]
}With --ndjson-progress, standard error carries one event per line:
{"phase":"extract","entries_done":0,"entries_total":3,"bytes_done":0,"bytes_total":null,"current_entry":null,"destination":"o2"}
{"phase":"done","entries_done":3,"entries_total":3,"bytes_done":0,"bytes_total":null,"current_entry":null}create
Make an archive from files and folders. The format comes from the output name: .zip, .7z, .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.zst / .tzst, or a single stream such as .gz or .zst. A password makes an AES-256 ZIP or 7z; for any other format it is refused rather than written unprotected. The archive is written to a temporary file and moved into place, so a failed create never leaves a partial one. Aliases: pack.
peel create [options] OUTPUT [INPUT…]| Flag | Meaning |
|---|---|
-n, --no-clobber | Fail instead of replacing an existing output. |
--volume-size SIZE | Split into numbered volumes, for example 100M or 1G. Writes out.zip.001, .002… for ZIP, 7z and tar. |
--long | zstd long-distance matching, for .zst and .tar.zst. |
--dict FILE | Compress a .zst with a dictionary from peel train. The dictionary is written beside the output and is needed to read it back. |
--password-stdin | Encrypt with a password read from standard input. |
peel create site.tar.zst ./public -j{ "output": "site.tar.zst", "format": "tar.zst", "entries": 41 }open
Open archives as folders in Finder, as a double-click does. This needs Peel.app and a logged-in Mac desktop, so it is for people, not for servers and scripts.
peel open ARCHIVE…Check and recover
test
Read every entry to the end and report which fail. It does not write anything. unchecked counts entries the format has no per-entry reader for. Aliases: t.
peel test [-j] [--password-stdin] ARCHIVEpeel test demo.zip -j{ "format": "Zip", "ok": true, "entries": 3, "verified": 2, "unchecked": 0, "failures": [] }A failing entry appears in failures as { "name": …, "error": … }.
assess
Look at a locked archive and say whether recovery is realistic, without trying a single password: the encryption scheme, whether file names are hidden, multi-volume state, and a feasibility rating. Aliases: a.
peel assess [-j] ARCHIVEpeel assess demo.zip -j{
"path": "demo.zip",
"format": "zip",
"encryption": { "scheme": "none" },
"metadata": "not-applicable",
"volumes": { "state": "single" },
"structurally_intact": true,
"entry_count": 3,
"techniques": [],
"feasibility": "plausible",
"recovery_record": false,
"parity": null,
"notes": ["This archive is not encrypted. It opens without a password."]
}salvage
Recover readable files from a damaged or truncated ZIP, tar, bzip2 or single compressed stream that a normal extract refuses. Each file is reported recovered, partial or unrecoverable. A salvaged archive is never presented as whole. Aliases: sv.
peel salvage -o DIR [-j] ARCHIVEpeel salvage broken.zip -o recovered -j{
"recovered": 1, "partial": 0, "unrecoverable": 0,
"outcomes": [ { "name": "src/b.md", "status": "recovered", "bytes": 6, "reason": "" } ],
"written": ["recovered/src/b.md"]
}repair
Verify a file against the PAR2 parity set beside it and rebuild damaged or missing data. TARGET is the data file or the .par2 index. A file is reported repaired only after the set re-verifies it. Aliases: par2.
peel repair [--check] [-j] TARGET| Flag | Meaning |
|---|---|
--check | Verify only. Change nothing. |
peel repair archive.rar --checkWith no .par2 set beside the file it fails with {"error":"other","detail":"no .par2 parity set found beside …"}.
find-originals
Search folders for files that match what is inside a locked archive, by name and size. Finding an original is what makes unlock possible. Aliases: fo.
peel find-originals [-j] ARCHIVE [FOLDER…]peel find-originals locked.zip ~/Documents -j{
"assembled": null,
"report": {
"entries_matched": 2, "entries_total": 2,
"matches": [ { "entry": "src/a.txt", "found_at": "/Users/me/Documents/a.txt", "size": 6 } ]
}
}unlock
Open a ZipCrypto ZIP without its password, from a copy of one of its files that you still have. It searches the folders you name plus the likely default places, and writes the recovered files to -o. It does not work on AES-encrypted archives. Aliases: uz.
peel unlock -o DIR [--known ENTRY=FILE]… ARCHIVE [FOLDER…]| Flag | Meaning |
|---|---|
--known ENTRY=FILE | A known original for one entry. Repeatable. Matched on contents, so the file’s own name need not match. |
--no-default-locations | Do not also search the archive’s folder, ~/Downloads and ~/Desktop. |
peel unlock locked.zip ~/Documents -o recovered --known notes/a.txt=./a-copy.txtrecover
Try to recover a forgotten password from what you remember: words you use, numbers, years, separators. It generates candidates from your hints and tests them against the archive. Strong AES encryption cannot be brute-forced and Rind does not pretend otherwise; run assess first. Aliases: r.
peel recover --base WORD [options] ARCHIVE| Flag | Meaning |
|---|---|
--base WORD | A word you tend to use. Repeatable. |
--number N, --sep S | A number you often append, and a separator you put before it. Repeatable. |
--year-from Y, --year-to Y | A plausible range of years. |
--caps, --leet, --endings | Also try capitalised variants, letter-to-digit swaps (a→4, e→3) and common endings (!, !!). |
--budget N | Cap on candidates to generate. |
--pcfg | Order candidates by password-structure likelihood first. |
--measure | Measure how many passwords a second this Mac can check, then stop. |
--show-password | Print the recovered password. Off by default. |
peel recover mine.zip --base sunset --number 7 --year-from 2015 --year-to 2024 --caps --endingsUse recovery only on archives that are yours or that you are allowed to open.
Integrate
completions
Print a shell completion script for bash, zsh, fish, powershell or elvish.
peel completions SHELLpeel completions zsh > ~/.zfunc/_peelmcp
Run a Model Context Protocol server over standard input and output. --root grants a folder that extract and create may write to and pack from. See the MCP guide.
peel mcp [--root DIR]…peel mcp --root ~/Projects/siteMore commands
| Command | What it does |
|---|---|
formats | List supported formats and how each is handled. -j adds the capability flags and the per-format metadata that inspect carries. |
diagnose | Build a privacy-safe report to attach to a bug report: format, size, entry count, error kind and finding codes, with no names, paths or contents. |
edit | Add, replace or remove members of a ZIP in place. |
train | Train a zstd dictionary from a folder of similar small files, for create --dict. |
recover-plan | Run the recovery plan for a locked archive: show the ordered steps, attempt the safe ones you give inputs for (--from, --base, --allow-repair), and write anything recovered to -o. |
upgrade | Re-wrap an archive you can open in AES-256 encryption, written to -o. A .7z output also hides file names. The original is never changed. |
recompress | Recompress a gzip, zlib or raw DEFLATE file into a smaller one that restores the exact original. Writes nothing unless it shrinks and round-trips byte for byte. |
restore | Restore the exact original from a file made by recompress. |
recover-stream | Recover verified bytes from a damaged PNG, ustar or PDF stream in one pass, with a mask of which bytes passed their format’s own check. |
unsolidify | Re-pack a solid archive (7z, tar.xz and similar) as a non-solid ZIP, for cheap edits and instant random access. |
solidify | Re-pack an archive as a solid 7z, the densest form. |
reflect | Print the engine’s capability index as a self-describing JSON envelope; --sign signs it with this installation’s key. |
man | Print the peel(1) man page to standard output. |