ZenDB CLI (v0.4.1, Alpha) is a command-line interface for interacting with ZenDB, a document database built for the Internet Computer (ICP). It enables developers to manage identities, canisters, databases, collections, documents, indexes, and roles directly from the terminal. Key differentiators include native integration with Internet Identity and dfx, secure keychain-backed identity storage, support for Motoko typed collections, and commands for both local development and mainnet deployment. The CLI uses encrypted storage and OS keychain for security. Note: The package is in early alpha; APIs may change. GitHub: https://github.com/NatLabs/zendb-platform
npm install zendb-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Full workflow: install CLI, import identity, create canister & database, add collection, insert/list/search documents, and view stats.
Use --mode keyring for secure keychain storage, or --mode password and provide a passphrase.
Replace 'zendb identity import' with 'zendb user import', and 'zendb identity get-principal' with 'zendb user get-principal'.
Use '--release v2.0' or similar specific version instead of 'latest'.
Use 'zendb user import --mode keyring --data "$(dfx identity export <name>)"
Use '--data @./users.json' instead of inline JSON for large payloads.
Register the canister: zendb canister add <name> <canister-id> --ic
Run 'zendb user import --mode keyring --data "$(dfx identity export default)"'
Ensure inserted documents match the schema definition. Use --schema flag to define exact record shape.
Assign appropriate role: zendb role assign <role> --principal <principal> --canister <name> --db <db>