@capgo/cli 5.0.0-alpha.3 β†’ 5.0.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.
Files changed (59) hide show
  1. package/README.md +197 -37
  2. package/dist/index.js +327 -65172
  3. package/dist/package.json +83 -0
  4. package/package.json +48 -61
  5. package/.eslintignore +0 -4
  6. package/.github/FUNDING.yml +0 -1
  7. package/.github/workflows/build.yml +0 -46
  8. package/.github/workflows/bump_version.yml +0 -56
  9. package/.github/workflows/test.yml +0 -30
  10. package/.prettierignore +0 -6
  11. package/.vscode/launch.json +0 -23
  12. package/.vscode/settings.json +0 -5
  13. package/.vscode/tasks.json +0 -42
  14. package/CHANGELOG.md +0 -2727
  15. package/build.mjs +0 -23
  16. package/bun.lockb +0 -0
  17. package/capacitor.config.ts +0 -33
  18. package/crypto_explained.png +0 -0
  19. package/eslint.config.js +0 -3
  20. package/renovate.json +0 -23
  21. package/src/api/app.ts +0 -75
  22. package/src/api/channels.ts +0 -142
  23. package/src/api/crypto.ts +0 -121
  24. package/src/api/devices_override.ts +0 -41
  25. package/src/api/update.ts +0 -12
  26. package/src/api/versions.ts +0 -98
  27. package/src/app/add.ts +0 -154
  28. package/src/app/debug.ts +0 -214
  29. package/src/app/delete.ts +0 -68
  30. package/src/app/info.ts +0 -87
  31. package/src/app/list.ts +0 -63
  32. package/src/app/set.ts +0 -94
  33. package/src/bundle/check.ts +0 -42
  34. package/src/bundle/cleanup.ts +0 -128
  35. package/src/bundle/compatibility.ts +0 -70
  36. package/src/bundle/decrypt.ts +0 -65
  37. package/src/bundle/delete.ts +0 -53
  38. package/src/bundle/encrypt.ts +0 -69
  39. package/src/bundle/list.ts +0 -43
  40. package/src/bundle/unlink.ts +0 -80
  41. package/src/bundle/upload.ts +0 -434
  42. package/src/bundle/zip.ts +0 -137
  43. package/src/channel/add.ts +0 -73
  44. package/src/channel/currentBundle.ts +0 -73
  45. package/src/channel/delete.ts +0 -51
  46. package/src/channel/list.ts +0 -49
  47. package/src/channel/set.ts +0 -171
  48. package/src/index.ts +0 -285
  49. package/src/init.ts +0 -301
  50. package/src/key.ts +0 -158
  51. package/src/login.ts +0 -66
  52. package/src/types/capacitor__cli.d.ts +0 -6
  53. package/src/types/supabase.types.ts +0 -2065
  54. package/src/utils.ts +0 -719
  55. package/test/chunk_convert.ts +0 -28
  56. package/test/data.ts +0 -18769
  57. package/test/test_headers_rls.ts +0 -24
  58. package/test/test_semver.ts +0 -13
  59. package/tsconfig.json +0 -39
package/README.md CHANGED
@@ -13,9 +13,11 @@ Before use the CLI, you should register here : https://capgo.app/
13
13
 
14
14
  Then go to your account in `apikey` section and click in the `all` key to copy it.
15
15
 
16
+ Follow the documentation here : "https://capacitorjs.com/docs/getting-started/
17
+
16
18
  ### **Init**
17
19
 
18
- `npx @capgo/cli init [apikey]`
20
+ `npx @capgo/cli@latest init [apikey]`
19
21
 
20
22
  This method is here to onboard you step by step.
21
23
 
@@ -49,7 +51,7 @@ This command will also be useful for bug report.
49
51
 
50
52
  `npx @capgo/cli app add [appId]`
51
53
 
52
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
54
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
53
55
 
54
56
  > πŸ’‘ All option will be guessed in your config if not provided.
55
57
 
@@ -58,6 +60,7 @@ Optionally, you can give:
58
60
  * `--icon [/path/to/my/icon]` to have a custom icon display in Capgo web app.
59
61
  * `--name [test]` to have a custom name in the list.
60
62
  * `--apikey [key]` API key to link to your account.
63
+ * `--retention [retention]` retention period of app bundle in days, 0 by default = infinite.
61
64
 
62
65
  Example of `capacitor.config.json` for appId and AppName, the icon is guess in the resources folder
63
66
 
@@ -73,7 +76,7 @@ Example of `capacitor.config.json` for appId and AppName, the icon is guess in t
73
76
 
74
77
  `npx @capgo/cli app set [appId]`
75
78
 
76
- `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init).
79
+ `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
77
80
 
78
81
  Optionally, you can give:
79
82
 
@@ -86,7 +89,7 @@ Optionally, you can give:
86
89
 
87
90
  `npx @capgo/cli app list [appId]`
88
91
 
89
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
92
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
90
93
 
91
94
  Optionally, you can give:
92
95
 
@@ -96,7 +99,7 @@ Optionally, you can give:
96
99
 
97
100
  `npx @capgo/cli app delete [appId]`
98
101
 
99
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
102
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
100
103
 
101
104
  Optionally, you can give:
102
105
 
@@ -107,34 +110,71 @@ Optionally, you can give:
107
110
 
108
111
  `npx @capgo/cli app debug [appId]`
109
112
 
110
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
113
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
111
114
 
112
115
  Optionally, you can give:
113
116
 
114
117
  * `--apikey [key]` API key to link to your account.
115
118
  * `--device` with the specific device you want to debug
116
119
 
120
+ ### Setting
121
+
122
+ `npx @capgo/cli app setting [path]`
123
+
124
+ Edit the Capacitor config.
125
+
126
+ `[path]` - path of the setting that you would like to change. For example, to change the `appId`, provide `appId`.
127
+ If you wish to disable auto update in the `capacitor-updater` provide `plugins.CapacitorUpdater.autoUpdate`
128
+
129
+ You MUST provide either `--string` or `--bool`!
130
+
131
+ Options:
132
+ - `--string <string>` - sets the setting to a string
133
+ - `--bool <true | false>` - sets the setting to a boolean
134
+
117
135
  ## Bundle
118
136
 
119
137
  ### Upload
120
138
 
121
139
  `npx @capgo/cli bundle upload [appId]`
122
140
 
123
- `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init).
124
-
125
- Optionally, you can give:
126
-
127
- * `--apikey [key]` API key to link to your account.
128
- * `--path [/path/to/my/bundle]` to upload a specific folder.
129
- * `--channel [test]` to upload to a specific channel.
130
- * `--external="https://mydomain.com/myapp.zip"` to link to an external URL instead of upload to Capgo cloud, it should be a zip URL in HTTPS.
131
- * `--key [/path/to/my/public_key]` the path of your public key.
132
- * `--key-data [publicKey]` the public key data, if you want to use inline.
133
- * `--no-key` to ignore the signing key and send clear update.
134
- * `--bundle [1.0.0]` to set the bundle version number of the file to upload.
135
- * `--iv-session-key [key]` to send a custom session key to the cloud.
136
- * `--bundle-url` prints bundle url into stdout. Useful when [parsing bundle url from shell](https://github.com/Cap-go/CLI/pull/132).
137
- * `--no-code-check` to ignore the code check and send the bundle anyway.
141
+ `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
142
+
143
+ Options:
144
+
145
+ * `--apikey <apikey>` API key to link to your account.
146
+ * `--path <path>` Path of the folder to upload.
147
+ * `--channel <channel>` Channel to link to.
148
+ * `--external <url>` Link to external URL instead of uploading to Capgo Cloud.
149
+ * `--iv-session-key <key>` Set the IV and session key for bundle URL external.
150
+ * `--s3-endpoint <s3Endpoint>` URL of S3 endpoint. Do not work with Partial upload, or external option.
151
+ * `--s3-region <region>` Region for your S3 bucket.
152
+ * `--s3-apikey <apikey>` API key for your S3 endpoint.
153
+ * `--s3-apisecret <apisecret>` API secret for your S3 endpoint.
154
+ * `--s3-bucket-name <bucketName>` Name for your AWS S3 bucket.
155
+ * `--s3-port <port>` Port for your S3 endpoint.
156
+ * `--no-s3-ssl` Disable SSL for S3 upload.
157
+ * `--key <key>` Custom path for public signing key (v1 system).
158
+ * `--key-data <keyData>` Public signing key (v1 system).
159
+ * `--key-v2 <key>` Custom path for private signing key (v2 system).
160
+ * `--key-data-v2 <keyData>` Private signing key (v2 system).
161
+ * `--bundle-url` Prints bundle URL into stdout.
162
+ * `--no-key` Ignore signing key and send clear update.
163
+ * `--no-code-check` Ignore checking if notifyAppReady() is called in source code and index present in root folder.
164
+ * `--display-iv-session` Show in the console the IV and session key used to encrypt the update.
165
+ * `--bundle <bundle>` Bundle version number of the bundle to upload.
166
+ * `--min-update-version <minUpdateVersion>` Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel.
167
+ * `--auto-min-update-version` Set the min update version based on native packages.
168
+ * `--ignore-metadata-check` Ignores the metadata (node_modules) check when uploading.
169
+ * `--ignore-checksum-check` Ignores the checksum check when uploading.
170
+ * `--timeout <timeout>` Timeout for the upload process in seconds.
171
+ * `--partial` Does not upload partial files to Capgo cloud.
172
+ * `--tus` Upload the bundle using tus protocol.
173
+ * `--multipart` Uses multipart protocol to upload data to S3, Deprecated, use TUS instead.
174
+ * `--encrypted-checksum <encryptedChecksum>` An encrypted checksum (signature). Used only when uploading an external bundle.
175
+ * `--package-json <packageJson>` A path to package.json. Usefull for monorepos.
176
+ * `--auto-set-bundle` Set the bundle in capacitor.config.json.
177
+ * `--node-modules <nodeModules>` A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules).
138
178
 
139
179
  > ⭐️ External option helps to unlock 2 cases: corporate with privacy concern, don't send the code to a third part and app bigger than 200 MB. With this setting, Capgo store only the link to the zip and sends the link to all apps.
140
180
 
@@ -152,13 +192,13 @@ Example of `package.json` for version
152
192
 
153
193
  > β›” Version should be greater than β€œ0.0.0”.
154
194
 
155
- > πŸ’‘ Don't forget to update the version number each time you send one, or the device will don't see the update.
195
+ > πŸ’‘ Don't forget to update the version number each time you send one, version number cannot be overrode, or reused after deletion for security reason.
156
196
 
157
197
  ### **List**
158
198
 
159
199
  `npx @capgo/cli bundle list [appId]`
160
200
 
161
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
201
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
162
202
 
163
203
  Optionally, you can give:
164
204
 
@@ -168,7 +208,7 @@ Optionally, you can give:
168
208
 
169
209
  `npx @capgo/cli bundle delete [appId]`
170
210
 
171
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
211
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
172
212
 
173
213
  Optionally, you can give:
174
214
 
@@ -181,7 +221,7 @@ in a SemVer range for a major version to Cloud
181
221
 
182
222
  `npx @capgo/cli bundle cleanup [appId] --bundle=[majorVersion] --keep=[numberToKeep]`
183
223
 
184
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
224
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
185
225
 
186
226
  Optionally, you can give:
187
227
 
@@ -201,14 +241,31 @@ This command will ignore bundles which are currently in use in any channel.
201
241
 
202
242
  ### **Encrypt**
203
243
 
244
+ > **Warning**: This command is deprecated and will be removed in the next major release. Please use the new encryption system.
204
245
  `npx @capgo/cli bundle encrypt [path/to/zip]`
205
246
 
206
- This command is used when you use external source to store your code or for test purpose.
247
+ This command is used when you use external source to store your code or for test purpose.
207
248
 
208
249
  Optionally, you can give:
209
250
 
210
251
  `--key [/path/to/my/private_key]` the path of your private key.
211
- `--key-data [privateKey]` the private key data, if you want to use inline.
252
+ `--key-data [privateKey]` the private key data, if you want to use inline.
253
+ The command will print your `ivSessionKey`y and generate an encrypted zip, to use it with the upload command or decryt command.
254
+
255
+ ### **Encrypt V2**
256
+
257
+ `npx @capgo/cli bundle encryptV2 [path/to/zip] [checksum]`
258
+
259
+ This command is used when you use external source to store your code or for test purpose.
260
+ The checksum is the sha256 of the bundle (generated by --key-v2), it is used to verify the integrity of the file after decryption.
261
+ It will be enncrypted with the private key and sent along with the bundle.
262
+ In encryption v2 the checksum is upgraded to become a "signature" of the bundle.
263
+
264
+ Optionally, you can give:
265
+
266
+ `--key [/path/to/my/private_key]` the path of your private key.
267
+ `--key-data [privateKey]` the private key data, if you want to use inline.
268
+ `--json` to output info as json.
212
269
  The command will print your `ivSessionKey`y and generate an encrypted zip, to use it with the upload command or decryt command.
213
270
 
214
271
  ### **Decrypt**
@@ -217,21 +274,49 @@ The command will print your `ivSessionKey`y and generate an encrypted zip, to us
217
274
 
218
275
  Optionally, you can give:
219
276
 
220
- `--key [/path/to/my/public_key]` the path of your public key.
277
+ `--key [/path/to/my/private_key]` the path of your private key.
278
+
279
+ `--key-data [privateKey]` the private key data, if you want to use inline. This command is mainly used for test purpose, it will decrypt the zip and print the base64 decrypted session key in the console.
221
280
 
222
- `--key-data [publicKey]` the public key data, if you want to use inline. This command is mainly used for test purpose, it will decrypt the zip and print the base64 decrypted session key in the console.
281
+ ### **Decrypt V2**
282
+
283
+ `npx @capgo/cli bundle decryptV2 [path/to/zip] [ivSessionKey]`
284
+
285
+ Optionally, you can give:
286
+
287
+ `--key [/path/to/my/private_key]` the path of your private key.
288
+ `--key-data [privateKey]` the private key data, if you want to use inline. This command is mainly used for test purpose, it will decrypt the zip and print the base64 decrypted session key in the console.
289
+ `--checksum [checksum]` the checksum of the file, it will verify the checksum after decryption.
223
290
 
224
291
  ### **Zip**
225
292
 
226
293
  `npx @capgo/cli bundle zip [appId]`
227
294
 
228
- `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init).
295
+ `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
229
296
 
230
297
  Optionally, you can give:
231
298
 
232
299
  * `--path [/path/to/my/bundle]` to upload a specific folder.
233
300
  * `--bundle [1.0.0]` to set the bundle version number of the filename.
234
301
  * `--name [myapp]` to override the filename.
302
+ * `--json` to output info as json.
303
+ * `--no-code-check` to ignore the code check and send the bundle anyway.
304
+ * `--key-v2` to use the new encryption system. This is required as new encryption system use better checksums to verify the integrity of the file.
305
+
306
+ ### **Compatibility**
307
+
308
+ `npx @capgo/cli bundle compatibility [appId] -c [channelId]`
309
+
310
+ `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
311
+ `[channelId]` the name of your new channel.
312
+
313
+ Optionally, you can give:
314
+
315
+ * `--apikey [key]` API key to link to your account.
316
+ * `--text` use text instead of emojis in the table
317
+ * `--channel [channel]` the channel to check the compatibility with.
318
+ * `--package-json <packageJson>` A path to package.json. Usefull for monorepos
319
+ * `--node-modules <nodeModules>` A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules)
235
320
 
236
321
  ## Channel
237
322
 
@@ -239,19 +324,19 @@ Optionally, you can give:
239
324
 
240
325
  `npx @capgo/cli channel add [channelId] [appId]`
241
326
 
242
- `[channelId]` the name of your new channel. `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
327
+ `[channelId]` the name of your new channel. `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
243
328
 
244
329
  ### **Delete**
245
330
 
246
331
  `npx @capgo/cli channel delete [channelId] [appId]`
247
332
 
248
- `[channelId]` the name of your channel you want to delete. `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
333
+ `[channelId]` the name of your channel you want to delete. `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
249
334
 
250
335
  ### **List**
251
336
 
252
337
  `npx @capgo/cli channel list [appId]`
253
338
 
254
- `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init).
339
+ `[appId]` your app ID the format `com.test.app` is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
255
340
 
256
341
  Optionally, you can give:
257
342
 
@@ -261,7 +346,7 @@ Optionally, you can give:
261
346
 
262
347
  `npx @capgo/cli channel set [channelId] [appId]`
263
348
 
264
- `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init).
349
+ `[appId]` is your app ID, the format is explained [here](https://capacitorjs.com/docs/cli/commands/init/).
265
350
 
266
351
  Optionally, you can give:
267
352
 
@@ -278,8 +363,68 @@ Optionally, you can give:
278
363
  * `--no-android` disallows the channel to send version to android devices.
279
364
  * `--self-assign` allows devices to self assign to this channel.
280
365
  * `--no-self-assign` disallows devices to self assign to this channel.
366
+ * `--disable-auto-update STRATEGY` Disable auto update strategy for this channel. The possible options are: major, minor, metadata, none.
281
367
  * `--apikey [key]` API key to link to your account.
282
368
 
369
+ ## Disable updates strategy
370
+
371
+ There are a few ways to handle disabling updates for too old versions.\
372
+ Capgo cannot update native code thus an update from a version with the old native code to a version with the updated native code should not be possible.
373
+ There are a couple of ways to achieve that.
374
+
375
+ First, the `major` strategy. It prevents an update from `0.0.0` -> `1.0.0`. The major is the highlighted number (**1**.0.0 and **0**.0.0).\
376
+ Second is the `minor` strategy. It prevents an update from `0.0.0` -> `1.1.0` or an update from `1.1.0` to `1.2.0`.
377
+ **BE AWARE** this strategy does not prevent an update from `0.1.0` -> `1.1.0`
378
+
379
+ Third, the `patch` strategy. It was added into capgo as a very strict mode. It's not recomended to be used unless you fully understand how it works.
380
+ In order for it to accept a update the following conditions must be meet:
381
+ - The major is the same between the new and the old version
382
+ - The minor is the same between the new and the old version
383
+ - The patch of the new version if greater then the patch of the old version
384
+
385
+ Here is an example of which scenarios the update is allowed or denied
386
+
387
+ - 0.0.311 -> 0.0.314 βœ…
388
+ - 0.0.0 -> 0.0.314 βœ…
389
+ - 0.0.316 -> 0.0.314 ❌
390
+ - 0.1.312 -> 0.0.314 ❌
391
+ - 1.0.312 -> 0.0.314 ❌
392
+
393
+ Lastly the most complicated strategy. The `metadata` strategy.\
394
+ First you need to know that initially after you enable it the updates **WILL** fail as the channel is lacking the required metadata.\
395
+ If the channel is lacking metadata you will see a message like this:
396
+ <img src="/fail-metadata.webp" alt="Cannot find metadata"/>
397
+
398
+ If you see something like this you know that you have to go to the current bundle for the failing channel and set the metadata.\
399
+ First, figure out what channel is failing. You can do that by looking at the `misconfigured` column
400
+ <img src="/misconfigured-table.webp" alt="Misconfigured table"/>
401
+
402
+ Then go to the failing channel and click on `Bundle number`. This should take you to the bundle page.
403
+ <img src="/fail-channel-show.webp" alt="Locate failing channel"/>
404
+
405
+ Once there fill the `Minimal update version` field. This should be a [semver](https://devhints.io/semver/).\
406
+ If the value you pass is not a semver you will get an error, but if everything goes correctly you should see something like this:
407
+ <img src="/set-min-update-version.webp" alt="Set min version"/>
408
+
409
+ Now, you likely do not want to set this data manually every time you update. Fortunately, the CLI will prevent you from sending an update without this metadata
410
+ <img src="/cli-fail-no-metadata.webp" alt="CLI fail no metadata"/>
411
+
412
+ To properly upload a bundle when using the `metadata` option you need to pass the `--min-update-version` with the valid semver. Something like this:
413
+ <img src="/cli-upload-with-metadata.webp" alt="CLI upload with metadata"/>
414
+
415
+ The `--min-update-version` is not the ONLY way to do compatibility.
416
+ There also exists the `--auto-min-update-version`. Here is how it works.
417
+
418
+ First, it takes a look at the version curently uploaded to the channel. It checks compatibility same as `bundle compatibility` command would.
419
+ Second, if the new version is 100% compatible it reuses the `min_update_version` from the latest version in the channel.
420
+ If not, then it sets the `min_update_version` to the bundle number of the newly uploaded version.
421
+
422
+ You will always get an information what is the `min_update_version` when using this option. It will look something like this:
423
+ <img src="/min_update_version_info.webp" alt="Min update version"/>
424
+
425
+ If the new version is not compatible it should look something like this
426
+ <img src="/min_update_version_not_compatible.webp" alt="Min update version not compatible"/>
427
+
283
428
  ## End-to-End encryption (Trustless)
284
429
 
285
430
  Capgo supports end-to-end encryption, this means that your bundle(code) is encrypted before sent to the cloud and decrypted on the device. For that, you need to generate an RSA key pair, you can use the following command to generate it.
@@ -290,11 +435,13 @@ See below for more information about the encryption system.
290
435
 
291
436
  <figure><img src="/crypto_explained.png" alt=""><figcaption><p>Ecryption schema</p></figcaption></figure>
292
437
 
438
+ Ecryption schema
439
+
293
440
  ### Create key for your app
294
441
 
295
442
  `npx @capgo/cli key create`
296
443
 
297
- Optionally, you can give: `--force` to overwrite the existing key. This command will create for you a key pair in your app, and will ask you to save the private key in a safe place. It's recommended to not git commit the private and public key, and to not share it with anyone.
444
+ Optionally, you can give: `--force` to overwrite the existing key. This command will create for you a key pair in your app, and will ask you to save the private key in a safe place. It's recommended to not git commit the private key, and to not share it with anyone.
298
445
 
299
446
  > After your local test, remove the key from the config file and add it on the CI step with `key save`
300
447
 
@@ -304,9 +451,22 @@ Optionally, you can give: `--force` to overwrite the existing key. This command
304
451
 
305
452
  Optionally, you can give:
306
453
 
307
- `--key [/path/to/my/public_key]` the path of your public key.
454
+ `--key [/path/to/my/private_key]` the path of your private key.
455
+
456
+ `--key-data [privateKey]` the private key data, if you want to use inline. This command is useful if you followed the recommendation and didn't commit the key in your app, and in the config.
457
+
458
+ ## Ci integration
459
+
460
+ To automate your work, I recommend you make GitHub action do the job of pushing to our server
461
+
462
+ [GitHub action tutorial](https://capgo.app/blog/automatic-build-and-release-with-github-actions/)
463
+
464
+ ## Our demo app
465
+
466
+ [GitHub - Cap-go/demo-app](https://github.com/Cap-go/demo-app/)
467
+
468
+ Don’t forget to configure CI env variable with your API key
308
469
 
309
- `--key-data [publicKey]` the public key data, if you want to use inline. This command is useful if you followed the recommendation and didn't commit the key in your app, and in the config.
310
470
  ## Dev contribution
311
471
 
312
472
  1. Install development dependencies