Publish Bundle Usage & API Reference

This section contains usage and APIs provided by the CLI

Login

Before accessing any features, you must log in to the CLI while ensuring you are in a React Native project directory.

stallion login

Executing this command will launch a web browser where you need to log in. Once logged in, click Copy Access Token, then return to the terminal and paste the token.

Publish Bundle

Prerequisite:

Every published bundle is stored in a Bucket. Before publishing your first bundle, make sure a Bucket is created in the Stallion Console

After successfully logging in, you can use the publish-bundle command to deploy packages for both Android and iOS.

Note: You can use only one platform at a time — either ios or android.

stallion publish-bundle --upload-path=orgname/project-name/bucket-name --platform=android/ios --release-note="notes"

Example:

stallion publish-bundle --upload-path=my-org/my-project/my-bucket --platform=android --release-note="my release"

Tip:

You can access orgname/project-name/bucket-name required in command above using the Copy bundle path shortcut in Stallion Console inside your bucket's lising page.

Params

  1. --upload-path

Specifies the target location for uploading the current bundle:

--upload-path=testorg/firstproject/featurebucket
# testorg is org name
# firstproj is project name
# featurebucket is bucket name

You can find and copy the upload path from the Bucket Overview page in the Stallion Dashboard Console.

  1. --platform

Defines the platform for which the bundle will be published (android or ios):

--platform=android
  1. --release-note (Optional)

Allows you to add release notes for the bundle:

--release-note="changed something"
  1. --hermes-disabled (Optional) This flag is set to false by default, but you can enable it if needed.

Info:

Hermes is enabled by default in Stallion CLI. If you want to disable hermes then set this flag to true.

--hermes-disabled=true
  1. --ci-token (Optional: For release automation)

Used for overriding the user token, especially recommended for CI pipelines:

--ci-token="your-CI-token"

You can generate CI Token from the dashboard under project settings. NOTE: This command will output the bundle hash which can be used for further automation commands check Release Automation

  1. --private-key (Optional, v2.1.0+)

Available only in Stallion CLI v2.1.0 and above:

The --private-key flag is not supported in earlier versions of the Stallion CLI.
Make sure you’ve updated before using this feature:

Use this to sign the bundle with your private key before publishing. This enables secure OTA verification at runtime.

--private-key="./stallion/secrets/private-key.pem"

Generate Key Pairs

Available only in Stallion CLI v2.1.0 and above:

The generate-key-pair command is used specifically for bundle signing in Stallion's OTA infrastructure. To learn more about how bundle signing works—including signing, verification, and runtime enforcement—refer to the Bundle Signing of the SDK documentation.

Generate a secure public-private key pair to enable digital signing of bundles in Stallion OTA workflows.

To generate a key pair, run:

stallion generate-key-pair

This command creates a .stallion directory in your working path, with signing keys stored inside:

Key Output Structure

stallion/secrets/ ├── private-key.pem 🔒 Keep this secret. Used to sign bundles. └── public-key.pem 🔓 Safe to distribute. Used to verify signatures.

Logout

To switch accounts, you can log out of the CLI at any time.

stallion logout