Get Started with ESP RainMaker Home App

This guide walks you through creating an ESP RainMaker Home app project using the RainMaker Home App CLI. The CLI initializes an Expo-based app with RainMaker SDK configuration, so you can build and run the app on Android and iOS.

The tutorial covers:

Prerequisite: Set up your Expo environment before starting. Follow Set up your environment to install the tools needed for your target platform (Android device/emulator or iOS device/simulator).

Initialize Project

Run and Develop

Introduction

The RainMaker Home App CLI scaffolds an ESP RainMaker Home app from a template, configures app identity and RainMaker API settings, and runs a prebuild step so the project is ready to run. The app can be used to provision and control ESP RainMaker devices.

Set up Expo environment

Before using the CLI, set up your development environment as described in the Expo documentation. Choose one of:

Install any required tools (Node.js, Watchman, Android Studio or Xcode, etc.) for your chosen option.

Initialize a new project

From a directory where you want to create the project, run:

npx @espressif/rainmaker-home-app-cli init

The CLI will:

  1. Ask for project name and template source (default template or custom).
  2. Clone or copy the RainMaker Home app template.
  3. Prompt for app identity and SDK configuration:
  1. Optionally configure third-party auth (Google, Sign in with Apple), agents (deep link host/path), and CDF autosync.
  2. Create a **.env** file in the project root with all settings.
  3. Run npm run prebuild in the generated project.
  4. Run npm run install in the generated project.

You can press Enter to accept defaults for any prompt. When done, the CLI reports success and the project is ready to use.

Example:

$ npx @espressif/rainmaker-home-app-cli init

? App Name / Project Name: MySmartHome
? Application ID: com.example.smarthome
? Base URL: https://api.rainmaker.espressif.com
? API Version: v1
...
✓ Project "MySmartHome" initialized successfully!

Project structure

After init, you get a structure like:

<project-name>/
└── ESP RainMaker Home/
    ├── .env          # Configuration (app identity, SDK, auth, etc.)
    ├── android/      # Android project
    ├── ios/          # iOS project
    ├── app/          # Source code
    └── package.json

All settings from the prompts are stored in **.env** in the project root. You can edit this file later to change API URL, auth, or feature flags.

Run the app

From the generated project folder (e.g. ESP RainMaker Home/):

Ensure your device or emulator is set up as following:

TargetExpo setup guide
Android DeviceGuide
Android EmulatorGuide
iOS deviceGuide
iOS SimulatorGuide

Resources