Because the 7-Zip CLI leaves a lot to be desired.
This tool is a very, very thin wrapper around the 7-Zip CLI. It's barely anything more than simple parameter translation. This tool makes little to no attempt to validate option compatibility - that is left up to 7-Zip.
This tool was developed and tested on Debian.
Update: this tool used to be only a thin wrapper around the 7-Zip CLI. I've started adding scripts that add a little bit of validation and a little bit of utility; those are py7z-*
. The "barebones translation" tool still exists as py7z.
Prerequisites are Python and 7-Zip. The first version of this project was built with Python 3.12 and used 7-Zip 24.08.
Just put the tools somewhere on PATH. That's all.
- py7z: the "barebones translation" tool that does little more than translate parameters to 7-Zip's obtuse syntax
- py7z2: a "unified command" with subcommands (not unlike git(1)) and a little more argument parsing logic
- py7z-ls: list files in an archive
- py7z-hash: hash files and archive contents
- Call
py7z
- Profit
You can optionally set the environment variable PY7Z_7Z_PATH
to use a specific path to 7-Zip. If not set, PATH is searched for 7z
.