Crisper
RU
Terminal · version 3.5.1

Crisper in the terminal

The dan command does to a container everything the app does: creates and unpacks it, edits it in place, searches and checks it, holds a store of keys and a vault container. Made for servers, scripts and backups; runs on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, Solaris and illumos.

01 Quick start

Pack, look inside, unpack

-method sets the action, everything else is options. Every option has two forms: -name value and --name=value. A container is an .adn file; -workers 0 puts every core to work, -progress shows progress.

Create a container from a folder

dan -method INTRACT -name photos -src ./photos -dest ./box \
    -cipher AES256 -password "secret" -workers 0 -progress

See what's inside

dan -method INFO -danube ./box/photos.adn -password "secret"

Unpack

dan -method EXTRACT -danube ./box/photos.adn -dest ./restored -password "secret" -workers 0 -progress
02 Methods

Thirty-eight actions on a container

MethodWhat it does
Creating and extracting
INTRACTcreates a container from a file or folder
EXTRACTextracts the contents — all of it, a single node by name or number, or the whole tag set by -tag
CONVERTconverts a legacy container to the current format (one-way: it never converts back)
APPENDadds a file or folder to a finished container
DELETEremoves a node from the container
RENAMErenames a node
MOVEmoves one or more nodes to another folder of the container
MKLINKcreates a symbolic link inside the container
Search and information
SEARCHsearches by name — in a container or in a folder on disk
FOLDERshows a node's full path inside the container
INFOinformation about the container or a node
DETAILEDdetailed information about the container or a node
COUNTcounts nodes
SIZEcalculates data size
PARTSthe number of container parts
AUTHORauthor details — no password needed
Container flags
ENCRYPTchecks whether the container is encrypted
READONLYchecks whether the container was created read-only — no password needed
VAULTchecks whether the container is a vault — no password needed
Store of keys
MKSECRETSmarks a folder as a secrets node
RMSECRETSremoves the secrets node sign
ADDSECRETadds a key to a secrets node or to a workspace
SECRETSlists the keys of a secrets node — values are masked
SECRETshows information about one key
EXPORTSECRETSexports keys to disk as a tree of JSON files
IMPORTSECRETSloads keys back from a JSON file or folder
Content tags
MKTAGcreates a tag with a selection rule: part of the name, extension, scope node
ADDTAGadds a node to a tag by number, or nodes by rule
EDITTAGreplaces the rule of a tag: the found set is rebuilt, while the name, manual nodes and the position in the list stay
DETTAGdetaches nodes from a tag — the node stays in the container but drops out of this tag
TAGSlists tags: name, node count, update date
TAGshows the composition of one tag
DELTAGdeletes a tag
RENTAGrenames a tag
TAGREFRESHrecomputes tag composition by their rules
Encryption keys
KEYGENgenerates an RSA key pair: private and public
Checks
DIAGNOSTICchecks the container's integrity
PROBEprobes file or folder content: kind and entropy

Nodes — the container's files and folders — are addressed by number: -nid 8 or a list -nids "3|4|5". INFO and SEARCH print the numbers. INFO, DETAILED, COUNT, SIZE and SEARCH also work on an ordinary folder: pass -src instead of -danube.

03 Options

What you can specify

OptionPurpose
Container
-danubepath to the .adn container file
-srcthe file or folder being packed or added
-destwhere to save: a folder on disk or a node number in the container
-namecontainer or node name; for search — the name to look for
-passwordencryption password
-ciphercontainer cipher: AES128, AES192, AES256, KUZNYECHIK, SM4, CHACHA20, MAGMA_MGM, KUZNYECHIK_MGM, DES, DES3, BLOWFISH (synonyms MAGMA, 3DES, CHACHA20POLY1305); an unknown name is rejected
-kdfhash for deriving the key from the password: SHA256 (default), SHA384, SHA512, STREEBOG256, STREEBOG512, SM3, BLAKE2S256, BLAKE2B512
-frameSizetarget size of one part (partition) of the container: B/KB/MB/GB; 500 MB by default. A value larger than the whole data set yields a single partition. This is not the compression frame — see -minFrame/-maxFrame
-releaseon extraction, remove the parts whose data has been extracted
-noeditforbid further editing of the container
-readonlycreate a read-only container: it cannot be changed after creation, and the flag is visible without a password
-vaultcreate a vault container: its records cannot be extracted to disk, and the flag is visible without a password
Nodes and filters
-nid / -nidsa node number or a list of numbers separated by |; for MKTAG and EDITTAG this is the scope node of the rule, for ADDTAG and DETTAG — the nodes attached to or detached from the tag
-exactsearch for an exact name match
-absolutesearch only inside the given node
-whitelisttake only these extensions: "jpg|png"
-blacklistskip these extensions
Tags
-tagtag name: create, show, delete, rename, change its rule or detach nodes; for RENTAG this is the old name
-patternpart of the name for a tag rule; for EDITTAG — the new rule, for RENTAG — the new name
-extfile extension for a tag rule
Keys
-keykey name
-kindkey kind: password, passphrase, private_key, token, note
-valuekey value as text
-valueFilefile holding a binary key value: store.p12, keys.jks
-accountaccount the key belongs to
-remarkkey description
-showprint the key value in the clear
Encryption keys
-keydirkeys folder; ~/.dan/keys by default, %APPDATA%\danube\keys in Windows
-keyrecipient key while packing, or a narrowed search while extracting; in store-of-keys methods the same option names the secret
-keysseveral recipients in one string: "alice,bob"
-keynamename of the generated key for KEYGEN; default unless given
-keypasspassword of the private key
-askpassask for the private key password on the terminal, without echo
-bitskey size for generation; 3072 by default
Author
-authorauthor name
-contactsauthor contacts
-copyrightcopyright notice
-copypassa password protecting the copyright details
-descriptioncontainer description
Runtime
-workersnumber of worker threads; 0 — all cores
-optimizesave memory: YES or NO
-progressshow operation progress; while running, F5 pauses and resumes, F10 cancels the operation, and if partitions are missing F8 skips them
-statusshow the work status
-maxBoxmaximum size of the container's internal write block; 10 GB by default
-minFrame / -maxFramebounds of the compression frame — a chunk of data compressed on its own; 1 KB to 16 MB by default. A smaller frame parallelizes better and uses less memory, a larger one compresses slightly stronger
-maxCacheceiling for the in-memory read/write cache; 256 MB by default
-configa JSON settings file
-formatDatedate format in the output: "%m/%d/%Y %H:%M:%S"
-V, -Hprogram version and help
-licensetext of the license agreement

Part size, compression frames and partitions, in plain words. A container is laid out into parts (partitions): while the data in the current part stays under -frameSize, writing continues into it; the moment it exceeds that, the next part opens (box.adn.0, box.adn.1 and so on). The number of parts is roughly total data size ÷ -frameSize (rounded up): 1 TB at -frameSize 500MB gives about two thousand files, whereas setting -frameSize clearly larger than the whole data set (say 100GB for 40 GB of data) packs the container into one partition. These are not in conflict — they are two different sizes: -frameSize measures the part file, while -minFrame/-maxFrame measure the compression frame inside the data, a chunk compressed by its own stream. -maxBox and -maxCache have nothing to do with splitting into partitions: they are the internal write block and the memory ceiling, and rarely need changing.

04 Store of keys

Keys inside the same container

A secrets node is a marked folder whose content is read as keys: passwords, passphrases, private keys, tokens and notes. Ordinary workspace folders (google.com, github.com) and key files (my, good) stay inside it, so a key's full address reads as /store/workspace/name and matches an entry like my@google.com.

Open a store and add keys

# the folder with number 1 becomes a secrets node
dan -method MKSECRETS -danube ./box/keys.adn -password "secret" -nid 1
# a text password with an account and a description
dan -method ADDSECRET -danube ./box/keys.adn -password "secret" -nid 1 \
    -key my -kind password -value "p@ss, word" -account user@example.com -remark "personal"
# a binary value is taken from a file — a key store
dan -method ADDSECRET -danube ./box/keys.adn -password "secret" -nid 1 \
    -key store -kind private_key -valueFile store.p12

Look at it

# the whole tree of keys; values are hidden behind a mask
dan -method SECRETS -danube ./box/keys.adn -password "secret"
# one key: kind, account, dates, masked value and its length
dan -method SECRET  -danube ./box/keys.adn -password "secret" -nid 3
# the value in the clear — only by an explicit flag
dan -method SECRET  -danube ./box/keys.adn -password "secret" -nid 3 -show

Export and load back

# a tree of JSON files on disk: one file per key
dan -method EXPORTSECRETS -danube ./box/keys.adn -password "secret" -dest ./keys
# the way back — a single file or a whole folder
dan -method IMPORTSECRETS -danube ./box/keys.adn -password "secret" -src ./keys
# remove the sign from the folder
dan -method RMSECRETS -danube ./box/keys.adn -password "secret" -nid 1

Four rules are exactly why the store is its own kind of node:

RuleWhat it means in practice
Password is mandatorya key value is encrypted together with the container, so no second password on top is needed. If a container holds a secrets node, neither adding a key nor packing it goes without a password
A key is not extractedEXTRACT skips the secrets branch and prints a line about it: keys reach disk neither as a tree nor one by one. Only an explicit EXPORTSECRETS hands them out
Value behind a maskthe default output is ****** (N bytes); only -show prints the clear text — a command line ends up in shell history and in logs
Search is separatekey and workspace names never enter the shared fuzzy index: -name my will not find them, -name my -nid 1 from a secrets node will

A kind is checked by shape only, with no word lists and no checksums: passphrase accepts 12, 15, 18, 21 or 24 words in lowercase Latin letters separated by a single space, token — a string without any spaces, private_key — one line out of the hex, base58, bech32 or BASE64 alphabets, note — any non-empty text, password — a non-empty single line. A broken shape is a refusal, not a half-accepted key.

05 Vault

A container you cannot unpack

The -vault flag is set at creation and written into the header of the container and of all its parts. It differs from read-only in that it forbids not editing but extracting: EXTRACT is refused for the whole tree and for any single record, and no files are created on disk. The container structure, the search, the record metadata and reading data into memory stay available — that is how a viewer shows the content without writing it out.

Create a vault and check the flag

dan -method INTRACT -name safe -src ./safe -dest ./box \
    -cipher AES256 -password "secret" -vault -workers 0 -progress
# the flag is read from the header, no password needed
dan -method VAULT -danube ./box/safe.adn

What a vault allows

dan -method INFO       -danube ./box/safe.adn -password "secret"
dan -method SEARCH     -danube ./box/safe.adn -password "secret" -name "contract"
dan -method DIAGNOSTIC -danube ./box/safe.adn -password "secret"
dan -method EXTRACT    -danube ./box/safe.adn -dest ./out -password "secret"
#  → refusal "Export not possible", exit code 1, no files on disk

A vault exports no keys either: EXPORTSECRETS on a vault container is refused and the destination folder is not created. The promise of a vault is “its data never reaches disk”, and exporting keys is exactly what writes them out. Build 3.0.9 lost the flag on any edit, so a vault edited by that build has to be recreated with -vault; an ordinary commit does not restore the flag.

06 Keys

A container for a recipient: encryption with a public key

Besides a password, a container can be addressed to recipients, as in SSH or GPG. Each recipient has a key, and the container carries the list of those who may open it: the library generates a random data key, encrypts the content with it and wraps that key with the public key of every recipient. Any recipient can open the container and nobody else can — guessing a password does not help at all. Passwords are not replaced: a container may be packed with a password only (as before), with keys only, or with both.

Generate a key pair

# the pair goes into the default folder: ~/.dan/keys
dan -method KEYGEN -keyname alice -keypass "key password"
# a custom folder and a larger key
dan -method KEYGEN -keyname work -bits 4096 -keydir ./keys

The fingerprint and the folder are printed: alice.key is the private key, alice.pub the public one. The public key is handed to the recipient, the private key never leaves the machine; the fingerprint is compared when keys are exchanged.

Pack for recipients

# one recipient, no container password
dan -method INTRACT -name report -src ./report -dest ./box -key alice -progress
# two recipients from a custom keys folder
dan -method INTRACT -name report -src ./report -dest ./box \
    -keys "alice,bob" -keydir ./keys -progress

The recipient list is written once at packing time and does not change afterwards: adding a recipient means packing the container again.

Open with your own key

# the library walks the folder itself and compares fingerprints
dan -method EXTRACT -danube ./box/report.adn -dest ./out -progress
# a password-protected key: ask for the password on the terminal
dan -method EXTRACT -danube ./box/report.adn -dest ./out -askpass
# or narrow the search down to one key
dan -method INFO -danube ./box/report.adn -key alice -keypass "key password"

What to know before the first run:

RuleWhat it means in practice
Keys folder~/.dan/keys on POSIX and %APPDATA%\danube\keys in Windows. The folder is set by DANUBE_KEYDIR or by -keydir. On POSIX the folder is 0700 and the private key 0600; in Windows the folder is hidden and only the system and the owner may read it
Key passworda private key may be protected by a password: -keypass passes it as a string, -askpass asks on the terminal without echo so that it never reaches the shell history
No key — no datawithout a matching private key the container cannot be opened by any guessing: the log says Container "..." is encrypted with keys, but no matching key is found
Format and compatibilitya keyed container carries bit 0x08 in the flags and format 4.1.0; builds 3.2.1 and older reject it by version. The password mechanism is untouched

Key files are ordinary PEM: the private key is PKCS#8 (AES-256-CBC when a password is set), the public one is SubjectPublicKeyInfo. Both are read by OpenSSL, and the public key converts to the OpenSSH format with ssh-keygen -i -m PKCS8.

07 Tags

Named content categories

A tag is a name and a set of container nodes. The set is filled in two ways: a selection rule (part of the name, extension, scope node) and exact node numbers. The rule is recomputed by TAGREFRESH, while the manual set is kept. A tag can be extracted whole — EXTRACT -tag — and search understands the label #{name}: it stands for the tag's nodes, and all other search conditions apply on top.

A rule can be replaced wholesale by EDITTAG: the tag name, the nodes added by hand and its position in the list remain, while the set found by the old rule is built again. DETTAG removes nodes from a tag without touching the nodes themselves: a number added by hand leaves the manual set, and a node found by the rule goes to the exclusion list — otherwise the next TAGREFRESH would bring it back. The way back is ADDTAG: naming the node again clears its exclusion.

Create a tag with a rule

# all files of the "Tales" folder with the mp3 extension
dan -method MKTAG -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -pattern Tales -ext mp3 -nid 4
# a rule by exact file name, not tied to a folder
dan -method MKTAG -danube ./box/media.adn -password "secret" \
    -tag "Covers" -pattern cover.jpg -exact

The scope node (-nid) narrows the rule: without it the rule looks at the whole container.

Extend and recompute

# exact node numbers — no search by name
dan -method ADDTAG -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -nids "3|7|12"
# recompute all tags by their rules
dan -method TAGREFRESH -danube ./box/media.adn -password "secret"
# recompute one tag
dan -method TAGREFRESH -danube ./box/media.adn -password "secret" -tag "Covers"

Fix a rule and detach a node

# replace the rule entirely: the same "Tales", but only mp3 inside folder 4
dan -method EDITTAG -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -pattern Tales -ext mp3 -nid 4
# take a node off the tag, leaving it in the container
dan -method DETTAG -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -nid 7
# the same for several nodes at once
dan -method DETTAG -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -nids "7|12"

An empty rule is allowed: EDITTAG without -pattern and -ext keeps the tag with an empty found set, and its manual nodes stay.

Extract and search by tag

# the whole tag set to disk
dan -method EXTRACT -danube ./box/media.adn -password "secret" \
    -tag "Bedtime tales" -dest ./out -progress
# search by label: a tag plus an extra condition
dan -method SEARCH -danube ./box/media.adn -password "secret" \
    -name "#{Bedtime tales} lullaby"

Several labels in one query intersect: "#{Tales} #{Audio}" returns nodes that belong to both tags.

What to know before the first run:

RuleWhat it means in practice
Tag nameunique case-insensitively, Cyrillic included; up to 255 characters, spaces and punctuation allowed
Two setsrule and exact numbers add up: a node belongs to the tag if it matched at least one path; TAGREFRESH touches only the rule
Editing a ruleEDITTAG replaces the rule as a whole and rebuilds the found set; the name, manual nodes and the position in the list survive, and nodes detached earlier stay detached — a rule change never touches the exclusion list
Detaching a nodeDETTAG hides the node from this tag only: it stays in the container, a recompute will not return it, and ADDTAG with the same number clears the exclusion
Stale numbersdeleted nodes drop out by themselves — the tag is checked against the index when the container opens
Secrets nodenever gets into a tag, neither by rule nor by number: secrets are not listed
Formattags live in the container index — first in format 4.2.0, current builds write 4.3.0; a build that does not know the container version rejects it, and the danube_ro reader lists tags and extracts by them
08 Examples

Common tasks

A container with author details

dan -method INTRACT -name report -src ./report -dest ./box \
    -cipher AES128 -password "secret" -author "Jane Smith" -contacts jane@example.com \
    --copyright="2026 Example Ltd" -description "Quarterly report" -workers 0 -progress

In 700 MB parts

dan -method INTRACT -name video -src ./video -dest ./box -frameSize 700MB -workers 0 -progress

# how many parts were produced — from headers, not from the file count
dan -method PARTS -danube ./box/video.adn

Parts are identified by content, not by name

# a part can be renamed: the file name means nothing
mv ./box/video_1.pdn ./box/first-copy.pdn
dan -method EXTRACT -danube ./box/video.adn -dest ./out -workers 0 -progress

Each part header carries the archive identifier and the part number, so extraction works with any file name ending in .pdn. A part of another archive placed in the same directory is neither used nor damaged — the log shows Partition N ... belongs to another archive.

Extract and release drained parts

dan -method EXTRACT -danube ./box/video.adn -dest ./out -release -progress
ls ./box
video.adn

The -release flag removes the parts whose data has been fully extracted; node metadata stays in the main container, and INFO still lists the files. Extracting a single file removes only the parts that were needed by that file alone.

Missing parts are named by number

dan -method EXTRACT -danube ./box/video.adn -dest ./out -progress
Warning ... DANUBE : Partition 2 of container "./box/video.adn" is not found
Error   ... DANUBE : Partitions 2 of container "./box/video.adn" are not found: add them
                     next to the container and repeat the extraction
echo $?
1

The check runs before any work: no files with empty data are written, and the refusal names the missing part numbers. Put the parts next to the container and repeat the extraction.

Extract one file by name or by number

dan -method EXTRACT -danube ./box/report.adn -dest ./out -password "secret" -name plan.xlsx
dan -method EXTRACT -danube ./box/report.adn -dest ./out -password "secret" -nid 3

Find a file

# by part of the name, by the exact name, only inside folder number 8
dan -method SEARCH -danube ./box/report.adn -password "secret" -name "plan"
dan -method SEARCH -danube ./box/report.adn -password "secret" -name "plan.xlsx" -exact
dan -method SEARCH -danube ./box/report.adn -password "secret" -name "plan" -nid 8 -absolute

Edit in place

dan -method APPEND -danube ./box/report.adn -src ./notes.txt -nid 8 -password "secret" -progress
dan -method RENAME -danube ./box/report.adn -password "secret" -nid 3 -name "summary.txt"
dan -method MOVE   -danube ./box/report.adn -password "secret" -nids "3|4|5" -dest 8
dan -method DELETE -danube ./box/report.adn -password "secret" -nid 7 -progress

Check a container and probe content before packing

dan -method ENCRYPT    -danube ./box/report.adn
dan -method AUTHOR     -danube ./box/report.adn
dan -method READONLY   -danube ./box/report.adn
dan -method VAULT      -danube ./box/report.adn
dan -method DIAGNOSTIC -danube ./box/report.adn -password "secret" -progress
# probing: content kind, entropy and the candidates the packing choice comes from
dan -method PROBE -src ./video
dan -method PROBE -src ./archive.tar.gz
09 Values

Encryption, key kinds and the exit code

OptionAllowed values
-cipherAES128 AES192 AES256 KUZNYECHIK SM4 CHACHA20 MAGMA_MGM KUZNYECHIK_MGM DES DES3 BLOWFISH
-kdfSHA256 SHA384 SHA512 STREEBOG256 STREEBOG512 SM3 BLAKE2S256 BLAKE2B512
-kindpassword passphrase private_key token note — in any case
-frameSizea number with a unit: 500MB, 4GB
-optimizeYES NO ON OFF TRUE FALSE

Exit code 0 means the job succeeded, 1 means it did not. A refusal shows in the code and not only in the output, so a script cannot mistake a failure for a success:

RefusalWhat dan answers
Container not openedINFO and DETAILED return 1 — earlier an empty list came with code 0
Editing a read-only containerAPPEND, DELETE, MOVE, RENAME, FOLDER, MKLINK — 1
Extracting from a vaultEXTRACT — 1, no files created on disk
A key or a secrets node to diskEXTRACT skips the branch and prints Secrets node was skipped: use EXPORTSECRETS to write its keys out
Exporting keys from a vaultEXPORTSECRETS — 1, the destination folder is not created
Broken key shapeADDSECRET — 1, the key is not added

A container with a secrets node will not open in builds 3.0.9 and earlier: the older library answers that the container requires format v3.2.0. A container without secrets stays readable by older builds.