@otalan/cli 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +74 -15
- package/dist/bin.js +35 -33
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@otalan/cli` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.1.0 - 2026-05-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- List active project apps during `otalan init` and validate `--app-id` against the logged-in project.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Let `otalan login` reuse the saved API URL and keep the saved CI key from a masked prompt.
|
|
14
|
+
- Export Expo bundles into a project-local `.otalan/expo-export-*` folder so Expo accepts the output path.
|
|
15
|
+
- Fall back to the resolved native version when Expo runtimeVersion is not configured or present in export metadata.
|
|
16
|
+
- Clarify Capacitor and Expo / React Native bundling behavior in CLI help and README.
|
|
17
|
+
|
|
18
|
+
## 1.0.9 - 2026-05-06
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Add `otalan keygen --kind ci|ota` for offline Otalan key generation.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Keep help output concise by limiting notes to the most important release workflow reminders.
|
|
27
|
+
|
|
5
28
|
## 1.0.8 - 2026-05-06
|
|
6
29
|
|
|
7
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Published as an npm package, but the CLI itself runs on Bun.
|
|
|
9
9
|
## Requirements
|
|
10
10
|
|
|
11
11
|
- Bun `>= 1.3.11` installed and available on your `PATH`
|
|
12
|
-
- An Otalan **CI key**
|
|
12
|
+
- An Otalan **CI key** for commands that talk to the Otalan API
|
|
13
13
|
|
|
14
14
|
Do not use the OTA app key in the CLI.
|
|
15
15
|
|
|
@@ -50,7 +50,7 @@ otalan login --api-key otalan_ci_xxx
|
|
|
50
50
|
2. Link the current repo to your active Otalan app:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
otalan init
|
|
53
|
+
otalan init
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
3. Build your web assets with your app's normal build command.
|
|
@@ -67,7 +67,7 @@ otalan bundle --target capacitor --platform ios --bundle-id 1.0.5
|
|
|
67
67
|
otalan publish --channel production
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
`otalan bundle --target capacitor` packages
|
|
70
|
+
`otalan bundle --target capacitor` packages existing built web assets. By default it reads `dist/` first, then `www/`; pass `--input-dir <path>` if your build outputs somewhere else. Your app build must run first.
|
|
71
71
|
`otalan publish` waits for server-side validation to finish before it returns.
|
|
72
72
|
|
|
73
73
|
### Expo / React Native
|
|
@@ -81,7 +81,7 @@ otalan login --api-key otalan_ci_xxx
|
|
|
81
81
|
2. Link the current repo to your active Otalan app:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
otalan init
|
|
84
|
+
otalan init
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
3. Bundle the OTA payload:
|
|
@@ -96,7 +96,7 @@ otalan bundle --target expo --platform ios --bundle-id 1.0.5
|
|
|
96
96
|
otalan publish --channel production
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
`otalan bundle --target expo` runs `bunx expo export
|
|
99
|
+
`otalan bundle --target expo` runs `bunx expo export` itself, exports into a temporary project-local `.otalan/expo-export-*` folder, packages the exported JS bundle and assets, and stores the resolved Expo config in the Otalan manifest for publish. You do not need to create a `dist/` or `www/` folder before running it.
|
|
100
100
|
`otalan publish` waits for server-side validation to finish before it returns.
|
|
101
101
|
|
|
102
102
|
## CI/CD Usage
|
|
@@ -124,7 +124,7 @@ otalan bundle --target capacitor --platform ios --bundle-from-package
|
|
|
124
124
|
otalan publish --channel production
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
Use your normal app build command before `otalan bundle`. The CLI then packages the built web output from `dist/` or `www
|
|
127
|
+
Use your normal app build command before `otalan bundle`. The CLI then packages the built web output from `dist/` or `www/` by default; pass `--input-dir <path>` if your Capacitor web output uses another folder.
|
|
128
128
|
|
|
129
129
|
### CI/CD Example: Expo / React Native
|
|
130
130
|
|
|
@@ -137,7 +137,7 @@ otalan bundle --target expo --platform ios --bundle-from-package
|
|
|
137
137
|
otalan publish --channel production
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
This runs `bunx expo export` through the CLI, packages the exported OTA assets, and publishes the resulting bundle through Otalan's validation pipeline.
|
|
140
|
+
This runs `bunx expo export` through the CLI, using a temporary project-local `.otalan/expo-export-*` folder, packages the exported OTA assets, and publishes the resulting bundle through Otalan's validation pipeline. Do not add a separate web build step just to create `dist/` or `www/` for Expo / React Native.
|
|
141
141
|
|
|
142
142
|
### GitHub Actions Example
|
|
143
143
|
|
|
@@ -179,6 +179,7 @@ Adjust the build step and bundle target for your app:
|
|
|
179
179
|
|
|
180
180
|
- logs into the Otalan API
|
|
181
181
|
- checks API connectivity and CI key context
|
|
182
|
+
- generates CI and OTA key material locally for dashboard import
|
|
182
183
|
- links the current repo to an Otalan app
|
|
183
184
|
- bundles Capacitor or Expo / React Native OTA output
|
|
184
185
|
- publishes a bundle with rollout metadata
|
|
@@ -218,7 +219,7 @@ Example project config:
|
|
|
218
219
|
|
|
219
220
|
### `otalan help`
|
|
220
221
|
|
|
221
|
-
Shows the available commands.
|
|
222
|
+
Shows the available commands and usage notes. Running `otalan` without arguments prints the same concise command list and notes.
|
|
222
223
|
|
|
223
224
|
### `otalan version`
|
|
224
225
|
|
|
@@ -230,9 +231,36 @@ otalan --version
|
|
|
230
231
|
otalan -v
|
|
231
232
|
```
|
|
232
233
|
|
|
234
|
+
### `otalan keygen`
|
|
235
|
+
|
|
236
|
+
Generates Otalan key material locally without calling the API. Use this for workflows where a team wants to create the key in its own terminal, CI setup, or secrets manager before importing it in the Otalan dashboard.
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
otalan keygen --kind ci
|
|
240
|
+
otalan keygen --kind ota
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
If `--kind` is omitted, the CLI prompts for `CI key (private)` or `OTA key (public)`.
|
|
244
|
+
|
|
245
|
+
Output includes both the full Otalan key and the base64url suffix without the `otalan_ci_` or `otalan_ota_` prefix:
|
|
246
|
+
|
|
247
|
+
```text
|
|
248
|
+
Generated CI key.
|
|
249
|
+
|
|
250
|
+
Full key:
|
|
251
|
+
otalan_ci_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
252
|
+
|
|
253
|
+
Key without prefix:
|
|
254
|
+
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`otalan keygen` only creates local key material. Importing or activating a key should still happen through an authenticated dashboard flow; an existing CI key should not be able to create more keys.
|
|
258
|
+
|
|
233
259
|
### `otalan login`
|
|
234
260
|
|
|
235
|
-
Saves the CI key and API base URL locally.
|
|
261
|
+
Saves the project CI key and API base URL locally.
|
|
262
|
+
|
|
263
|
+
If auth is already saved, `otalan login` shows the current API URL as the prompt default and shows the current CI key in masked form. Press Enter to keep either value.
|
|
236
264
|
|
|
237
265
|
```bash
|
|
238
266
|
otalan login --api-key otalan_ci_xxx --api-url https://api.otalan.com
|
|
@@ -256,11 +284,15 @@ otalan doctor --api-key "$OTALAN_API_KEY" --api-url "${OTALAN_API_URL:-https://a
|
|
|
256
284
|
|
|
257
285
|
Creates `otalan.config.json` in the current project.
|
|
258
286
|
|
|
259
|
-
`
|
|
287
|
+
`otalan init` lists the active apps in the project resolved from the logged-in CI key and lets you select one. `appId` is scoped to that project, not globally unique across all projects. Archived apps are not listed and are treated as unavailable for CI publish, rollback, status, and bundle listing commands.
|
|
260
288
|
|
|
261
|
-
If you
|
|
289
|
+
Run `otalan init` once per app repo or working folder. If you switch to another checkout, folder, or app project, run `otalan init` there too so that folder has its own `otalan.config.json`.
|
|
290
|
+
|
|
291
|
+
If you pass `--app-id`, the CLI validates that the app exists in the logged-in project before writing `otalan.config.json`. The CLI also stores `organizationSlug` and `projectSlug` from the CI key as a safety check.
|
|
262
292
|
|
|
263
293
|
```bash
|
|
294
|
+
otalan init
|
|
295
|
+
# Non-interactive CI usage:
|
|
264
296
|
otalan init \
|
|
265
297
|
--app-id com.example.app
|
|
266
298
|
```
|
|
@@ -275,6 +307,8 @@ Capacitor:
|
|
|
275
307
|
|
|
276
308
|
```bash
|
|
277
309
|
otalan bundle --target capacitor --platform ios
|
|
310
|
+
# Custom Capacitor web output folder:
|
|
311
|
+
otalan bundle --target capacitor --platform ios --input-dir build
|
|
278
312
|
```
|
|
279
313
|
|
|
280
314
|
Expo / React Native:
|
|
@@ -285,9 +319,11 @@ otalan bundle --target expo --platform ios
|
|
|
285
319
|
|
|
286
320
|
Current behavior:
|
|
287
321
|
|
|
288
|
-
-
|
|
289
|
-
- Capacitor
|
|
290
|
-
-
|
|
322
|
+
- Capacitor packages prebuilt web assets; it does not run your app build command
|
|
323
|
+
- without `--input-dir`, Capacitor checks `dist/` first and then `www/`
|
|
324
|
+
- pass `--input-dir <path>` to package a different Capacitor web output folder
|
|
325
|
+
- Expo / React Native runs `bunx expo export --platform <platform>` into a temporary project-local `.otalan/expo-export-*` folder
|
|
326
|
+
- Expo / React Native does not require a prebuilt `dist/` or `www/` folder
|
|
291
327
|
- Expo stores the resolved Expo app config in `.otalan/bundle/manifest.json` so publish can forward it for `extra.expoClient`
|
|
292
328
|
- both outputs produce a ZIP plus `manifest.json`
|
|
293
329
|
- `--platform` is required so the CLI exports the selected platform and resolves the correct native/runtime version
|
|
@@ -298,9 +334,32 @@ Native version defaults:
|
|
|
298
334
|
- Capacitor iOS reads `CFBundleShortVersionString` from `Info.plist` and resolves `$(MARKETING_VERSION)` from the Xcode project when needed
|
|
299
335
|
- Capacitor Android reads `versionName` from `android/app/build.gradle` or `build.gradle.kts`
|
|
300
336
|
- Expo reads the selected platform version from Expo config and falls back to the top-level Expo `version`
|
|
301
|
-
- Expo runtimeVersion reads `--runtime-version`, Expo export metadata, or Expo config runtimeVersion policies/strings
|
|
337
|
+
- Expo runtimeVersion reads `--runtime-version`, Expo export metadata, or Expo config runtimeVersion policies/strings; if none are present, the CLI falls back to the resolved native version
|
|
302
338
|
- `--native-version` overrides auto-detection
|
|
303
339
|
|
|
340
|
+
For Expo projects, the recommended app config is:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"expo": {
|
|
345
|
+
"version": "1.0.0",
|
|
346
|
+
"runtimeVersion": {
|
|
347
|
+
"policy": "appVersion"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Use a string value instead if you manage runtime compatibility manually:
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"expo": {
|
|
358
|
+
"runtimeVersion": "1.0.0"
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
```
|
|
362
|
+
|
|
304
363
|
Choose the bundle ID you want to release:
|
|
305
364
|
|
|
306
365
|
```bash
|