Skip to content

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:

Terminal window
./gradlew :cli:runJvm

Release-native CLI tasks are host-specific:

Terminal window
# macOS Apple Silicon
./gradlew :cli:runReleaseExecutableMacosArm64
# Linux x64
./gradlew :cli:runReleaseExecutableLinuxX64

Use :cli:runJvm on other hosts. Native CLI release binaries currently target macOS and Linux; this is not a generic command for every platform.

connect rocksdb --dir /path/to/rocksdb
connect 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 8210
serve foundationdb --dir maryk/app/store --cluster /path/to/fdb.cluster --port 8210
serve rocksdb --dir ./data --host 0.0.0.0 --bearer-token replace-with-a-secret

You can also pass --config with key/value config. See CLI commands for details.

The interactive CLI treats the token argument literally; it does not expand shell syntax such as $MARYK_BEARER_TOKEN. Replace the placeholder or use a protected config/launcher when supplying a real secret.

Loopback serving needs no authentication. Non-loopback binds require --bearer-token or the explicit unsafe --allow-insecure-remote-binding opt-in. Bearer authentication does not encrypt traffic; use TLS termination or SSH tunneling outside localhost.

  • list shows data models.
  • model <name|id> prints the schema.
  • get <model> <key> opens a record viewer.
  • scan <model> [options] opens a scrollable list; use show and filter to shape the list.

Example session:

connect rocksdb --dir ./data
list
scan Client --show info.name.firstNames,info.name.familyName --order -info.name.familyName

Inside 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.

  • --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.