CLI reference

Every peel command: what it does, the flags that matter, a JSON example, and the exit codes to branch on.

Peel 1.4.0 · Snack Studio · Updated

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

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.

FlagMeaning
--password-stdinRead the password from standard input. One trailing newline is dropped.
--password-fd NRead it from an inherited file descriptor.
-p, --password PWOn the command line. Shows in ps.
Shell
security find-generic-password -s backup -w | peel extract locked.zip -o out --password-stdin

Exit codes

CodeMeaningCodeMeaning
0success9decompression bomb
1failure10too large
2usage11not found
3password required12invalid name
4incorrect password13unsafe entry
5damaged14already exists
6not enough space16other I/O
7unsupported
8permission 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.

SynopsisText
peel inspect [-j] [-p…] ARCHIVE
Shell
peel inspect demo.zip -j
Output (trimmed)JSON
{
  "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.

SynopsisText
peel list [-l] [-j] ARCHIVE [PATTERN…]
FlagMeaning
-l, --longLong listing with size and type.
--expand-payloadInstaller packages: also list the files inside each Payload and Scripts.
Shell
peel list demo.zip -j
OutputJSON
[
  { "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.

SynopsisText
peel probe [-j] ARCHIVE
Shell
peel probe demo.zip -j
Output (trimmed)JSON
{
  "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.

SynopsisText
peel cat [--max-bytes N] ARCHIVE MEMBER
FlagMeaning
--max-bytes BYTESLargest member to read. Default 64 MiB. A bigger member fails with exit code 10.
Shell
peel cat demo.zip src/a.txt

Extract 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.

SynopsisText
peel extract [options] ARCHIVE [MEMBER|GLOB…]
FlagMeaning
-o, --out DIROutput directory. Default: the folder containing the archive.
-f, --force-overwriteReplace existing files.
-r, --force-renameKeep both, renaming the new file. This is the default.
-s, --force-skipLeave existing files alone.
-d, --force-directoryAlways extract into an enclosing folder.
-D, --no-directoryNever create an enclosing folder.
--deepKeep unpacking archives found inside, all the way down.
--deleteDelete the source archive after a successful extract.
--no-expand-payloadInstaller packages: keep Payload and Scripts as archives instead of expanding them.
--ndjson-progressProgress events on standard error.
Shell
peel extract demo.zip -o out -j
OutputJSON
{
  "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:

Progress events (NDJSON)JSON
{"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.

SynopsisText
peel create [options] OUTPUT [INPUT…]
FlagMeaning
-n, --no-clobberFail instead of replacing an existing output.
--volume-size SIZESplit into numbered volumes, for example 100M or 1G. Writes out.zip.001, .002… for ZIP, 7z and tar.
--longzstd long-distance matching, for .zst and .tar.zst.
--dict FILECompress a .zst with a dictionary from peel train. The dictionary is written beside the output and is needed to read it back.
--password-stdinEncrypt with a password read from standard input.
Shell
peel create site.tar.zst ./public -j
Output (shape)JSON
{ "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.

SynopsisText
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.

SynopsisText
peel test [-j] [--password-stdin] ARCHIVE
Shell
peel test demo.zip -j
OutputJSON
{ "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.

SynopsisText
peel assess [-j] ARCHIVE
Shell
peel assess demo.zip -j
OutputJSON
{
  "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.

SynopsisText
peel salvage -o DIR [-j] ARCHIVE
Shell
peel salvage broken.zip -o recovered -j
Output (shape)JSON
{
  "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.

SynopsisText
peel repair [--check] [-j] TARGET
FlagMeaning
--checkVerify only. Change nothing.
Shell
peel repair archive.rar --check

With 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.

SynopsisText
peel find-originals [-j] ARCHIVE [FOLDER…]
Shell
peel find-originals locked.zip ~/Documents -j
Output (trimmed)JSON
{
  "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.

SynopsisText
peel unlock -o DIR [--known ENTRY=FILE]… ARCHIVE [FOLDER…]
FlagMeaning
--known ENTRY=FILEA known original for one entry. Repeatable. Matched on contents, so the file’s own name need not match.
--no-default-locationsDo not also search the archive’s folder, ~/Downloads and ~/Desktop.
Shell
peel unlock locked.zip ~/Documents -o recovered --known notes/a.txt=./a-copy.txt

recover

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.

SynopsisText
peel recover --base WORD [options] ARCHIVE
FlagMeaning
--base WORDA word you tend to use. Repeatable.
--number N, --sep SA number you often append, and a separator you put before it. Repeatable.
--year-from Y, --year-to YA plausible range of years.
--caps, --leet, --endingsAlso try capitalised variants, letter-to-digit swaps (a→4, e→3) and common endings (!, !!).
--budget NCap on candidates to generate.
--pcfgOrder candidates by password-structure likelihood first.
--measureMeasure how many passwords a second this Mac can check, then stop.
--show-passwordPrint the recovered password. Off by default.
Shell
peel recover mine.zip --base sunset --number 7 --year-from 2015 --year-to 2024 --caps --endings

Use 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.

SynopsisText
peel completions SHELL
Shell
peel completions zsh > ~/.zfunc/_peel

mcp

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.

SynopsisText
peel mcp [--root DIR]…
Shell
peel mcp --root ~/Projects/site

More commands

CommandWhat it does
formatsList supported formats and how each is handled. -j adds the capability flags and the per-format metadata that inspect carries.
diagnoseBuild 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.
editAdd, replace or remove members of a ZIP in place.
trainTrain a zstd dictionary from a folder of similar small files, for create --dict.
recover-planRun 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.
upgradeRe-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.
recompressRecompress 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.
restoreRestore the exact original from a file made by recompress.
recover-streamRecover 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.
unsolidifyRe-pack a solid archive (7z, tar.xz and similar) as a non-solid ZIP, for cheap edits and instant random access.
solidifyRe-pack an archive as a solid 7z, the densest form.
reflectPrint the engine’s capability index as a self-describing JSON envelope; --sign signs it with this installation’s key.
manPrint the peel(1) man page to standard output.