Create a Realm App with Realm CLI
You can use the MongoDB Realm CLI to create a new server-side Realm app.
Prerequisites
- A properly installed copy of
realm-cli
that has been added to your systemPATH
. - A MongoDB Atlas programmatic API key for the MongoDB Cloud account you wish to log in with. You must be a Project Owner to create a Realm app.
Procedure
Run the App Creation Command
The CLI can create an app and copy its configuration files to a local directory with a single command. The command asks you to specify the app name and the Atlas project that should contain the app. You can configure the command with flags or interactively.
realm-cli apps create
The command also supports additional flags that you can optionally include to customize your app. The following table lists common flags you might use:
--template | Choose a template app to start from. Valid values:
|
--deployment-model | Defines the app's deployment model. Valid values:
|
--location | Defines a local app's deployment region. Valid values:
|
--environment | Defines the app's environment. Valid values:
|
For more details and additional flags, see the CLI documentation for the create command.