The MongoDB Realm CLI (v2.6.2) is a command-line tool for managing MongoDB Realm applications (now called Atlas App Services). It allows developers to create, deploy, import/export, and configure Realm apps from the terminal. The CLI interacts with the Realm and Atlas APIs, supporting CI/CD workflows. The project is written in Go but distributed via npm as a Node.js wrapper. Releases are irregular; the latest version is from October 2023. Key differentiators: it is the official tool from MongoDB for App Services, enabling local development, app templating, and automation. Note that Realm is rebranded to Atlas App Services, but the CLI retains the 'realm' naming.
npm install mongodb-realm-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates global install, authentication, app creation from template, deployment, and export using the CLI.
Use child_process.exec or spawn to invoke 'mongodb-realm-cli' as a command.
After npm install -g, use 'realm-cli' command, not 'mongodb-realm-cli'.
Use the CLI as-is; Atlas App Services endpoints remain compatible.
Use Node.js >=12 (preferably LTS) to run the CLI.
Ensure API key has 'Project Owner' role and that the profile is correctly set.
Use npx instead of global install, or install with 'sudo npm install -g mongodb-realm-cli'.
Add '/usr/local/bin' to PATH, or use 'npx mongodb-realm-cli' instead.
Verify key at Atlas UI, ensure it's active, and has at least Project Read/Write role.
Run 'realm-cli logout' then 'realm-cli login --api-key=... --private-api-key=...' again.