Skip to content

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 generate
  • notti 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:

sh
npm install --save-dev notti-cli
npx notti --version

Run 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 ​

sh
npx notti ota keys generate --out notti-live-updates.private.pem

Creates 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).

OptionMeaning
--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.

sh
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 production

Options ​

OptionMeaning
--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.
--mandatoryMark 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-runBuild and sign without uploading.

Environment variables ​

VariableUsed for
NOTTI_API_KEYThe App REST key, when --api-key is not given.
NOTTI_APP_IDThe App ID, when --app-id is not given.
NOTTI_OTA_PRIVATE_KEYThe 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 ​

  1. Checks the project: React Native 0.83+, no expo-updates.
  2. Bundles in release mode (react-native bundle for bare, expo export:embed for Expo) and compiles the bundle to Hermes bytecode with the hermesc that 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.
  3. Builds the archive (limited to 50 MiB), and signs the manifest with your key.
  4. 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 ​

sh
npx notti ota release --platform ios --runtime-version 1.4.0 --dry-run

Builds 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:

yaml
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 ​

CodeMeaning
0Success (also --help and --version).
1Any 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:

CodeMeaning
ota_not_in_planThe company's plan has no Live updates (HTTP 402).
ota_release_limit_reachedThe App published all its releases this UTC month (HTTP 402); the message includes the limit and reset date.
subscription_inactiveThe subscription is not active (HTTP 402).
ota_storage_not_configuredNo object storage is configured (HTTP 409). Self-hosted: configure it in Company settings.
ota_no_public_keyThe App has no registered public key. Register the public key of the key you sign with.
ota_unknown_keyThe signing key is not registered on the App.
ota_invalid_signatureThe server could not verify the signature with the registered key.
ota_upload_invalidThe upload is missing, used, expired or belongs to another App. Run the command again.
ota_artifact_mismatchThe stored archive does not match the manifest's size or hash.
ota_release_existsA release with this ID already exists (HTTP 409).
ota_storage_errorObject storage did not respond (HTTP 502).
invalid_content, invalid_bodyThe server refused the manifest or the request body (HTTP 422).
forbidden, forbidden_roleThe key cannot manage Live updates for this App (HTTP 403).
network_errorThe CLI could not reach the server or the storage.
upload_failedStorage answered the archive upload with an error status.
invalid_responseThe 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.