Encrypt from the command line (clavis-cli)
clavis-cli does what the app does — same vaults, same file format — from a terminal, for scripts and scheduled backups.
The Windows installer adds it to your PATH, so it works in any new PowerShell or Command Prompt window. On Linux it's at
/opt/clavis/bin/clavis-cli.
PS C:\Users\Alex> clavis-cli encrypt Reports Password: encrypted Reports\Board minutes.docx -> 17e78c42-c597-4d6d-aea8-c2bdf31cda4f.enc encrypted Reports\Q3 sales.xlsx -> 79ce6ba9-89a8-465d-bbea-2afce5bac6bd.enc 2 files. PS C:\Users\Alex> clavis-cli list Reports Password: Board minutes.docx 17e78c42-c597-4d6d-aea8-c2bdf31cda4f.enc Q3 sales.xlsx 79ce6ba9-89a8-465d-bbea-2afce5bac6bd.enc PS C:\Users\Alex> clavis-cli verify Reports Password: ok Reports\17e78c42-c597-4d6d-aea8-c2bdf31cda4f.enc (Board minutes.docx, 8.8 KB) ok Reports\79ce6ba9-89a8-465d-bbea-2afce5bac6bd.enc (Q3 sales.xlsx, 7.3 KB) 2 files.
Commands
| Command | What it does |
|---|---|
clavis-cli encrypt FILES… | Encrypt files or folders (originals are securely deleted) |
clavis-cli decrypt FILES… | Decrypt .enc files or folders |
clavis-cli verify [FILES…] | Check encrypted files are intact (current folder if none given) |
clavis-cli list [FOLDER] | Show the real names of .enc files |
clavis-cli help | All commands and options |
Options: --vault NAME · --key-file PATH · --keep (keep the originals) · --out DIR ·
--password-stdin · --quiet. Wildcards like *.docx work in cmd.exe too.
Passwords in scripts
clavis-cli asks for the password on the console, hidden. For scripts, pipe it in with --password-stdin.
It never accepts a password as an argument: arguments are visible to other programs and end up in your shell history.
Exit codes
0 success · 1 some files failed · 2 usage error · 3 needs Clavis Premium ·
4 wrong password or key file. Command-line runs show up in Activity too.
Can't find what you need? All help articles · Email us