Export a Realm App with Realm CLI¶
You can use the MongoDB Realm CLI to export your Realm app's configuration.
Authenticate a MongoDB Atlas User¶
Use your MongoDB Cloud API Key to log in:
realm-cli login --api-key="<my api key>" --private-api-key="<my private api key>"
Run the App Export Command¶
You can export an application's configuration directory by specifying its remote App ID and an optional local path. If you do not specify a local path, the command outputs the configuration directory in the current working directory.
realm-cli pull --remote=<App ID> --local=<Output Directory Path> [options]
The directory specified by
--local must not already exist, otherwise
realm-cli throws an error and does not pull the configuration files.
The command also supports additional flags that you can optionally include to customize your app. The following table lists common flags you might use:
If specified, exports any external dependencies included in a
If specified, exports all hosted static assets in the
Your application will be exported to a local application directory. If
you did not specify a path for the directory with
--local, it will
be exported with the same name as the application into the current