Every command the cipherpaths CLI supports, its environment variables, the interactive session, and how quoting differs across shells.
cipherpaths is a command-line front end for the same portable encryption core used by the CipherPaths Windows GUI (see the Users Guide). It reads and writes the exact same vault format, so a vault can be opened with either tool interchangeably — create it in the GUI and script it from the CLI, or the other way around.
The CLI has no separate --flag-style options. Instead it works like git or docker: a single executable, one command word (init, ls, setpw, …), then positional arguments. Every command below is documented in full in the quick reference table.
Download the CLI from the Download page — one ZIP with Windows builds (x64 and ARM64) and a Linux build (x64); macOS is under consideration. Each platform's folder in the ZIP also includes runnable example scripts (demo-vault.cmd/demo-vault-interactive.ps1 for Windows, demo-vault.sh/demo-vault-interactive.sh for Linux) that walk through creating a vault, adding several sites, and reading everything back — in both single-shot and interactive style — more extensive than the short snippets on this page, and a good starting point to copy and adapt.
The executable is named cipherpaths.exe on Windows and cipherpaths on Linux. Confirm it runs with:
cipherpaths version
# cipherpaths-cli 0.9.3 (OpenSSL 3.5.5 ...)
Running the executable with no arguments prints the same command list as the quick reference below.
| Platform | Requirements |
|---|---|
| Windows 10 / 11 (x64, ARM64) | None — the executable is self-contained, the same as the GUI. |
| Linux (x64) | None. The binary is fully statically linked (OpenSSL, libstdc++, libgcc and glibc are all built in) — no package needs to be installed on the machine running it. It should run unmodified on any x86_64 Linux distribution, old or new. |
| Linux (ARM64) | Cross-compiled and dynamically linked; needs OpenSSL 3.2+ on the target machine (see note below). Not yet packaged for release. |
| macOS | Under consideration — not yet built. |
Every command, straight from cipherpaths's own built-in help. <angle-bracket> arguments are required, [square-bracket] arguments are optional, and a|b means "one of a or b".
| Command | Syntax | Description |
|---|---|---|
init | cipherpaths init <vault-dir> | Create a new vault in an empty folder and print its one-time recovery key. |
open | cipherpaths open <vault-dir> | Unlock the vault once and enter an interactive session — see §8. |
ls | cipherpaths ls <vault-dir> [/logical/path] | List the vault root, or a folder inside it. |
mkdir | cipherpaths mkdir <vault-dir> /logical/path [web|creditcard|contact] | Create a folder, optionally tagged with a record type. |
add | cipherpaths add <vault-dir> /logical/parent <source-file> | Encrypt a file from disk into the vault. |
cat | cipherpaths cat <vault-dir> /logical/path/file.txt | Decrypt a text file straight to the terminal. |
export | cipherpaths export <vault-dir> /logical/path/file <dest-dir> | Decrypt a file or whole folder back out to plaintext. |
mv | cipherpaths mv <vault-dir> /logical/path <new-name> | Rename a file, folder or account in place. |
move | cipherpaths move <vault-dir> /logical/path /dest/folder [new-name] | Move a file, folder or account elsewhere in the vault. |
rm | cipherpaths rm <vault-dir> /logical/path | Permanently delete a file, folder or account. There is no encrypted trash. |
setpw | cipherpaths setpw <vault-dir> /TopFolder <url> <user> <password|-> [2fa] | Create or update a web-login credential. Auto-creates the top-level folder. |
setcc | cipherpaths setcc <vault-dir> /TopFolder <cardholder> <card-no|-> <expiry> <cvv|-> <issuer> | Create or update a credit-card credential. |
setcontact | cipherpaths setcontact <vault-dir> /TopFolder <full-name> <email> <phone> <address> <city> <state> <postal> <country> <dob> | Create or update a contact-details record. |
getpw | cipherpaths getpw <vault-dir> /TopFolder | Print the credential (of any type) stored in a folder. |
note | cipherpaths note <vault-dir> /Folder "<text>" | Attach or replace a free-text note on a folder. |
getnote | cipherpaths getnote <vault-dir> /Folder | Print the note stored in a folder. |
search | cipherpaths search <vault-dir> <query> | Search every decrypted field — URLs, usernames, notes and more — for a match. |
changepw | cipherpaths changepw <vault-dir> | Change the master password. Every encrypted file stays exactly as it is. |
version | cipherpaths version | Print the CLI and OpenSSL version. |
/"Chase bank" or "my note text" — see §9 for how each shell handles that.
A vault is an ordinary folder; init creates one and prints a recovery key exactly once — write it down, it cannot be shown again (see the Users Guide's recovery key section). Every other command needs the master password to unlock the vault first, either typed at a prompt or supplied via an environment variable.
cipherpaths init ./myvault
# Create master password: ********
# Password strength: Strong
# ==================== RECOVERY KEY ====================
# XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
# ========================================================
Logical paths inside a vault always start with / and mirror the folder structure you'd see in the GUI. Any account (or sub-folder) can also hold encrypted files, not just a credential:
cipherpaths mkdir ./myvault /Taxes/2025
cipherpaths add ./myvault /Taxes/2025 ./payslip.pdf
cipherpaths ls ./myvault /Taxes/2025
Bring a file back out to plaintext with export, or print a text file straight to the terminal with cat:
cipherpaths export ./myvault /Taxes/2025/payslip.pdf ./restored
cipherpaths cat ./myvault /Taxes/2025/notes.txt
setpw creates the top-level folder automatically if it doesn't exist yet, tagged as a web-login record — no mkdir needed first:
cipherpaths setpw ./myvault /GitHub https://github.com/login me@example.com 'Tr0ub4dor&3' totp
cipherpaths getpw ./myvault /GitHub
Attach a note to the same folder, and search across every decrypted field in the vault:
cipherpaths note ./myvault /GitHub "Recovery codes are printed and stored in the safe."
cipherpaths search ./myvault github
setcc (credit card) and setcontact (contact details) work the same way with their own field lists — see the quick reference for the full argument order.
Typing a password directly as a command-line argument puts it in your shell history and makes it visible to other processes on the machine (e.g. ps -ef on Linux, or anything reading /proc/<pid>/environ). The CLI gives you two ways around that:
- in place of any password / card-number / CVV argument to be prompted for it interactively instead, with the terminal echo suppressed.| Variable | Effect |
|---|---|
CIPHERPATHS_PASSWORD | Master password — skips the "Master password:" prompt for every command. |
CIPHERPATHS_RECOVERY_KEY | Unlocks the vault with the recovery key instead of the master password. |
CIPHERPATHS_NEW_PASSWORD | New password for changepw — skips the interactive prompt and confirmation. |
cipherpaths setpw ./myvault /Bank https://bank.example jsmith -
# Password: ****************
-) for anything but automated/CI use. Environment variables are convenient, but anything that can read this process's environment can read the secret too.Every command in the quick reference re-unlocks the vault from scratch and exits — fine for one-off use, but each unlock is a deliberately expensive Argon2id derivation, so a script issuing many commands back to back pays that cost every single time. open unlocks once and drops into a prompt where the same commands run repeatedly against the already-unlocked vault, with the leading <vault-dir> argument omitted:
cipherpaths open ./myvault
# Master password: ********
# Vault opened: ./myvault
# Type 'help' for commands, 'exit' or 'quit' to leave.
cipherpaths> setpw /GitHub https://github.com/login me@example.com 'Tr0ub4dor&3'
cipherpaths> getpw /GitHub
cipherpaths> exit
help for the in-session command list, exit or quit to leave (Ctrl+D / Ctrl+Z also works).changepw works inside a session too — the vault stays open and usable straight afterwards.init and open are not valid inside a session; a vault must already be open.setpw "/Chase bank" ... — there is no shell inside the prompt to split it for you.A whole batch of commands can be piped in at once, which is the fast way to script many changes — one unlock instead of one per command:
# bash — commands.txt has one command per line, ending in "exit"
cat commands.txt | cipherpaths open ./myvault
open session than as 30 separate single-shot invocations — one Argon2id unlock instead of 30. See demo-vault.sh/demo-vault.cmd versus their -interactive counterparts in the download package for the side-by-side comparison.
The CLI's own argument parsing is identical everywhere — the differences below come entirely from how each shell tokenizes a command line before cipherpaths ever sees it. This matters most for a folder name with a space, or a password containing shell-special characters.
| Shell | Wrap an argument with spaces | Embed $, %, &, ^ etc. literally |
|---|---|---|
| bash (Linux) | 'Chase bank' | Single quotes make everything literal — no escaping needed: '!@#$%^&*()' |
| PowerShell (Windows) | 'Chase bank' | Single quotes make everything literal, same as bash: '!@#$%^&*()' |
| cmd.exe (Windows) | "Chase bank" | Double quotes do not protect % — a literal percent must be doubled: "!@#$%%^&*()" |
\") the way C/C++ or JSON do — cmd has no such escape. A stray \" closes the quoted string early and corrupts everything after it on the line, including letting % and ^ become active again unexpectedly.
# bash / PowerShell — nothing needs escaping inside single quotes
cipherpaths setpw ./myvault "/Chase bank" https://chase.com jsmith '!@#$%^&*()'
# cmd.exe — a literal % must be doubled, even inside quotes
cipherpaths setpw .\myvault "/Chase bank" https://chase.com jsmith "!@#$%%^&*()"
| Code | Meaning |
|---|---|
0 | Success. |
1 | Usage error — missing/incorrect arguments, a vault already exists at init, or mismatched password confirmation at changepw. |
2 | A CipherPaths error — wrong master password, path not found, corrupted vault header, and similar. |
3 | An unexpected internal error. |
All of a command's normal output goes to standard output; errors go to standard error prefixed with Error: or Unexpected error:, so scripts can check $? / %ERRORLEVEL% / $LASTEXITCODE and keep stdout clean for parsing.
CipherPathsWin.exe that jumps straight to one vault's unlock screen. That's a different, much smaller feature from the full CLI documented on this page.