Docs Menu

Export a Realm App with Realm CLI

On this page

  • Prerequisites
  • Procedure
  • Authenticate a MongoDB Atlas User
  • Run the App Export Command
  • Output

You can use the MongoDB Realm CLI to export your Realm app's configuration.


Export is the v1 Realm CLI command, and is an alias for pull in the v2 Realm CLI.


Use your MongoDB Cloud API Key to log in:

realm-cli login --api-key="<my api key>" --private-api-key="<my private api key>"

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 node_modules archive in the /functions directory of your Realm app.
If specified, exports all hosted static assets in the hosting/files directory of your Realm app.

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 working directory.

Give Feedback
© 2021 MongoDB, Inc.


  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.