Command Line Guide

Every command the cipherpaths CLI supports, its environment variables, the interactive session, and how quoting differs across shells.

1. Overview

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.

  • Same source file builds unmodified for Windows and Linux (x86_64 / ARM64) — no per-platform CLI code.
  • Every command that touches a vault unlocks it first — a deliberately slow, memory-hard Argon2id derivation designed to resist password brute-forcing.
  • Two ways to run commands: single-shot (one process, one unlock, per command) or interactive (unlock once, run many commands) — see Interactive mode.

2. Getting the CLI

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.

System requirements

PlatformRequirements
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.
macOSUnder consideration — not yet built.
The Linux x64 binary being statically linked is a deliberate choice, not a default: its Argon2id vault encryption needs OpenSSL 3.2 or newer, but none of the current mainstream Linux distributions ship that by default — Ubuntu 22.04/24.04 LTS, Debian 12 and RHEL/AlmaLinux 9 all still ship OpenSSL 3.0.x. A dynamically-linked build would fail to unlock a vault on almost any current server out of the box. Static linking bakes a known-good OpenSSL into the binary instead, at the cost of a larger file (~9–10 MB) and needing a rebuild to pick up future OpenSSL security fixes, rather than an OS package update.

3. Quick reference

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".

CommandSyntaxDescription
initcipherpaths init <vault-dir>Create a new vault in an empty folder and print its one-time recovery key.
opencipherpaths open <vault-dir>Unlock the vault once and enter an interactive session — see §8.
lscipherpaths ls <vault-dir> [/logical/path]List the vault root, or a folder inside it.
mkdircipherpaths mkdir <vault-dir> /logical/path [web|creditcard|contact]Create a folder, optionally tagged with a record type.
addcipherpaths add <vault-dir> /logical/parent <source-file>Encrypt a file from disk into the vault.
catcipherpaths cat <vault-dir> /logical/path/file.txtDecrypt a text file straight to the terminal.
exportcipherpaths export <vault-dir> /logical/path/file <dest-dir>Decrypt a file or whole folder back out to plaintext.
mvcipherpaths mv <vault-dir> /logical/path <new-name>Rename a file, folder or account in place.
movecipherpaths move <vault-dir> /logical/path /dest/folder [new-name]Move a file, folder or account elsewhere in the vault.
rmcipherpaths rm <vault-dir> /logical/pathPermanently delete a file, folder or account. There is no encrypted trash.
setpwcipherpaths setpw <vault-dir> /TopFolder <url> <user> <password|-> [2fa]Create or update a web-login credential. Auto-creates the top-level folder.
setcccipherpaths setcc <vault-dir> /TopFolder <cardholder> <card-no|-> <expiry> <cvv|-> <issuer>Create or update a credit-card credential.
setcontactcipherpaths setcontact <vault-dir> /TopFolder <full-name> <email> <phone> <address> <city> <state> <postal> <country> <dob>Create or update a contact-details record.
getpwcipherpaths getpw <vault-dir> /TopFolderPrint the credential (of any type) stored in a folder.
notecipherpaths note <vault-dir> /Folder "<text>"Attach or replace a free-text note on a folder.
getnotecipherpaths getnote <vault-dir> /FolderPrint the note stored in a folder.
searchcipherpaths search <vault-dir> <query>Search every decrypted field — URLs, usernames, notes and more — for a match.
changepwcipherpaths changepw <vault-dir>Change the master password. Every encrypted file stays exactly as it is.
versioncipherpaths versionPrint the CLI and OpenSSL version.
A folder name or note containing spaces must be quoted, e.g. /"Chase bank" or "my note text" — see §9 for how each shell handles that.

4. Vaults & the master password

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
# ========================================================

5. Browsing & files

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

6. Credentials, notes & search

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.

7. Secrets: environment variables & the "-" prompt

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:

  • Pass - in place of any password / card-number / CVV argument to be prompted for it interactively instead, with the terminal echo suppressed.
  • Set an environment variable so the master password isn't typed at all — useful for scripting, at the cost of the value being readable from the process environment while the script runs.
VariableEffect
CIPHERPATHS_PASSWORDMaster password — skips the "Master password:" prompt for every command.
CIPHERPATHS_RECOVERY_KEYUnlocks the vault with the recovery key instead of the master password.
CIPHERPATHS_NEW_PASSWORDNew password for changepw — skips the interactive prompt and confirmation.
cipherpaths setpw ./myvault /Bank https://bank.example jsmith -
# Password: ****************
Prefer the interactive prompt (-) for anything but automated/CI use. Environment variables are convenient, but anything that can read this process's environment can read the secret too.

8. Interactive mode (open)

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
  • Type 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.
  • Quote any argument containing spaces, e.g. 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
The difference is dramatic for anything beyond a handful of commands: a ~30-command script measured around 30× faster run through one 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.

9. Quoting on different shells

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.

ShellWrap an argument with spacesEmbed $, %, &, ^ 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: "!@#$%%^&*()"
In cmd.exe specifically, do not try to escape a literal double quote with a backslash (\") 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 "!@#$%%^&*()"

10. Exit codes & scripting

CodeMeaning
0Success.
1Usage error — missing/incorrect arguments, a vault already exists at init, or mismatched password confirmation at changepw.
2A CipherPaths error — wrong master password, path not found, corrupted vault header, and similar.
3An 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.

11. See also

  • The Users Guide — the same vault concepts (recovery key, credential types, folders) from the GUI's point of view.
  • The GUI's own command-line option — a single argument to 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.
  • The FAQ for general questions, and Download for current platform availability.