Command line
A guide to vault-zip-cli, made for automation (RPA and the like). It uses the same ledger as the app, and both can run at the same time.
Before you start
- Passwords are never passed as arguments. Pass them through standard input (
--pass-stdin). There is no--passwordoption. - Add
--jsonwhen a program reads the result: each run prints one JSON object. - Existing files are never overwritten.
Main commands
vault-zip-cli compress -i folder --json # create (a password is generated and kept in the ledger)
vault-zip-cli compress -i folder --each # one ZIP per item inside
vault-zip-cli extract -i archive.zip -o dest --json # extract, using the ledger's password
vault-zip-cli pdf encrypt -i report.pdf --json # password-protect a PDF
vault-zip-cli pdf decrypt -i report_encrypted.pdf # make a copy without the password
vault-zip-cli pdf check -i report.pdf --json # look at a PDF (changes nothing)
vault-zip-cli identify file... --json # what a file is, from its content
vault-zip-cli search term --json # search the ledger
vault-zip-cli reveal <ID> # show a password from the ledger
vault-zip-cli status --json # state of the ledger and backups
There are also commands for backups (backup), the recovery key (recovery-key), settings (settings), licences (license) and administrator policies (policy). vault-zip-cli --help lists them all.
Choosing the password yourself
echo your-password| vault-zip-cli compress -i memo.txt --pass-stdin --json
A password is 1–128 printable ASCII characters. --print-password shows a generated password on screen; keep it out of automated flows, because it would end up in run logs.
Moving the originals to the Recycle Bin (--purge)
After compressing and verifying, the originals are moved to the Recycle Bin (desktop only). It acts only when the originals still match the ZIP and the Recycle Bin can take them, and it never deletes outright. Otherwise the originals stay and the exit code is 4.
Exit codes
| Exit code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error |
| 3 | Partly failed (e.g. --each); the rest succeeded |
| 4 | --purge: the ZIP was made but the originals were kept |
| 10 | Input not found |
| 11 | Output already exists (nothing overwritten) |
| 12 | Not enough free space |
| 13 | Other I/O error |
| 20 | No usable password |
| 21 | Wrong password |
| 22 | Data failed authentication: damaged or altered |
| 23 | Rejected by the safety checks |
| 24 | Not an archive, or an unsupported feature |
| 25 | The archive is damaged |
| 26 | A recognised format that Vault-ZIP does not read |
| 29 | More than 100,000 entries (needs --allow-many-entries) |
| 30 | Ledger database error |
| 31 | The ledger exists but its key is missing |
| 32 | OS keystore error |
| 33 | Portable copy: wrong passphrase |
| 40 | Backup error |
| 41 | Not a valid licence file |
| 42 | Not allowed by an administrator policy |
| 50 | Cancelled |
| 60 | A PDF was refused (already encrypted, signed, and so on) |
| 70 | Unexpected internal error |
The JSON result carries ok, the error code, warnings and more. Portable copies take the passphrase through --unlock-stdin; for automation, an installed copy is the better choice.