LockBox CLI documentation
LockBox CLI is the English-only automation build for scripted encryption, extraction, activation, scheduled encrypted backups, and CI/CD workflows. It uses the same device-bound license model as the desktop app.
Quick start
Put LockBox.Cli.exe in a folder included in PATH,
or call it by full path. The --cli marker is accepted for compatibility
but is not required in the CLI-only build.
.\LockBox.Cli.exe --help
.\LockBox.Cli.exe device-id
.\LockBox.Cli.exe algorithms
.\LockBox.Cli.exe keygen --count 3
Minimal create and open workflow:
$env:LBX_MASTER = "use-a-long-master-password"
$env:LBX_L1 = "layer-1-key"
.\LockBox.Cli.exe create `
--source "D:\Data" `
--output "E:\Backups\data.lbx" `
--master-env LBX_MASTER `
--layer-env AES-128-GCM=LBX_L1
.\LockBox.Cli.exe open `
--container "E:\Backups\data.lbx" `
--output "D:\Restore" `
--master-env LBX_MASTER `
--key-env LBX_L1
Linux uses the same commands with slash paths and a binary without the .exe suffix:
chmod +x ./LockBox.Cli
./LockBox.Cli --help
./LockBox.Cli device-id
./LockBox.Cli create \
--source "/srv/data" \
--output "/backup/data.lbx" \
--master-env LBX_MASTER \
--layer-env AES-128-GCM=LBX_L1Activation and license status
The license key is bound to the device ID printed by the same CLI build. If a license is copied to another PC, LockBox rejects it and falls back to Free.
Windows checks the existing LockBox application data locations. Linux stores activation in
$XDG_CONFIG_HOME/lockbox/.lockbox.license, then
~/.config/lockbox/.lockbox.license, with ~/.lockbox/.lockbox.license
as a fallback.
Get device ID
.\LockBox.Cli.exe device-id
Check current edition
.\LockBox.Cli.exe license
Activate from a license file
.\LockBox.Cli.exe activate --license-file "C:\Licenses\lockbox-license.txt"
Activate from an environment variable
$env:LBX_LICENSE = "LBX-LIC-..."
.\LockBox.Cli.exe activate --license-env LBX_LICENSE
Activate inline
Inline activation works, but it can leak through shell history or process logs.
.\LockBox.Cli.exe activate --license "LBX-LIC-..."
Linux activation
export LBX_LICENSE="LBX-LIC-..."
./LockBox.Cli activate --license-env LBX_LICENSE
./LockBox.Cli licenseSecret handling
Prefer environment variables or files. Inline secrets are useful for testing only. Master passwords and layer keys must be preserved: without them the container cannot be opened.
| Purpose | Inline | Environment | File |
|---|---|---|---|
| Master password | --master value |
--master-env ENV |
--master-file path |
| Create layer key | --layer ALG=KEY |
--layer-env ALG=ENV |
--layer-file ALG=FILE |
| Open layer key | --key value |
--key-env ENV |
--key-file path |
| Scheduler file password | --password value |
--password-env ENV |
--password-file path |
| Container destruction password | --destruction-password value |
--destruction-password-env ENV |
--destruction-password-file path |
| License key | --license value |
--license-env ENV |
--license-file path |
File-based secrets
Set-Content -Path ".\master.txt" -Value "master-password" -Encoding UTF8
Set-Content -Path ".\layer1.txt" -Value "layer-key-1" -Encoding UTF8
.\LockBox.Cli.exe create `
-s "D:\Data" `
-o "E:\Backups\data.lbx" `
--master-file ".\master.txt" `
--layer-file AES-128-GCM=.\layer1.txtAlgorithms and key generation
Use algorithms to see all supported profiles and minimum editions.
Use keygen for layer keys.
.\LockBox.Cli.exe algorithms
.\LockBox.Cli.exe keygen
.\LockBox.Cli.exe keygen --count 9
.\LockBox.Cli.exe generate-keys -n 20
Supported command aliases:
algorithms
list-algorithms
profiles
keygen
generate-key
generate-keysCreate containers
create packs a source folder, applies optional compression and padding,
encrypts the payload through one or more layers, and writes a .lbx container.
Required options
--sourceor-s: source folder.--outputor-o: output.lbxpath.--master,--master-env, or--master-file.- At least one layer:
--layer,--layer-env, or--layer-file.
Minimal AES container
.\LockBox.Cli.exe create `
-s "D:\Data" `
-o "E:\Backups\data.lbx" `
--master-env LBX_MASTER `
--layer-env AES-128-GCM=LBX_L1
Compressed container
.\LockBox.Cli.exe create `
--source "D:\Exports" `
--output "E:\Backups\exports.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--compress
Crypto padding
.\LockBox.Cli.exe create `
-s "D:\Contracts" `
-o "E:\Backups\contracts.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--padding 2GB
Split container into parts
.\LockBox.Cli.exe create `
-s "D:\Media" `
-o "E:\Backups\media.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--split 700MB
The first part keeps .lbx. Additional parts use
.lbx1, .lbx2, and so on. Keep all parts in the same folder.
Nine-layer Max example
$env:LBX_MASTER = "use-a-long-master-password"
$env:LBX_L1 = "layer-1-key"
$env:LBX_L2 = "layer-2-key"
$env:LBX_L3 = "layer-3-key"
$env:LBX_L4 = "layer-4-key"
$env:LBX_L5 = "layer-5-key"
$env:LBX_L6 = "layer-6-key"
$env:LBX_L7 = "layer-7-key"
$env:LBX_L8 = "layer-8-key"
$env:LBX_L9 = "layer-9-key"
.\LockBox.Cli.exe create `
--source "D:\Data" `
--output "E:\Backups\data-max.lbx" `
--master-env LBX_MASTER `
--compress `
--padding 2GB `
--split 700MB `
--layer-env AES-256-GCM=LBX_L1 `
--layer-env CHACHA20-POLY1305=LBX_L2 `
--layer-env AES-256-CCM=LBX_L3 `
--layer-env SERPENT-256-CTR-HMACSHA512=LBX_L4 `
--layer-env TWOFISH-256-CTR-HMACSHA512=LBX_L5 `
--layer-env CAMELLIA-256-CTR-HMACSHA512=LBX_L6 `
--layer-env ARIA-256-CTR-HMACSHA512=LBX_L7 `
--layer-env AES-256-CBC-HMACSHA512=LBX_L8 `
--layer-env AES-192-OFB-HMACSHA384=LBX_L9
Alternative algorithm/key syntax
.\LockBox.Cli.exe create `
-s "D:\Data" `
-o "E:\Backups\data.lbx" `
--master-env LBX_MASTER `
--algorithm AES-128-GCM --key-env LBX_L1 `
--algorithm AES-128-CTR-HMACSHA256 --key-env LBX_L2
Delete source after successful manual creation
.\LockBox.Cli.exe create `
-s "D:\TempToEncrypt" `
-o "E:\Backups\temp.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--delete-source
--delete-source deletes the source folder only after the container is created successfully.
Scheduler has a different option: --delete-source-contents.
Container destruction password
Max edition can add a separate destruction password to a container. If that password is entered later as the master password, LockBox immediately overwrites the container without confirmation. This is intended for coercion-pressure scenarios. Keep it separate from the real master password.
The command verifies free disk space, encrypts the original container data with a fresh random
secret and AES-256-GCM into a temporary file, normalizes the result to the exact original size,
replaces the original file, and forgets the random secret. For split containers, every
.lbx, .lbx1, .lbx2 part in the same folder is replaced
while preserving the original part sizes.
Create with a destruction password
$env:LBX_MASTER = "real-master-password"
$env:LBX_L1 = "layer-key-1"
$env:LBX_DESTROY = "pressure-password"
.\LockBox.Cli.exe create `
--source "D:\Data" `
--output "E:\Backups\data.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--destruction-password-env LBX_DESTROY
Trigger destruction without layer keys
.\LockBox.Cli.exe open `
--container "E:\Backups\data.lbx" `
--output "D:\Restore" `
--master-env LBX_DESTROY
Linux trigger
export LBX_DESTROY="pressure-password"
./LockBox.Cli open \
--container "/backup/data.lbx" \
--output "/restore" \
--master-env LBX_DESTROY
After successful destruction the container is no longer a valid LockBox file. The CLI returns
exit code 0 because the requested destruction action completed successfully.
Open containers
open extracts a container to the output folder. For normal extraction, layer keys must
be passed in the same order used during creation. For a destruction-password workflow, only the
container path, output path, and destruction password as the master password are required.
Open a one-layer container
.\LockBox.Cli.exe open `
--container "E:\Backups\data.lbx" `
--output "D:\Restore" `
--master-env LBX_MASTER `
--key-env LBX_L1
Open a split container
.\LockBox.Cli.exe open `
-c "E:\Backups\data.lbx" `
-o "D:\Restore" `
--master-env LBX_MASTER `
--key-env LBX_L1
Open a multi-layer container
.\LockBox.Cli.exe open `
-c "E:\Backups\data-max.lbx" `
-o "D:\Restore" `
--master-env LBX_MASTER `
--key-env LBX_L1 `
--key-env LBX_L2 `
--key-env LBX_L3 `
--key-env LBX_L4 `
--key-env LBX_L5 `
--key-env LBX_L6 `
--key-env LBX_L7 `
--key-env LBX_L8 `
--key-env LBX_L9
Aliases
open
decrypt
extractScheduler
Scheduler commands are available in Max edition. They store full task metadata
in an encrypted .lbxjobs file, including source path, output path,
passwords, destruction password, layer keys, compression, padding, splitting, and
delete-source-contents setting.
Scheduled jobs run only while LockBox.Cli.exe schedule run is running.
Use Windows Task Scheduler, Linux systemd, cron, a service wrapper, or a long-running console
session if you need the worker to start automatically after reboot.
Frequency values
once
30m
hourly
2h
3h
6h
9h
12h
18h
daily
2d
3d
5d
weekly
2w
monthly
2mo
3mo
6mo
9mo
yearly
Add a daily encrypted backup task
$env:LBX_JOBS_PASSWORD = "jobs-file-password"
$env:LBX_MASTER = "master-password"
$env:LBX_L1 = "layer-key-1"
$env:LBX_DESTROY = "pressure-password"
.\LockBox.Cli.exe schedule add `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD `
--name "Nightly data backup" `
--frequency daily `
--start 2026-06-25T23:30:00 `
--source "D:\Data" `
--output "E:\Backups\nightly-data.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--destruction-password-env LBX_DESTROY `
--compress
Add a task that deletes source folder contents after success
.\LockBox.Cli.exe schedule add `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD `
--name "Encrypt outgoing folder" `
--frequency 30m `
--start 2026-06-25T09:00:00 `
--source "D:\Outgoing" `
--output "E:\Backups\outgoing.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--delete-source-contents
Add a monthly archive with padding and split parts
.\LockBox.Cli.exe schedule add `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD `
--name "Monthly legal archive" `
--frequency monthly `
--start 2026-07-01T03:00:00 `
--source "D:\Legal" `
--output "E:\Archives\legal-monthly.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--compress `
--padding 4GB `
--split 2GB
List saved tasks
.\LockBox.Cli.exe schedule list `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD
Run the scheduler worker
.\LockBox.Cli.exe schedule run `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD `
--state "E:\Backups\jobs.status.json" `
--poll-seconds 30
Run due tasks once and exit
.\LockBox.Cli.exe schedule run-once `
--tasks "E:\Backups\jobs.lbxjobs" `
--password-env LBX_JOBS_PASSWORD `
--state "E:\Backups\jobs.status.json"
Show latest runtime status
.\LockBox.Cli.exe schedule status --state "E:\Backups\jobs.status.json"
Status markers are [OK], [RUNNING], and [FAILED].
A failed task includes the reason and tells the user to contact support if the problem repeats.
JSON scripts
Use --script when a workflow has several steps. The script runner supports
create, open, keygen, algorithms,
device-id, license, and activate.
Create and open in one script
{
"stopOnError": true,
"commands": [
{
"command": "create",
"source": "D:\\Data",
"output": "E:\\Backups\\data.lbx",
"masterPasswordEnv": "LBX_MASTER",
"destructionPasswordEnv": "LBX_DESTROY",
"compression": true,
"padding": "512MB",
"split": "700MB",
"layers": [
{ "algorithm": "AES-256-GCM", "keyEnv": "LBX_L1" },
{ "algorithm": "CHACHA20-POLY1305", "keyEnv": "LBX_L2" }
]
},
{
"command": "open",
"container": "E:\\Backups\\data.lbx",
"output": "D:\\Restore",
"masterPasswordEnv": "LBX_MASTER",
"keyEnvs": [ "LBX_L1", "LBX_L2" ]
}
]
}
.\LockBox.Cli.exe --script ".\backup.lockbox.json"
Continue after a failed step
{
"stopOnError": false,
"commands": [
{ "command": "license" },
{ "command": "algorithms" },
{
"command": "create",
"source": "D:\\BuildOutput",
"output": "E:\\Artifacts\\build.lbx",
"masterPasswordEnv": "LBX_MASTER",
"layers": [
{ "algorithm": "AES-128-GCM", "keyEnv": "LBX_L1" }
]
}
]
}
Activate from script
{
"commands": [
{
"command": "activate",
"licenseKeyFile": "C:\\Licenses\\lockbox-license.txt"
},
{ "command": "license" }
]
}Automation recipes
Encrypted database dump backup
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$dump = "D:\DbDumps\$stamp"
New-Item -ItemType Directory -Path $dump | Out-Null
Copy-Item "D:\DatabaseExports\*" $dump -Recurse
.\LockBox.Cli.exe create `
-s $dump `
-o "E:\Backups\db-$stamp.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--compress `
--padding 512MB
CI artifact protection
.\LockBox.Cli.exe create `
--source "$env:BUILD_ARTIFACTSTAGINGDIRECTORY" `
--output "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\protected-artifacts.lbx" `
--master-env LBX_MASTER `
--layer-env AES-128-GCM=LBX_L1 `
--compress
Secure partner transfer
.\LockBox.Cli.exe create `
-s "D:\PartnerPackage" `
-o "E:\Transfer\partner-package.lbx" `
--master-env LBX_MASTER `
--layer-env AES-256-GCM=LBX_L1 `
--layer-env CHACHA20-POLY1305=LBX_L2 `
--compress `
--split 1GB
Long-term archive
.\LockBox.Cli.exe create `
-s "D:\Records\2026" `
-o "E:\ColdStorage\records-2026.lbx" `
--master-file "C:\Secrets\records-master.txt" `
--layer-file AES-256-GCM=C:\Secrets\records-layer1.txt `
--layer-file SERPENT-256-CTR-HMACSHA512=C:\Secrets\records-layer2.txt `
--compress `
--padding 8GB `
--split 4GB
Batch file example
@@echo off
set LBX_MASTER=master-password
set LBX_L1=layer-key-1
LockBox.Cli.exe create ^
--source "D:\Data" ^
--output "E:\Backups\data.lbx" ^
--master-env LBX_MASTER ^
--layer-env AES-128-GCM=LBX_L1
if errorlevel 1 exit /b %errorlevel%
echo OKCommand reference
| Command | Purpose | Aliases |
|---|---|---|
help | Show console help. | --help, -h, ? |
device-id | Print PC device ID for license issue. | deviceid, machine-id |
license | Show current edition and license path. | license-status, status |
activate | Install a device-bound license key. | activation |
algorithms | List algorithms and minimum editions. | profiles, list-algorithms |
keygen | Generate random keys. | generate-key, generate-keys |
create | Create encrypted container. | encrypt |
open | Extract encrypted container. | decrypt, extract |
schedule | Manage and run scheduled tasks. | scheduler, scheduled-tasks |
script | Run JSON automation file. | --script |
Create options
--source, -s | Folder to pack and encrypt. |
--output, -o | Output .lbx path. |
--master | Inline master password. |
--master-env | Read master password from environment variable. |
--master-file | Read master password from UTF-8 text file. |
--layer | Add ALGORITHM=KEY. |
--layer-env | Add ALGORITHM=ENV. |
--layer-file | Add ALGORITHM=FILE. |
--algorithm, -a | Alternative algorithm form paired with --key, --key-env, or --key-file. |
--compress | Enable compression. |
--no-compress | Disable compression if set earlier. |
--padding | Add encrypted random padding. Units: B, KB, MB, GB, TB. |
--padding-bytes | Padding size in raw bytes. |
--split | Split output into .lbx, .lbx1, .lbx2. |
--split-bytes | Split part size in raw bytes. |
--no-split | Disable splitting if set earlier. |
--destruction-password | Max-only inline destruction password. Entering it later as the master password overwrites the container immediately. |
--destruction-password-env | Read the Max-only destruction password from an environment variable. |
--destruction-password-file | Read the Max-only destruction password from a UTF-8 text file. |
--delete-source | Delete source folder after successful manual creation. |
Open options
--container, -c | Existing .lbx container. |
--output, -o | Extraction folder. |
--master, --master-env, --master-file | Master password source. |
--key, -k | Inline layer key in original order. |
--key-env | Layer key from environment variable. |
--key-file | Layer key from UTF-8 text file. |
— | Allowed for destruction-password workflows. Normal extraction fails after metadata reading if required keys are missing. |
Scheduler options
schedule add | Add a task to encrypted .lbxjobs. |
schedule list | Show saved tasks. |
schedule run | Run long-lived worker. |
schedule run-once | Run due tasks once and exit. |
schedule status | Read latest runtime status JSON. |
--tasks, --file | Encrypted task file path. |
--password, --password-env, --password-file | Password for task file. |
--state, --status-file | Runtime status JSON path. |
--name | Task name for schedule add. |
--frequency, --every | Task frequency. |
--start, --start-at | Local start date/time. |
--delete-source-contents | Delete original source folder contents after successful scheduled run. |
--poll-seconds | Worker polling interval for schedule run. |
Troubleshooting
Why do I get exit code 3?
The current edition does not allow the requested feature: too many layers, compression, crypto padding, splitting, scheduler, or a stronger algorithm.
Why does extraction fail with an authentication tag error?
The master password, layer key, layer order, or container file is wrong. For split containers, also verify that every part is present in the same folder.
Why does the scheduler not run after I close the console?
schedule run is the worker process. Keep it open, or launch it from Windows Task Scheduler or a service wrapper.
Why does schedule add fail immediately?
The scheduler validates license, source folder, output path, algorithms, passwords, and available disk space before saving the task.
Can I store scheduler passwords inside the .lbxjobs file?
Yes. The .lbxjobs file is encrypted with the scheduler file password and stores full task metadata, including encryption passwords and layer keys.
What happens if a scheduled run overlaps the previous run?
The new event is skipped, the task reports a failed status with an explanation, and future runs continue after the active run finishes.
How do I avoid secrets in shell history?
Use --master-env, --master-file, --layer-env, --layer-file, --destruction-password-env, --destruction-password-file, --password-env, and --password-file.