CLI commands
Global commands
Section titled “Global commands”help [command]— show available commands or details for one command.connect— connect to a store.serve— serve a store over HTTP.disconnect— close the current store connection.list— list available data models.model [--with-deps] [--key-index-format] [<name|id>]— render the schema for a model.model --all [--with-deps] [--key-index-format]— render schemas for all models.add <model> <file> [--yaml|--json|--proto] [--meta] [--key <base64>]— add a new record from a file.get <model> <key> [--include-deleted] [subcommand ...]— fetch a record and open the viewer, or run a record action inline.undelete <model> <key> [--if-version <n>]— restore a soft-deleted record.changes <model> <key> [options]— show versioned changes for a record.scan <model> [options]— browse records in a scrolling list.
Quick example
Section titled “Quick example”connect rocksdb --dir ./datalistscan Client --show info.name.firstNames,info.name.familyName --order -info.name.familyNameOne-shot mode
Section titled “One-shot mode”Run a single command without the interactive UI:
maryk --connect rocksdb --dir ./data --exec "list"maryk --connect rocksdb --dir ./data --exec "model Client"maryk --connect rocksdb --dir ./data --exec "add Client ./client.yaml"maryk --exec "serve rocksdb --dir ./data --port 8210"Notes:
--connectis optional for commands that do not require an existing connection (for exampleserveorhelp).--execis parsed like CLI input (quotes supported).- Commands that open interactive viewers (
getwithout a subcommand orconnectwithout args) are rejected in one-shot mode. scanin one-shot mode returns a single page (respecting--limit) as plain output.- Use
get <model> <key> <subcommand ...>to runsave,load,set,unset,append,remove, ordeletewithout entering the viewer.
Connect
Section titled “Connect”connect rocksdb --dir /path/to/rocksdbconnect foundationdb --dir maryk/app/store [--cluster /path/to/fdb.cluster]Serve a local store over HTTP (Ktor):
serve rocksdb --dir ./data --host 127.0.0.1 --port 8210serve foundationdb --dir maryk/app/store --cluster /path/to/fdb.cluster --port 8210Config file:
store: rocksdbdir: ./datahost: 127.0.0.1port: 8210serve --config ./serve.confNotes:
- Uses ProtoBuf
Requests/responses over HTTP. - Each response message is length-prefixed (4 bytes, big-endian).
serveblocks the CLI session until the server is stopped.serveis available in JVM and native desktop binaries.- Warning: no auth or TLS; bind to localhost or use SSH tunneling.
model [--with-deps] [--key-index-format] [<name|id>]model --all [--with-deps] [--key-index-format]Options:
--with-depsincludes dependent definitions.--key-index-formatprints key/index format details.--allrenders every model in the connected store.
When the output viewer is shown, save supports YAML/JSON/PROTO, plus Kotlin output:
save <dir> --kotlin --package <name>(generates Kotlin files)save <dir> --no-deps(export without dependencies)
Add a new record from a file:
add <model> <file> [--yaml|--json|--proto] [--meta] [--key <base64>]Examples:
add Client ./client.yamladd Client ./client.meta.yaml --metaadd Client ./client.yaml --key AbCdEf123add Client - --yaml < ./client.yamlNotes:
- Format defaults to YAML.
--metaexpects a metadata file saved viasave --meta; its key is used (version/deleted flags are ignored).- If
--keyis omitted, the key is derived from the values (UUIDv4/UUIDv7 keys generate a new key). --keymust match the metadata key when--metais used.- YAML/JSON files can contain a list of objects to add multiple records.
- Use
-as the file path to read from stdin.
Reference paths
Section titled “Reference paths”Many commands take property references (for set, show, select, order, etc.). Use dot notation:
info.name.firstNames— nested fieldsaddresses.@0— list item at index 0addresses.*— list/map wildcardmoment.*ShiftMetaDataType.executor— multi-type list/map with type name
Get viewer
Section titled “Get viewer”When get returns data, you enter a viewer with scrolling output.
Commands:
save <dir> [--yaml|--json|--proto] [--meta]— export the record.load <file> [--yaml|--json|--proto] [--if-version <n>] [--meta]— apply values from a file.set <ref> <value> [--if-version <n>]— set or replace a value.unset <ref> [--if-version <n>]— clear a value.append <ref> <value> [--if-version <n>]— append to a list or add to a set.remove <ref> <value> [--if-version <n>]— remove from a list or set.delete [--hard]— soft delete (default) or hard delete.undelete [--if-version <n>]— restore a soft-deleted record.close(when opened from a scan) — return to the scan list.q|quit|exit— leave the viewer.
If the viewer was opened from a scan, close returns to the scan list.
One-shot examples:
maryk --connect rocksdb --dir ./data --exec "get Client AbCdEf123 save ./out --yaml"maryk --connect rocksdb --dir ./data --exec "get Client AbCdEf123 set info.name.nickname \"Captain Jasper\""Notes:
- Values are parsed as Maryk YAML scalars for the referenced type.
- Strings do not require quotes, but quoting is recommended for spaces or YAML special characters.
--if-versionapplies optimistic concurrency checks.save --metastores the record metadata;load --metauses metadata from the file (key/version).append/removeonly support list or set references.- Use
get --include-deletedto access soft-deleted records. - Use
-as the load file path to read from stdin.
Scan viewer
Section titled “Scan viewer”The scan viewer shows one record per line, with a leading > for the selected row.
Navigation:
- Up/Down: move the selection
- PgUp/PgDn: page
- Home/End: jump to start/end
Commands:
get— open the selected record in the viewer.show <ref,...>— choose fields to display (also updates the select graph).filter <expr>— add anotherwhereclause (Maryk YAML format).save <dir> [--yaml|--json|--proto] [--meta]— export the selected record.load <file> [--yaml|--json|--proto] [--if-version <n>] [--meta]— apply values to the selected record.delete [--hard]— soft delete (default) or hard delete.undelete [--if-version <n>]— restore a soft-deleted record.close— leave the scan viewer.q|quit|exit— leave the scan.
Filtering examples (Maryk YAML tags):
scan Client --where "!Equals { info.name.familyName: \"Smith\" }"scan Client --where "!And - !Equals { info.status: \"Active\" } - !GreaterThanEquals { info.age: 21 }"Ordering examples:
scan Client --order info.name.familyNamescan Client --order -info.name.familyNamescan Client --order info.name.familyName:descScan options (from the scan command):
--start-key <base64>--limit <n>--include-start/--exclude-start--to-version <n>--include-deleted--where <expr>--order <ref,...>--select <ref,...>--show <ref,...>--max-chars <n>
Undelete
Section titled “Undelete”undelete <model> <key> [--if-version <n>]Restores a soft-deleted record.
Changes
Section titled “Changes”changes <model> <key> [--from-version <n>] [--to-version <n>] [--limit <n>] [--include-deleted]Examples:
changes Client AbCdEf123 --from-version 10changes Client AbCdEf123 --include-deleted --limit 100Notes:
- Results are fetched in pages (default 100) and the viewer auto-loads more as you scroll.
- Large datasets should prefer
--orderon an indexed property for faster scans.