Quickstart¶
Import documents, find and organize them, then test recovery in a temporary
vault. These examples use a Unix shell. Set DOCBANK_HOME first so the commands
use a scratch vault:
Import some documents¶
add copies files into the vault. Sources are never modified or deleted.
Directories import recursively: the directory's own name becomes a
folder under --dest, and the relative structure underneath is
preserved. Without --dest, files land in /inbox.
The daemon¶
The first add command starts the daemon, the background process that owns
and reads the vault. Data commands start it automatically when needed. Use
docbank daemon status to inspect it and docbank daemon stop to stop it. It
also exits after a period of inactivity. See Daemon
for startup and lifetime rules.
Repeat the same import to see the completed files skipped. Docbank checks content at the destination name and its collision suffixes. See Importing documents for the matching rules.
Browse the tree¶
SELECTOR KIND SIZE MODIFIED NAME
id:14 dir 0 2026-07-06T21:14:03Z 2024
id:102 dir 0 2026-07-06T21:14:05Z 2025
id:231 file 48211 2026-07-06T21:14:08Z checklist.pdf
tree prints the whole hierarchy with node IDs:
For an interactive view of the same tree, open the terminal browser:
Use the arrow keys or j/k to select a document, Enter to open a directory,
and / to search names and extracted text. Press i to inspect the document's
IDs, revision, and content hash, or a for its permanent audit timeline.
Press x to review moving the selected revision to recoverable trash, or T
to browse and restore trash roots. Press O for the read-only storage inventory
and configured backup recovery points. The TUI does not expose permanent
deletion or maintenance mutations. See the
interactive terminal browser guide for the complete key map.
cat streams a file's bytes to stdout. To save a local file, use get. It
verifies the complete download in a private temporary file before publishing
the destination:
Every imported file also has an immutable content version with its own UUID:
docbank versions list /taxes/checklist.pdf
docbank versions show <version-id> --json
docbank versions cat <version-id> > /tmp/checklist-version.pdf
The version ID survives node renames and moves. Replace the current content while keeping the same file node:
docbank put ~/Documents/revised-checklist.pdf /taxes/checklist.pdf
docbank versions list /taxes/checklist.pdf
put hashes the source before contacting the daemon, then inspects the target
and uploads it, showing separate progress for both file passes. The upload
requires the target revision it just observed, so it fails if the target
changed in the meantime instead of overwriting that change. The prior version
remains available through docbank versions cat <old-version-id>. Adopt it as
current without erasing the replacement:
Reverting creates a new current version that records the older version it uses. Docbank reuses the stored bytes and preserves both earlier versions. See Editing and versions for retention and revision rules.
For text and other editor-friendly files, edit verifies a private copy, opens
the blocking command from VISUAL or EDITOR, and creates a replacement only
when the result changed. GUI editors need their wait flag, for example
VISUAL='code --wait'.
Organize independently with tags¶
Tags survive path changes because assignments use stable tag and node IDs:
The human CLI accepts the current tag name or UUID. Input shaped like a
canonical UUID is always treated as an ID, even if a tag has that string as its
display name. docbank tag list shows revisions and assignment counts.
tag rename changes only the display name. tag delete removes assignments
without deleting any document.
Reorganize¶
Moves and renames change only metadata. The stored bytes do not move.
# Rename in place (destination doesn't exist; its parent does)
docbank mv /taxes/checklist.pdf /taxes/filing-checklist.pdf
# Move into an existing directory, keeping the name
docbank mv /taxes/filing-checklist.pdf /taxes/2025
Search¶
Search matches the start of each word in document names and supported current text. Every term must match:
Trash and recovery¶
rm is soft deletion. The node (and its subtree, for directories) moves to
the trash and its name becomes reusable:
docbank trash list # what's recoverable
docbank restore 15 # put it back where it was
docbank trash empty --older-than 30d # dry run: report old trash
docbank trash empty --older-than 30d --run # permanently delete old trash
Reclaim and verify¶
Emptying the trash deletes tree entries, but the underlying bytes remain
until you garbage-collect. gc is a dry run by default. It removes loose files
directly and marks unreachable packed payload as pending repack:
3 candidate blob(s), 0 untracked file(s), 1204882 loose byte(s) reclaimable
dry run — pass --run to delete
docbank gc --run
docbank storage status # shows dead packed payload, if any
docbank storage repack # compacts eligible sparse packs
docbank verify # re-hash every stored blob
Prove recovery¶
A backup repository stores recovery snapshots outside the live vault. Each capture reuses unchanged content from earlier snapshots. The commands below perform this recovery test:
- Create temporary backup and restore directories.
- Initialize a repository and capture the vault.
- List and verify the snapshots.
- Restore the latest snapshot into a separate vault.
- Browse and verify the restored vault.
export DOCBANK_BACKUP=$(mktemp -d)
export DOCBANK_RESTORE=$(mktemp -d)
docbank backup init --repo "$DOCBANK_BACKUP"
docbank backup create --repo "$DOCBANK_BACKUP"
docbank backup list --repo "$DOCBANK_BACKUP"
docbank backup verify --repo "$DOCBANK_BACKUP"
docbank backup restore --repo "$DOCBANK_BACKUP" --target "$DOCBANK_RESTORE"
DOCBANK_HOME="$DOCBANK_RESTORE" docbank tree /
DOCBANK_HOME="$DOCBANK_RESTORE" docbank verify
You can use the restored vault independently. Restore does not replace the running source vault. See Backup and restore for progress modes, snapshot selection, overwrite rules, and the proof that restore returns.
That is the core document workflow. From here:
- Capabilities gives the complete product map.
- The Visual tour shows the real interfaces.
- Vault lifecycle covers maintenance and upgrades.
- Docbank for agents covers automation.
- The CLI reference documents each command.