Deploy Changes with Realm CLI
On this page
Overview
You can deploy changes to your Realm app with Realm CLI by importing an application directory with configuration files that define the updated app.
Prerequisites
- A MongoDB Atlas programmatic API Key.
- A properly installed copy of
realm-cli
that has been added to your systemPATH
.
Procedure
If you're using Automated GitHub Deploy, do not update your Realm app configuration via the Realm CLI. Instead, push your changes to the linked GitHub repository.
Pull the Latest Version of Your App
You'll need a local copy of your application's configuration files. To pull a local copy of the latest version of your app, run the following:
realm-cli pull --remote="<Your App ID>"
You can also download a copy of your application's configuration files by following the documentation to export a Realm app.
Update Your Application
Add, delete, and modify configuration files for your application's various components.
Deploy the Updated App
Once you've updated your app's configuration files, you can push them to your remote app. Realm CLI immediately deploys the updated configurations on push.
realm-cli push --remote="<Your App ID>"
If you have deployment drafts enabled, you'll be prompted to review and confirm your changes in the terminal. When you approve, Realm CLI immediately deploys the updated configurations.