The Realm Command Line Tool

The Realm Command Line tool is the fastest way to:

  • Generate a new Realm Mobile Platform Project (iOS, Android, or Node-Backend)
  • Control your Realm Mobile Cloud Projects

Installation and updating is extremely easy, all you have to do is install it as a global module

npm install -g realm-cli

If you're running on MacOSX you will probably have to give that command a sudo

sudo npm install -g realm-cli

If you ever need to see all the options of the command line tool, run:

realm-cli --help

Generating a New Realm Mobile Platform Project 🔨

If you have the realm-cli installed you can easily create a new project (also generate an iOS and Android App with the clients installed)

realm-cli init MyNewProject

Now you should have a directory structure with

MyNewProject/
    /server
        src/
            index.js
        package.json
    /node 
        package.json
        src/
            index.js
    /ios
        ...various ios files
    /android
        ...various android files

If you don't want to generate iOS and or Android Projects you can run:

Another way to do this is with the --ios ,--android or --node flag.

realm-cli init MyNewProject --ios

Starting Your New Project 🏁

In order to start your project:

realm-cli start MyNewProject

Or if you're already in the project directory you can just run realm start

Starting your project on another port, for example 9834

realm-cli start MyNewProject --port=9834

results matching ""

    No results matching ""