CLI Commands
Complete reference for all ota-publish commands and their options.
TIP
All commands support --dry-run to preview what would happen without making any changes.
ota-publish (publish)
The main command. Bumps the version, generates a changelog, updates ota-version.json, and publishes to EAS.
Usage
bash
ota-publish --channel <channel> [options]Options
| Option | Alias | Description |
|---|---|---|
--channel <channel> | -c | Target channel |
--message <message> | -m | Override publish message/changelog with one custom message |
--strategy <strategy> | -s | Override version strategy for this run (build, semver, date, custom) |
--version-format <template> | Override version template for this run | |
--platform <platform> | -p | Target platform (ios or android), repeat for both |
--dry-run | Preview actions without file writes or EAS publish | |
--no-increment | Keep current version/build, update changelog/message flow only | |
--interactive | -i | Guided prompts |
Examples
bash
# Basic publish
ota-publish --channel production
# Compact one-off version format
ota-publish --channel production --version-format "{major}.{minor}.{patch}-p{build}"
# One-off strategy override
ota-publish --channel preview --strategy semver
# Single platform publish
ota-publish --channel production --platform ios
# Multi-platform explicit publish
ota-publish --channel production --platform ios --platform android
# Dry run
ota-publish --channel production --dry-runExecution Flow
- Loads
ota-updates.config.*. - Validates channels, strategy, and platform inputs.
- Reads current
ota-version.json. - Generates changelog from configured source.
- Runs
hooks.beforePublish(can override changelog/message/version). - Computes next version via strategy/template.
- Writes
ota-version.json(unless dry-run). - Publishes to EAS (if
eas.autoPublish). - Runs
hooks.afterPublish. - Runs
hooks.onErroron failure.
ota-publish init
Usage
bash
ota-publish initWhat It Does
Creates ota-updates.config.js in the current project with:
- new dynamic version options (
versionFormatByChannel,channelAliases) - per-channel EAS message templates
- custom hook examples for version/changelog generation
ota-publish revert
Republish a previous update group to a channel (rollback).
Usage
bash
ota-publish revert --channel <channel> [options]Options
| Option | Alias | Description |
|---|---|---|
--channel <channel> | -c | Channel to roll back |
--group <groupId> | -g | Update group ID (optional, otherwise interactive picker) |
--message <message> | -m | Republish message |
--platform <platform> | -p | ios, android, or all |
--dry-run | Preview only | |
--yes | -y | Skip confirmation prompt |
Semantics
- Source updates are selected from the branch currently linked to the channel.
- Group picker shows runtime version and timestamp to reduce accidental rollbacks.
- Without
--group, command is interactive by default.
Examples
bash
# Interactive rollback (choose group from recent updates)
ota-publish revert --channel production
# Explicit group rollback
ota-publish revert --channel production --group 00000000-0000-0000-0000-000000000000
# Safe preview first
ota-publish revert --channel production --dry-runota-publish promote
Copy an update group from one channel to another (for example preview -> production).
Usage
bash
ota-publish promote --from <channel> --to <channel> [options]Options
| Option | Alias | Description |
|---|---|---|
--from <channel> | Source channel | |
--to <channel> | Destination channel | |
--group <groupId> | -g | Update group ID (optional, otherwise interactive picker) |
--message <message> | -m | Republish message |
--platform <platform> | -p | ios, android, or all |
--dry-run | Preview only | |
--yes | -y | Skip confirmation prompt |
Semantics
- Source group is selected from the branch linked to
--fromchannel. - Republish target is
--tochannel. - Command blocks
--fromequal to--to.
Examples
bash
# Interactive promote (choose source update group)
ota-publish promote --from preview --to production
# Explicit group promote
ota-publish promote --from preview --to production --group 00000000-0000-0000-0000-000000000000
# Safe preview first
ota-publish promote --from preview --to production --dry-runInteractive Mode
bash
ota-publish --interactivePrompts for:
- channel
- changelog source preference (git vs message)
- custom message (optional)
- final confirmation
npm Scripts
json
{
"scripts": {
"ota:dev": "ota-publish --channel development",
"ota:preview": "ota-publish --channel preview",
"ota:prod": "ota-publish --channel production",
"ota:revert:prod": "ota-publish revert --channel production",
"ota:promote:preview-to-prod": "ota-publish promote --from preview --to production",
"ota:prod:ios": "ota-publish --channel production --platform ios",
"ota:prod:dry": "ota-publish --channel production --dry-run"
}
}Next Steps
Want to feel the package end-to-end first? Try the Expo Showcase Demo.