Skip to main content

CLI FAQs

Quick answers to common AppsOnAir CLI questions.


AppsOnAir CLI​

Q: What is the AppsOnAir CLI?​

A: The AppsOnAir CLI is a command-line tool that lets you interact with AppsOnAir services directly from your terminal or CI/CD pipeline — without opening the web portal. It supports OTA build uploads and project setup.

Q: What operating systems does the CLI support?​

A: The CLI supports macOS, Linux, and Windows.

Q: How do I install the AppsOnAir CLI?​

A: Install it globally using npm:

npm install -g @appsonair/appsonair-cli

Q: What commands are available after installation?​

A: Two commands are installed:

  • appsonair — auth, project setup, and system commands (login, logout, whoami, init <service>, system-info, uninstall)
  • appsonair-ota — OTA build upload (upload)

Q: How do I verify my environment is ready?​

A: Run appsonair system-info after installation to check your environment.


Authentication​

Q: How do I authenticate with the CLI?​

A: Run appsonair login — it opens a browser for authentication and saves your token securely in your OS keychain.

Q: Do I need to log in before using any CLI command?​

A: Yes, always run appsonair login before using any other CLI command.

Q: How do I verify my current session?​

A: Run appsonair whoami to confirm you are logged in and see your current session details.

Q: How do I log out?​

A: Run appsonair logout to clear your saved token and end the session.

Q: Is the same login used for all CLI services?​

A: No. The appsonair login session is used for OTA commands, but the CodePush CLI requires a separate login with appsonair-codepush login.


Project Setup​

Q: How do I set up a project for OTA uploads?​

A: Run appsonair init ota from your project root. This creates a .appsonair-cli.yaml config file pre-filled with your workspace and app identity.

Q: What does .appsonair-cli.yaml contain?​

A: It contains workspaceId, appId, appName (auto-filled and encrypted), and the ota section where you set your androidOutput and iosOutput build paths.

Q: Can I manually edit the workspaceId and appId fields?​

A: No, these fields are stored encrypted and filled automatically by appsonair init ota. Do not modify them manually.

Q: What are the common output paths by framework?​

A: Common paths:

FrameworkandroidOutputiosOutput
Flutterbuild/app/outputs/flutter-apk/build/ios/ipa/
Android Nativeapp/build/outputs/apk/release/—

OTA Upload​

Q: How do I upload a build using the CLI?​

A: After running appsonair init ota and building your app, run:

appsonair-ota upload

Q: Can I upload only Android or only iOS?​

A: Yes, use platform flags:

appsonair-ota upload --android   # Android APK only
appsonair-ota upload --ios # iOS IPA only

Q: What is path mode and when should I use it?​

A: Path mode lets you upload a specific file or folder directly without a .appsonair-cli.yaml config file. Use it for one-off uploads:

appsonair-ota upload --path build/app.apk
appsonair-ota upload --android-path build/app.apk --ios-path build/app.ipa

Q: Can I point the output path to a folder instead of a specific file?​

A: Yes, pointing to a folder works — the CLI automatically picks the newest APK or IPA in that directory by modified time.

Q: What happens after a successful upload?​

A: The CLI prints a shareable install link for each uploaded build.

Q: Does path mode require a config file?​

A: No, but since there is no .appsonair-cli.yaml, the CLI will prompt you to select your workspace and app interactively every time.


Release Notes​

Q: Can I add release notes to an upload?​

A: Yes, use the --note flag for a shared note, or platform-specific flags:

appsonair-ota upload --note "Bug fixes and improvements"
appsonair-ota upload --android-note "Fixed crash on Android 12" --ios-note "Improved Dark Mode support"

Q: What takes priority — --note or --android-note / --ios-note?​

A: Platform-specific flags (--android-note, --ios-note) always take priority over --note for their respective platform.


CI/CD Integration​

Q: Can I use the CLI in a CI/CD pipeline?​

A: Yes, the CLI is designed for CI/CD. Add appsonair-ota upload to your build command or pipeline to automatically upload builds on release.

Q: How should I handle authentication in CI/CD?​

A: Authenticate once with appsonair login on your build machine or use environment-based token configuration to avoid interactive browser login in pipelines.


Help & Reference​

Q: How do I see available options for a CLI command?​

A: Use --help on any command:

appsonair --help                # List appsonair commands
appsonair init --help # Help for the init command
appsonair-ota --help # List OTA commands
appsonair-ota upload --help # Help for the upload command

Troubleshooting​

Q: The CLI is not recognized after installation. What should I check?​

A: Ensure npm's global bin directory is in your PATH. Run npm bin -g to find the path and add it to your shell profile if needed.

Q: appsonair init ota is failing. What should I do?​

A: Make sure you are logged in (appsonair login) and are running the command from your project root directory.

Q: My upload is failing with a workspace/app selection prompt every time. Why?​

A: You are likely using path mode without a .appsonair-cli.yaml file. Run appsonair init ota to create the config file and avoid repeated prompts.

Q: The upload command can't find my APK/IPA. What's wrong?​

A: Verify the androidOutput / iosOutput paths in .appsonair-cli.yaml point to the correct folder where your build artifacts are generated. The CLI picks the newest file in the specified folder.


CodePush CLI​

Q: What is the AppsOnAir CodePush CLI?​

A: The AppsOnAir CodePush CLI (appsonair-codepush) is a Node.js command-line tool for releasing over-the-air JavaScript bundle updates to React Native apps. It supports releasing updates, managing deployments, rolling back releases, and debugging update delivery.

Q: How do I install the CodePush CLI?​

A: Install it globally using npm or Yarn:

npm install -g @appsonair/codepush-cli
# or
yarn global add @appsonair/codepush-cli

Q: Does appsonair login also authenticate the CodePush CLI?​

A: No, the CodePush CLI uses a separate access token. You must authenticate independently with:

appsonair-codepush login

Authentication​

Q: How do I register for CodePush?​

A: Run appsonair-codepush register — it launches a browser to authenticate your AppsOnAir account and generates an access key. After registering, you are automatically logged in.

Q: How do I log in to the CodePush CLI?​

A: Run appsonair-codepush login — it opens a browser, generates an access key, and prompts you to paste it into the CLI.

Q: How do I verify my CodePush session?​

A: Run appsonair-codepush whoami to see the email address associated with your current session.

Q: How do I log out of the CodePush CLI?​

A: Run appsonair-codepush logout to delete the saved access key and end your session.


App & Deployment Management​

Q: How do I list my CodePush apps?​

A: Run appsonair-codepush app ls to see all apps registered with the CodePush service.

Q: What is a deployment?​

A: A deployment is a named target for releasing updates (e.g. Production). Each app includes a Production deployment by default, which you can use immediately.

Q: How do I list deployments for an app?​

A: Run:

appsonair-codepush deployment ls <appName>

Add -k to also display deployment keys.

Q: What install metrics are shown in the deployment list?​

A: Active (users currently running this release), Total (all successful installs), Pending (downloaded but not yet installed), Rollbacks (automatic rollbacks due to crashes), Rollout (% of users eligible), and Disabled (if the release is disabled).


Releasing Updates​

Q: How do I release a React Native update?​

A: Use the release-react command — it bundles and uploads in one step:

appsonair-codepush release-react <appName> --targetBinaryVersion <version>

Q: Should I use --useHermes when releasing?​

A: Yes, for React Native 0.70 and above, Hermes is enabled by default but may not be auto-detected. Explicitly pass --useHermes unless you have disabled Hermes in your project:

appsonair-codepush release-react <appName> --targetBinaryVersion <version> --useHermes

Q: What does --mandatory do?​

A: It marks the update as mandatory — users cannot skip it. The server also dynamically converts later optional releases to mandatory if a mandatory release was skipped by the user.

Q: What is the --rollout parameter?​

A: It limits the percentage of users (1–100) eligible to receive the update. Useful for gradual rollouts. If not set, defaults to 100% (all users).

Q: What is --targetBinaryVersion?​

A: It specifies which binary (store) version(s) of the app should receive this update. Supports semver ranges:

Range ExpressionWho gets the update
1.2.3Only devices running exactly 1.2.3
*Any device consuming updates from your app
1.2.xMajor 1, minor 2, any patch
1.2.3 - 1.2.7Any version between 1.2.3 and 1.2.7 (inclusive)
>=1.2.3 <1.2.71.2.3 inclusive to 1.2.7 exclusive
~1.2.3Equivalent to >=1.2.3 <1.3.0
^1.2.3Equivalent to >=1.2.3 <2.0.0

Q: What is the --disabled flag?​

A: It releases an update that is not yet downloadable by users. You can later enable it via the patch command when you're ready to make it available.


Patching & Rolling Back​

Q: How do I update metadata on an already-released update?​

A: Use the patch command:

appsonair-codepush patch <appName> [--label <releaseLabel>] [--mandatory] [--rollout <percentage>] [--description <text>] [--targetBinaryVersion <version>]

If --label is omitted, the patch applies to the latest release.

Q: Can I roll back a broken release?​

A: Yes, run:

appsonair-codepush rollback <appName>

This creates a new release with the contents of the previous release. To roll back to a specific version:

appsonair-codepush rollback <appName> --targetRelease v34

Viewing History & Debugging​

Q: How do I view the release history for a deployment?​

A: Run:

appsonair-codepush deployment history <appName>

This shows the 50 most recent releases including metadata, install metrics, and rollback annotations. Add --displayAuthor (-a) to see who released each update.

Q: How do I debug CodePush update delivery?​

A: Use the debug command to view filtered diagnostic logs from the CodePush plugin:

appsonair-codepush debug ios       # iOS Simulator logs
appsonair-codepush debug android # Android emulator or device logs

Code Signing​

Q: Does CodePush support code signing?​

A: Yes. Generate RSA keys and pass the private key path when releasing:

# Generate keys
openssl genrsa -out private.pem
openssl rsa -pubout -in private.pem -out public.pem

# Release with signing
appsonair-codepush release-react <appName> <platform> --privateKeyPath private.pem

Then configure the public key in your app's Info.plist (iOS) or strings.xml (Android).


Troubleshooting​

Q: My CodePush updates are not reaching users. What should I check?​

A: Verify the deployment key in your app matches the correct deployment. Check that appsonair-codepush deployment ls <appName> -k shows the expected key. Also confirm the targetBinaryVersion matches the binary version your users are running.

Q: Why are updates showing as "Pending" and not installing?​

A: Pending means the update was downloaded but not yet applied. Ensure your app calls notifyApplicationReady() (or sync) on startup. Updates configured for background install require an app restart to apply.

Q: How do I find the full CodePush CLI reference?​

A: See the complete documentation at the AppsOnAir CodePush CLI page.


For more information, visit the AppsOnAir website or check out the other CLI documentation pages.