Beta
The CLI is in Beta: flags and commands can still change. See What Beta means.
The Notti CLI (notti-cli) creates signing keys and publishes Live updates. It has two commands today:
notti ota keys generatenotti ota release
Not available yet
Promoting a release between channels, and listing, changing the rollout of or disabling releases from the CLI, are not available yet (planned after launch). Use the dashboard or the API for those.
Install
Requires Node.js 20 or newer. Install it in the project you publish from:
npm install --save-dev notti-cli
npx notti --versionRun it from the React Native project root, with the project dependencies installed. The project must be React Native 0.83 or newer, must not have expo-updates installed, and needs hermes-compiler (it ships with React Native) and, for a bare project, @react-native-community/cli.
notti ota keys generate
npx notti ota keys generate --out notti-live-updates.private.pemCreates an ECDSA P-256 key pair. It makes no network call. It writes the private key (PKCS#8 PEM, mode 0600), refuses to overwrite an existing file, and prints the key_id and the public key PEM. Register the public key on the App and embed it in the app (see Keys, runtime version, channels and rollout).
| Option | Meaning |
|---|---|
--out <path> | Where to write the private key. Default notti-live-updates.private.pem. |
notti ota release
Bundles, signs and publishes one release for one platform and channel. Run it once per platform.
export NOTTI_API_KEY=... # the App REST key
export NOTTI_APP_ID=... # the App ID
export NOTTI_OTA_PRIVATE_KEY=./notti-live-updates.private.pem
npx notti ota release --platform android --runtime-version 1.4.0 --channel productionOptions
| Option | Meaning |
|---|---|
--platform <platform> | Required. ios or android. |
--runtime-version <version> | Required. Runtime version of the binaries this release targets, 1 to 64 characters. |
--channel <channel> | Channel to serve on, [a-z0-9-]{1,32}. Default production. |
--rollout <percent> | Share of devices that receive it, an integer from 1 to 100. When omitted, the server uses 100. |
--mandatory | Mark the release as mandatory. |
--private-key <path> | Signing key (PKCS#8 PEM). Or NOTTI_OTA_PRIVATE_KEY. |
--api-key <key> | The App REST key. Or NOTTI_API_KEY. |
--app-id <id> | The App ID. Or NOTTI_APP_ID. Required. |
--base-url <url> | Notti server URL. Default https://app.zeepnotti.app. Set it for self-hosted. |
--entry-file <path> | JavaScript entry file. Bare default index.js; Expo resolves its own. |
--dry-run | Build and sign without uploading. |
Environment variables
| Variable | Used for |
|---|---|
NOTTI_API_KEY | The App REST key, when --api-key is not given. |
NOTTI_APP_ID | The App ID, when --app-id is not given. |
NOTTI_OTA_PRIVATE_KEY | The signing key, as a path or as the PEM itself, when --private-key is not given. |
An App ID is always required (--app-id or NOTTI_APP_ID), even for a dry run: it is part of the signed manifest. The REST key is required except with --dry-run. The CLI never prints or writes the REST key or the private key, and error messages never include the key or its path.
What it does
- Checks the project: React Native 0.83+, no
expo-updates. - Bundles in release mode (
react-native bundlefor bare,expo export:embedfor Expo) and compiles the bundle to Hermes bytecode with thehermescthat ships with the project's React Native. It reads the Hermes bytecode version from the output and puts it in the manifest, so build from the same React Native version as your binary. - Builds the archive (limited to 50 MiB), and signs the manifest with your key.
- Unless
--dry-run: lists the App's registered keys, asks for an upload URL, uploads the archive to storage (the REST key is never sent there) and creates the release.
It also prints the names (never the values) of the EXPO_PUBLIC_* variables inlined in the bundle, so you can compare them with the ones your binary was built with.
Dry run
npx notti ota release --platform ios --runtime-version 1.4.0 --dry-runBuilds and signs, prints the release ID, key and size, then stops with Dry run: nothing was uploaded. It needs the App ID and a signing key, not the REST key.
In CI
Keep the REST key and the private key PEM in CI secrets. GitHub Actions:
jobs:
live-update:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx notti ota release --platform ios --runtime-version 1.4.0
env:
NOTTI_API_KEY: ${{ secrets.NOTTI_API_KEY }}
NOTTI_APP_ID: ${{ vars.NOTTI_APP_ID }}
NOTTI_OTA_PRIVATE_KEY: ${{ secrets.NOTTI_OTA_PRIVATE_KEY }}
- run: npx notti ota release --platform android --runtime-version 1.4.0
env:
NOTTI_API_KEY: ${{ secrets.NOTTI_API_KEY }}
NOTTI_APP_ID: ${{ vars.NOTTI_APP_ID }}
NOTTI_OTA_PRIVATE_KEY: ${{ secrets.NOTTI_OTA_PRIVATE_KEY }}Exit codes
| Code | Meaning |
|---|---|
0 | Success (also --help and --version). |
1 | Any failure: invalid usage or option, a missing or invalid input, a build step that failed, or an error from Notti. The message is printed to stderr as error: <message>. |
Errors
Server errors print as code: message (with the limit and reset date for ota_release_limit_reached). Codes the release command can show:
| Code | Meaning |
|---|---|
ota_not_in_plan | The company's plan has no Live updates (HTTP 402). |
ota_release_limit_reached | The App published all its releases this UTC month (HTTP 402); the message includes the limit and reset date. |
subscription_inactive | The subscription is not active (HTTP 402). |
ota_storage_not_configured | No object storage is configured (HTTP 409). Self-hosted: configure it in Company settings. |
ota_no_public_key | The App has no registered public key. Register the public key of the key you sign with. |
ota_unknown_key | The signing key is not registered on the App. |
ota_invalid_signature | The server could not verify the signature with the registered key. |
ota_upload_invalid | The upload is missing, used, expired or belongs to another App. Run the command again. |
ota_artifact_mismatch | The stored archive does not match the manifest's size or hash. |
ota_release_exists | A release with this ID already exists (HTTP 409). |
ota_storage_error | Object storage did not respond (HTTP 502). |
invalid_content, invalid_body | The server refused the manifest or the request body (HTTP 422). |
forbidden, forbidden_role | The key cannot manage Live updates for this App (HTTP 403). |
network_error | The CLI could not reach the server or the storage. |
upload_failed | Storage answered the archive upload with an error status. |
invalid_response | The server answered without JSON. |
http_<status> | A non-Notti error response, such as one from a proxy. |
Errors raised before any request include: no app ID, no API key, no signing key, an unreadable key, expo-updates installed, an unsupported React Native version, a missing hermesc, a bundler step that failed, an archive over 50 MiB, and --rollout outside 1 to 100.