unar
$ unar Community Low Riskunar and its companion lsar extract and inspect ZIP, RAR, 7z, tar, and legacy-encoded archives safely. lsar -j emits full JSON archive manifests read-only, while unar supports -o output directories and -s/-r/-f flags to avoid interactive collision prompts.
brew install unar Local lsar -j and unar -o out/ handle archive inspection and encoding-safe extraction without MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Companion lsar -j emits clean JSON manifests; unar runs headlessly when -s, -r, or -f is supplied, though bare unar prompts on collisions.
lsar -joutputs structured JSON archive contentsunarprompts on existing files unless-s,-r, or-fis set
Local-only extraction with automatic single-subdirectory containment by default and explicit -s/-r non-overwrite flags.
- Creates containing directory when archive has multiple top-level items
Available via brew install unar, Linux distro packages (apt install unar), and Windows builds.
- Cross-platform CLI package
Handles RAR, 7z, ZIP, and CJK/legacy filename encodings cleanly where standard unzip fails or garbles names.
- Automatic character encoding detection (
-eoverride)
Established LGPL-2.1 project (The Unarchiver / MacPaw) widely shipped in distros.
- Mature upstream tool with broad Linux/macOS adoption
Man pages (unar(1), lsar(1)) and -h help cover all extraction and JSON flags.
- Documented CLI flags and man pages
Security, Auth & Guardrails
None required; reads local archive files only.
100% free, offline, and open-source (LGPL-2.1).
# unar / lsar Agent Rules - Always run `lsar -j <archive>` first to inspect paths and detect zip-bombs or path clutter. - Always pass `-s` (skip), `-r` (rename), or `-f` (overwrite) with `unar -o <dir>` so file collisions never trigger interactive prompts.
Agent-Ready Command Recipes
Safe Read-Only Queries
lsar -j archive.zip
Uses companion lsar -j to emit a structured JSON manifest of filenames, sizes, and detected encoding read-only.
Controlled Writes & Previews
unar -r -o ./extracted archive.rar
Extracts into ./extracted (-o) and auto-renames (-r) on collisions instead of blocking for user input.
Strengths for Agents
- +
lsar -jprovides native JSON inspection of ZIP, RAR, 7z, and tar archives. - + Automatically detects legacy filename encodings and avoids tar-bombing the working directory.
Caveats & Pitfalls
- !
unarprompts interactively if destination files exist unless-s,-r, or-fis passed.