GUI, CLI, and benchmarks · Engineering
The CLI as a small admin surface
One binary for daemon commands, file operations, auth, replication, and restores — and the places it deliberately stops.
NonoDB’s CLI is intentionally small. It is an administrative client, not a shell language, an ORM, or a deployment platform.
That constraint is useful: the same binary can ping a daemon, inspect a backup, restore a database, create an auth token, and promote a replica, without a plugin ecosystem.
Two kinds of commands
Daemon-facing commands use the Unix socket (NONODB_SOCK, default /run/nonodb.sock) and, for TCP setups, a bearer token (NONODB_TOKEN). On Windows they use plaintext HTTP over TCP.
File commands (backup, inspect, restore, verify, compact, branch) operate directly on an LMDB data directory. They do not use the socket or a token.
The auth commands edit the auth registry file directly and do not contact the daemon.
That split matters for incident response: if the daemon will not start, file commands still work.
Selecting a database or instance
Every daemon-facing command accepts --db <name> or NONODB_DB:
nonodb-cli --db app1 count orders '{}'When several daemons run on one host:
nonodb-cli instancesnonodb-cli --instance 11727 servernonodb-cli --socket /tmp/nonodb.sock replication status--instance accepts a PID or replication node id from the per-user instance registry.
Everyday commands
nonodb-cli pingnonodb-cli readynonodb-cli capabilitiesnonodb-cli servernonodb-cli databases listnonodb-cli databases create app1nonodb-cli collectionsnonodb-cli count orders '{}'nonodb-cli find orders '{"status":"paid"}' --limit 10nonodb-cli sql app1 'SELECT status, count(*) FROM orders GROUP BY status'nonodb-cli indexes ordersnonodb-cli mapnonodb-cli resize 4GiBcapabilities prints the versioned public feature document, including limits. It includes no credentials or tenant data.
server prints actual listener addresses, resolved ports, TLS state, and the advertised replication URL.
Events and jobs
nonodb-cli events orders on status totalnonodb-cli events orders offnonodb-cli subscribe orders paid --filter '{"status":"paid"}' --lease 600nonodb-cli subscription-ping orders paid 600nonodb-cli webhooks listnonodb-cli webhooks deliveries deadnonodb-cli webhooks retry 01J...The CLI creates webhook rules and retries deliveries. It does not run handler code; webhooks and jobs are evaluated by daemon workers or external worker processes.
Backups and restores
nonodb-cli --db app1 backup /var/lib/nonodb /var/backups/nonodb/app1nonodb-cli backup-all /var/lib/nonodb /var/backups/nonodb/20261127nonodb-cli inspect /var/backups/nonodb/app1nonodb-cli verify-backup /var/backups/nonodb/app1nonodb-cli --db app1 verify /var/lib/nonodbnonodb-cli --db app1 restore /var/backups/nonodb/app1 /var/lib/nonodb --force --verifybackup is online and writes a compacted copy. restore requires the daemon to be stopped. verify is a deep check of a live database directory.
For PITR:
nonodb-cli --db app1 restore --to 2026-01-01T12:00:00Z \ /var/backups/nonodb/snapshots /var/lib/nonodb \ --wal /var/lib/nonodb/app1/wal \ --force --verifyBranches and compaction
nonodb-cli --db app1 branch app1-ci --data /var/lib/nonodb --verifynonodb-cli compact /var/lib/nonodb/defaultA branch is an independent database, useful for CI. Compaction rewrites the live file after stopping the daemon; it refuses to run against a live environment.
Auth and replication
nonodb-cli auth initnonodb-cli auth principal add prometheus metrics:readnonodb-cli auth token create prometheusnonodb-cli auth token revoke <id>nonodb-cli replication statusnonodb-cli replication promote <epoch>nonodb-cli replication demote <epoch> replica https://new-primary:7878Auth commands edit the registry. The daemon watches the file and swaps a valid change atomically; an invalid edit keeps the last known good registry.
Raw execution
nonodb-cli --db app1 exec '{"op":"find","coll":"orders","filter":{},"limit":1}'exec sends one request and prints JSON. It is useful for automation and for operations not wrapped by a subcommand.
What the CLI does not do
- It does not support TLS or mTLS. Use an official client for encrypted connections; the CLI is for local administration.
- It is not a schema migration tool.
- It does not run arbitrary shell commands on the daemon.
- It does not manage a cluster from one place beyond the replication commands.
- It does not replace the GUI for visual inspection or the API for application integration.
- It does not make backups automatically unless a backup job is configured.
A practical operating set
pingandreadyin health checks.capabilitiesbefore upgrading clients.serverwhen a port or socket is unclear.backup+verify-backupon a schedule.restore --verifyin a drill.instanceswhen several daemons share a host.replication statusbefore and after a failover.quotaandmapfor capacity.
The CLI is deliberately boring. That is a feature when the daemon is not starting and you need a tool that only needs the data directory.
The CLI reference documents every command, flag, environment variable, and procedure.