CLI
Maryk ships with an interactive CLI for exploring data models and records. It connects to RocksDB and FoundationDB stores and provides scrolling viewers for get and scan.
From the repo root:
./gradlew :cli:runJvmRelease-native CLI tasks are host-specific:
# macOS Apple Silicon./gradlew :cli:runReleaseExecutableMacosArm64
# Linux x64./gradlew :cli:runReleaseExecutableLinuxX64Use :cli:runJvm on other hosts. Native CLI release binaries currently target
macOS and Linux; this is not a generic command for every platform.
Connect
Section titled “Connect”connect rocksdb --dir /path/to/rocksdbconnect foundationdb --dir maryk/app/store [--cluster /path/to/fdb.cluster]Expose a local store over HTTP:
serve rocksdb --dir ./data --host 127.0.0.1 --port 8210serve foundationdb --dir maryk/app/store --cluster /path/to/fdb.cluster --port 8210serve rocksdb --dir ./data --host 127.0.0.1 --bearer-token-file ./maryk-tokenYou can also pass --config with key/value config. See CLI commands for details.
Prefer --bearer-token-env, --bearer-token-file or --bearer-token-stdin.
The compatibility --bearer-token option warns because process arguments may
expose the secret. Interactive commands do not expand shell variables.
Loopback serving needs no authentication. Non-loopback plaintext binds require the explicit unsafe
--allow-insecure-remote-binding opt-in even with bearer authentication.
Bearer authentication does not encrypt traffic; use TLS termination or SSH
tunneling outside localhost.
Browse
Section titled “Browse”listshows data models.model <name|id>prints the schema.get <model> <key>opens a record viewer.scan <model> [options]opens a scrollable list; useshowandfilterto shape the list.
Example session:
connect rocksdb --dir ./datalistscan Client --show info.name.firstNames,info.name.familyName --order -info.name.familyNameInside the get viewer, use set, unset, append, remove, save, and load to change values. If the viewer was opened from scan, the close command returns to the scan list.
Inline values are parsed as Maryk YAML scalars; quote strings with spaces or YAML special characters.
Scan options
Section titled “Scan options”--start-key <base64>--limit <n>(default 100)--include-start/--exclude-start--to-version <n>--include-deleted--where <expr>--order <ref,...>--select <ref,...>--show <ref,...>--max-chars <n>
For large datasets, prefer --order on an indexed property or add filters to keep scans efficient.
Use sql SELECT ... for bounded reports, and sql --write ... for serializable
mutations. An interactive connection retains sql --write BEGIN, subsequent
queries and writes, savepoints, and sql --write COMMIT or sql --write ROLLBACK.
Use sql --resolve-commit when a submitted commit is uncertain. One-shot mode
supports queries and autocommit writes but cannot retain an interactive transaction.
See the SQL guide and command reference.
