indraq_cli 2.4.0 → 2.6.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 (154) hide show
  1. package/CHANGELOG_v2.5.0.md +67 -0
  2. package/CHANGELOG_v2.6.0.md +9 -0
  3. package/LICENSE +21 -21
  4. package/README.md +422 -605
  5. package/RELEASE_CHECKS_v2.5.0.md +93 -0
  6. package/TEST_RESULTS_v2.5.0.txt +46 -0
  7. package/TEST_RESULTS_v2.6.0.txt +16 -0
  8. package/cloud-api/.dockerignore +18 -18
  9. package/cloud-api/.env.example +14 -14
  10. package/cloud-api/.indraq/project.json +4 -0
  11. package/cloud-api/Dockerfile +19 -19
  12. package/cloud-api/README.md +3 -3
  13. package/cloud-api/dist/index.js +57 -7
  14. package/cloud-api/dist/index.js.map +1 -0
  15. package/cloud-api/package.json +1 -1
  16. package/cloud-api/sql/001_init.sql +8 -8
  17. package/cloud-api/sql/002_user_providers_and_project_resources.sql +40 -40
  18. package/cloud-api/sql/003_environment_infrastructure.sql +19 -19
  19. package/cloud-api/sql/004_managed_aws_credentials.sql +20 -20
  20. package/cloud-api/sql/005_project_members_and_resource_grants.sql +22 -22
  21. package/cloud-api/sql/006_catalog_identity_password_security.sql +96 -96
  22. package/cloud-api/sql/007_aws_access_key_rotation.sql +16 -16
  23. package/cloud-api/sql/008_provider_scopes.sql +91 -91
  24. package/cloud-api/src/index.ts +50 -6
  25. package/cloud-api/tsconfig.json +18 -18
  26. package/dist/cli/doctor.command.js +1 -1
  27. package/dist/cli/doctor.command.js.map +1 -1
  28. package/dist/cli/help-content.d.ts.map +1 -1
  29. package/dist/cli/help-content.js +19 -18
  30. package/dist/cli/help-content.js.map +1 -1
  31. package/dist/modules/access/commands/access.command.js +34 -34
  32. package/dist/modules/access/commands/access.command.js.map +1 -1
  33. package/dist/modules/aws/commands/dns.command.d.ts.map +1 -1
  34. package/dist/modules/aws/commands/dns.command.js +3 -2
  35. package/dist/modules/aws/commands/dns.command.js.map +1 -1
  36. package/dist/modules/cloud/commands/cloud.command.d.ts +3 -0
  37. package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
  38. package/dist/modules/cloud/commands/cloud.command.js +121 -34
  39. package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
  40. package/dist/modules/cloud/commands/environment.command.js +1 -1
  41. package/dist/modules/cloud/commands/environment.command.js.map +1 -1
  42. package/dist/modules/cloud/commands/provider.command.js +1 -1
  43. package/dist/modules/cloud/commands/provider.command.js.map +1 -1
  44. package/dist/modules/cloud/index.js +2 -2
  45. package/dist/modules/cloud/index.js.map +1 -1
  46. package/dist/modules/cloud/services/cloud-aws.service.d.ts +1 -1
  47. package/dist/modules/cloud/services/cloud-aws.service.d.ts.map +1 -1
  48. package/dist/modules/cloud/services/cloud-aws.service.js +2 -2
  49. package/dist/modules/cloud/services/cloud-aws.service.js.map +1 -1
  50. package/dist/modules/cloud/services/cloud-ghcr.service.js +2 -2
  51. package/dist/modules/cloud/services/cloud-ghcr.service.js.map +1 -1
  52. package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +1 -1
  53. package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -1
  54. package/dist/modules/cloud/services/cloud-jenkins.service.js +157 -33
  55. package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -1
  56. package/dist/modules/cloud/services/cloud-npm.service.d.ts +1 -1
  57. package/dist/modules/cloud/services/cloud-npm.service.d.ts.map +1 -1
  58. package/dist/modules/cloud/services/cloud-npm.service.js +2 -2
  59. package/dist/modules/cloud/services/cloud-npm.service.js.map +1 -1
  60. package/dist/modules/cloud/services/project-cleanup.service.d.ts +24 -0
  61. package/dist/modules/cloud/services/project-cleanup.service.d.ts.map +1 -0
  62. package/dist/modules/cloud/services/project-cleanup.service.js +141 -0
  63. package/dist/modules/cloud/services/project-cleanup.service.js.map +1 -0
  64. package/dist/modules/cloud/services/user-provider.service.d.ts +1 -1
  65. package/dist/modules/cloud/services/user-provider.service.d.ts.map +1 -1
  66. package/dist/modules/cloud/services/user-provider.service.js +3 -3
  67. package/dist/modules/cloud/services/user-provider.service.js.map +1 -1
  68. package/dist/modules/configure/configure.command.js +6 -4
  69. package/dist/modules/configure/configure.command.js.map +1 -1
  70. package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
  71. package/dist/modules/deploy/commands/build.command.js +23 -12
  72. package/dist/modules/deploy/commands/build.command.js.map +1 -1
  73. package/dist/modules/deploy/commands/configure-docker.command.js +6 -6
  74. package/dist/modules/deploy/commands/configure-docker.command.js.map +1 -1
  75. package/dist/modules/deploy/config/docker-config.js +1 -1
  76. package/dist/modules/deploy/config/docker-config.js.map +1 -1
  77. package/dist/modules/deploy/index.js +1 -1
  78. package/dist/modules/deploy/index.js.map +1 -1
  79. package/dist/modules/deploy/services/docker.service.js +1 -1
  80. package/dist/modules/deploy/services/docker.service.js.map +1 -1
  81. package/dist/modules/dockerfile/services/project-docker.service.d.ts +9 -0
  82. package/dist/modules/dockerfile/services/project-docker.service.d.ts.map +1 -0
  83. package/dist/modules/dockerfile/services/project-docker.service.js +122 -0
  84. package/dist/modules/dockerfile/services/project-docker.service.js.map +1 -0
  85. package/dist/modules/jenkins/commands/create-deployment.command.js +4 -4
  86. package/dist/modules/jenkins/commands/create-deployment.command.js.map +1 -1
  87. package/dist/modules/jenkins/index.js +1 -1
  88. package/dist/modules/jenkins/index.js.map +1 -1
  89. package/dist/modules/mobile/commands/mobile-environment.command.js +1 -1
  90. package/dist/modules/mobile/commands/mobile-environment.command.js.map +1 -1
  91. package/dist/modules/mobile/commands/mobile-prebuild.command.js +1 -1
  92. package/dist/modules/mobile/commands/mobile-prebuild.command.js.map +1 -1
  93. package/dist/modules/mobile/commands/ota.command.js +3 -3
  94. package/dist/modules/mobile/commands/ota.command.js.map +1 -1
  95. package/dist/modules/mobile/index.d.ts.map +1 -1
  96. package/dist/modules/mobile/index.js +8 -7
  97. package/dist/modules/mobile/index.js.map +1 -1
  98. package/dist/modules/mobile/services/mobile-project-directory.d.ts +3 -0
  99. package/dist/modules/mobile/services/mobile-project-directory.d.ts.map +1 -0
  100. package/dist/modules/mobile/services/mobile-project-directory.js +31 -0
  101. package/dist/modules/mobile/services/mobile-project-directory.js.map +1 -0
  102. package/dist/modules/mobile/services/ota-setup.service.d.ts.map +1 -1
  103. package/dist/modules/mobile/services/ota-setup.service.js +5 -3
  104. package/dist/modules/mobile/services/ota-setup.service.js.map +1 -1
  105. package/dist/modules/prebuild/commands/prebuild.command.d.ts +4 -0
  106. package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -1
  107. package/dist/modules/prebuild/commands/prebuild.command.js +155 -100
  108. package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -1
  109. package/dist/modules/prebuild/index.js +2 -2
  110. package/dist/modules/prebuild/index.js.map +1 -1
  111. package/dist/modules/prebuild/setup-plan.d.ts +11 -0
  112. package/dist/modules/prebuild/setup-plan.d.ts.map +1 -0
  113. package/dist/modules/prebuild/setup-plan.js +58 -0
  114. package/dist/modules/prebuild/setup-plan.js.map +1 -0
  115. package/dist/modules/proxy/services/npm-api.service.d.ts +1 -0
  116. package/dist/modules/proxy/services/npm-api.service.d.ts.map +1 -1
  117. package/dist/modules/proxy/services/npm-api.service.js +1 -0
  118. package/dist/modules/proxy/services/npm-api.service.js.map +1 -1
  119. package/dist/modules/scaffold/commands/init.command.d.ts.map +1 -1
  120. package/dist/modules/scaffold/commands/init.command.js +33 -18
  121. package/dist/modules/scaffold/commands/init.command.js.map +1 -1
  122. package/dist/modules/scaffold/types.d.ts +3 -1
  123. package/dist/modules/scaffold/types.d.ts.map +1 -1
  124. package/dist/modules/scopes/commands/scope.command.d.ts +3 -1
  125. package/dist/modules/scopes/commands/scope.command.d.ts.map +1 -1
  126. package/dist/modules/scopes/commands/scope.command.js +15 -8
  127. package/dist/modules/scopes/commands/scope.command.js.map +1 -1
  128. package/dist/modules/scopes/index.js +1 -1
  129. package/dist/modules/scopes/index.js.map +1 -1
  130. package/dist/modules/scopes/services/scope-native.service.d.ts.map +1 -1
  131. package/dist/modules/scopes/services/scope-native.service.js +16 -5
  132. package/dist/modules/scopes/services/scope-native.service.js.map +1 -1
  133. package/dist/modules/setup/commands/setup.command.d.ts.map +1 -1
  134. package/dist/modules/setup/commands/setup.command.js +41 -24
  135. package/dist/modules/setup/commands/setup.command.js.map +1 -1
  136. package/dist/modules/users/commands/user.command.d.ts.map +1 -1
  137. package/dist/modules/users/commands/user.command.js +10 -2
  138. package/dist/modules/users/commands/user.command.js.map +1 -1
  139. package/dist/modules/users/providers/jenkins-user.provider.js +95 -95
  140. package/dist/modules/users/providers/npm-user.provider.d.ts.map +1 -1
  141. package/dist/modules/users/providers/npm-user.provider.js +31 -2
  142. package/dist/modules/users/providers/npm-user.provider.js.map +1 -1
  143. package/dist/shared/config/config-files.js +7 -7
  144. package/dist/shared/jenkins/role-strategy-groovy.js +84 -84
  145. package/dist/shared/process/run-npx.d.ts +4 -0
  146. package/dist/shared/process/run-npx.d.ts.map +1 -0
  147. package/dist/shared/process/run-npx.js +31 -0
  148. package/dist/shared/process/run-npx.js.map +1 -0
  149. package/docs/ARCHITECTURE.md +7 -7
  150. package/docs/CREATE-DEPLOYMENT-reference.groovy +8 -8
  151. package/docs/README_v2.6.0_DETAILED.md +1021 -0
  152. package/package.json +12 -5
  153. package/templates/jenkins/CREATE-DEPLOYMENT.groovy +8 -8
  154. package/templates/jenkins/Jenkinsfile-Mobile-App +759 -759
@@ -0,0 +1,1021 @@
1
+ <div align="center">
2
+ <img src="docs/assets/indraq-logo.png" alt="IndraQ" width="360" />
3
+
4
+ # IndraQ CLI
5
+
6
+ **One CLI for provider access, project infrastructure and deployments.**
7
+
8
+ ![version](https://img.shields.io/badge/version-2.6.0-blue)
9
+ ![node](https://img.shields.io/badge/Node.js-%3E%3D22-green)
10
+ ![typescript](https://img.shields.io/badge/TypeScript-5.x-blue)
11
+ ![license](https://img.shields.io/badge/license-MIT-lightgrey)
12
+
13
+ **[Quick start](#quick-start)** · **[Scopes](#provider-scopes)** · **[Users](#users-and-permissions)** · **[Projects](#projects-and-environments)** · **[Deploy](#prebuild-and-deploy)** · **[Commands](#command-reference)**
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## What is IndraQ?
19
+
20
+ IndraQ is an internal engineering CLI that connects your team to shared infrastructure without making every developer carry organization administrator credentials.
21
+
22
+ Instead of configuring “one AWS”, “one Jenkins”, or “one NPM” globally, IndraQ uses **provider scopes** as the normal deployment credential path. v2.3 added a component-first project model and multi-environment deployment, v2.4 added mobile/OTA support, and v2.5 improves first-time setup, Dockerfile handling, Jenkins build recovery, Nginx Proxy Manager user verification, and user-facing GitHub Packages naming. A scope is one named account or server such as:
23
+
24
+ - `AWS — IndraQ Production`
25
+ - `AWS — Client ABC`
26
+ - `Jenkins DEV — India`
27
+ - `Jenkins PROD — Production`
28
+ - `NPM — Main Reverse Proxy`
29
+ - `GitHub Packages — IndraQ`
30
+
31
+ Admins create scopes once. Managers assign users inside scopes they manage. Users see and use only scopes assigned to them.
32
+
33
+ ```mermaid
34
+ flowchart LR
35
+ A[Admin] --> S[Provider scopes]
36
+ S --> AWS[AWS Production]
37
+ S --> J[Jenkins DEV]
38
+ S --> N[NPM Main]
39
+ S --> G[GitHub Packages]
40
+ AWS --> M[Scope members]
41
+ J --> M
42
+ N --> M
43
+ G --> M
44
+ M --> P[Projects]
45
+ P --> E[Environment: dev / staging / prod]
46
+ E --> D[Build & deploy]
47
+ ```
48
+
49
+ > [!TIP]
50
+ > The Cloud API is built into the CLI at **https://cli.indraq.com**. Provider secrets are stored centrally and encrypted; project folders store only project references, not administrator secrets.
51
+
52
+ ---
53
+
54
+ ## Why scopes?
55
+
56
+ Teams often manage several servers, customers and cloud accounts at once. A single provider credential creates ambiguity and unnecessary privilege. Scopes solve both problems.
57
+
58
+ | Problem | IndraQ behavior |
59
+ |---|---|
60
+ | Several AWS accounts | Unlimited named AWS scopes |
61
+ | Several Jenkins servers | Unlimited named DEV/PROD Jenkins scopes |
62
+ | Several NPM servers | Unlimited named NPM scopes |
63
+ | “Which account is this?” | `scope describe` shows safe identifying metadata |
64
+ | Users should not see every server | Only assigned scopes are visible |
65
+ | Managers should not create org credentials | Only admins create scopes |
66
+ | Project needs a specific provider | Project/environment links override personal defaults |
67
+ | Existing DNS/proxy should be reused | Link existing or skip |
68
+
69
+ ---
70
+
71
+ ## Core concepts
72
+
73
+ ### Provider scope
74
+
75
+ One organization-owned provider account/server plus its encrypted management credential and safe metadata. The management secret is used by the Cloud API for provisioning/administration and is **not returned to normal `USE` members**. AWS/NPM/Jenkins users resolve their own native identities instead.
76
+
77
+ ### Scope membership
78
+
79
+ A relationship between a person and a scope:
80
+
81
+ - `USE` — consume the scope and self-manage only your own credentials.
82
+ - `MANAGE` — add/remove normal users and manage membership in that scope.
83
+
84
+ ### Project
85
+
86
+ A durable application definition. Deleting a developer does **not** delete the project, Jenkins jobs, DNS, proxy configuration or image associations.
87
+
88
+ ### Components (v2.3)
89
+
90
+ A project can contain one or many independently deployable components. Existing `frontend`, `backend`, and `frontend + backend` projects remain compatible. v2.3 also supports **User Frontend + Admin Frontend + Backend** and a custom component model underneath.
91
+
92
+ ```text
93
+ health-app
94
+ ├── backend → health-app-backend image / pipeline
95
+ ├── frontend → health-app-user image / pipeline
96
+ └── admin → health-app-admin image / pipeline
97
+ ```
98
+
99
+ Components answer **what gets built**. Deployment environments answer **where it runs**. These are deliberately separate concepts.
100
+
101
+ ### Deployment topology (v2.3)
102
+
103
+ A project can be restricted to one shared environment/server or several. Multi-environment topology is an explicit opt-in; single-server remains the default.
104
+
105
+ ```text
106
+ Project
107
+ ├── Components: backend, user frontend, admin frontend
108
+ └── Deployment environments
109
+ ├── prod-primary → Jenkins A / NPM A
110
+ └── prod-backup → Jenkins B / NPM B
111
+ ```
112
+
113
+ Use `indraq project environments` to change the allowed deployment servers later.
114
+
115
+ ### Environment
116
+
117
+ An IndraQ deployment/resource environment such as `dev`, `staging` or `prod`.
118
+
119
+ > [!IMPORTANT]
120
+ > `--env dev` selects the **IndraQ project/resource environment**. It does **not** load `.env.dev`, `.env`, or any application environment file.
121
+
122
+ ---
123
+
124
+ ## Users and permissions
125
+
126
+ | Capability | Admin | Manager | User |
127
+ |---|:---:|:---:|:---:|
128
+ | Create/delete provider scopes | ✅ | ❌ | ❌ |
129
+ | View assigned scopes | ✅ | ✅ | ✅ |
130
+ | Describe assigned scopes safely | ✅ | ✅ | ✅ |
131
+ | Grant `MANAGE` to a manager | ✅ | ❌ | ❌ |
132
+ | Add/remove normal users in managed scope | ✅ | ✅ | ❌ |
133
+ | Create manager/admin organization roles | ✅ | ❌ | ❌ |
134
+ | Change organization roles | ✅ | ❌ | ❌ |
135
+ | Set personal provider default | ✅ | ✅ | ✅ |
136
+ | Rotate own AWS access key | ✅ | ✅ | ✅ |
137
+ | Rotate own NPM/Jenkins password | ✅ | ✅ | ✅ |
138
+ | Raw provider administration | ✅ | ❌ | ❌ |
139
+
140
+ Managers can operate only inside scopes where they have `MANAGE`. A manager assigned only to `AWS — Production` cannot manage users in `AWS — Client ABC`.
141
+
142
+ ```mermaid
143
+ flowchart TD
144
+ Admin -->|creates| Scope
145
+ Admin -->|MANAGE| Manager
146
+ Manager -->|USE| UserA[User]
147
+ Admin -->|USE| UserB[User]
148
+ Scope --> Manager
149
+ Scope --> UserA
150
+ Scope --> UserB
151
+ ```
152
+
153
+ IndraQ writes creation/setup actions to the Cloud audit log with safe automatic reasons. Prompts for an audit reason are reserved for operations that modify or delete existing state, such as removing access, changing users/projects/environments, rotating credentials, archiving/restoring, or deleting resources.
154
+
155
+ ---
156
+
157
+ ## Quick start
158
+
159
+ ### 1. Install
160
+
161
+ ```bash
162
+ npm install -g indraq_cli
163
+ indraq --version
164
+ # or
165
+ indraq -V
166
+ ```
167
+
168
+ `-V` / `--version` uses a lightweight startup path and does not initialize AWS, Jenkins, NPM, Cloud, deployment, or mobile modules.
169
+
170
+ Node.js 22+ is required.
171
+
172
+ ### 2. Guided setup (recommended)
173
+
174
+ For a new machine/project, the shortest path is:
175
+
176
+ ```bash
177
+ indraq setup
178
+ ```
179
+
180
+ The wizard signs in if needed, registers/links the current folder, can create the first shared environment (admin), asks whether the project uses one or multiple servers, and then shows **one setup checklist**. The developer chooses the work once; IndraQ does not repeatedly ask `Would you like to configure it now?` for every component/resource.
181
+
182
+ ```text
183
+ What do you want to set up?
184
+
185
+ [x] Dockerfile(s)
186
+ [x] GitHub Packages
187
+ [x] Jenkins
188
+ [ ] AWS Route53
189
+ [ ] Nginx Proxy Manager
190
+ ```
191
+
192
+ Only selected items run. Route53 and Nginx Proxy Manager are no longer silently skipped during project creation/setup, and selecting one item does not secretly enable unrelated items.
193
+
194
+ Or run the individual commands manually:
195
+
196
+ ```bash
197
+ indraq login
198
+ indraq whoami
199
+ ```
200
+
201
+ ### 3. Admin creates organization scopes
202
+
203
+ ```bash
204
+ indraq scope create aws
205
+ indraq scope create jenkins-dev
206
+ indraq scope create npm
207
+ indraq scope create github-packages
208
+ ```
209
+
210
+ You can create as many as required.
211
+
212
+ ### 4. Verify what a scope represents
213
+
214
+ ```bash
215
+ indraq scope list
216
+ indraq scope describe "AWS Production"
217
+ ```
218
+
219
+ Example safe output:
220
+
221
+ ```text
222
+ provider AWS
223
+ name Production
224
+ company IndraQ
225
+ account 123456789012
226
+ region ap-south-1
227
+ username indraq-admin
228
+ access use
229
+ default yes
230
+ credentials stored securely (secret hidden)
231
+ ```
232
+
233
+ `describe` never prints passwords, tokens, AWS secret keys or GitHub Packages tokens.
234
+
235
+ ### 5. Create a user and choose scopes
236
+
237
+ ```bash
238
+ indraq user create
239
+ ```
240
+
241
+ The admin/manager sees only scopes they can manage and can select multiple:
242
+
243
+ ```text
244
+ [✓] AWS — Production
245
+ [ ] AWS — Client ABC
246
+ [✓] Jenkins DEV — India
247
+ [✓] NPM — Main
248
+ [✓] GitHub Packages — IndraQ
249
+ ```
250
+
251
+ Native AWS/NPM/Jenkins identities are created only in selected scopes.
252
+
253
+ ### 6. Link a project
254
+
255
+ Register an existing application folder without scaffolding source code or running `npm install`:
256
+
257
+ ```bash
258
+ indraq project create cloud-api --kind backend --framework express --port 4010 --health /health
259
+ # or link this folder to an already registered project
260
+ indraq project link
261
+ ```
262
+
263
+ `indraq project create` registers the existing folder and writes `.indraq/project.json`; it does **not** scaffold or overwrite your application source. For web projects, v2.5 then shows the one-time setup checklist so you can optionally generate **missing Dockerfile(s)** and configure GitHub Packages, Jenkins, Route53 and/or Nginx Proxy Manager immediately. Existing Dockerfiles are preserved.
264
+
265
+ ### 7. Choose project provider defaults
266
+
267
+ ```bash
268
+ indraq project scopes --env indraq-test-airtel
269
+ ```
270
+
271
+ A project may use a different scope than your personal default.
272
+
273
+ ### 8. Reconcile infrastructure
274
+
275
+ ```bash
276
+ indraq prebuild
277
+ # choose one of the shared environments shown by the CLI
278
+ ```
279
+
280
+ ### 9. Deploy
281
+
282
+ ```bash
283
+ indraq deploy
284
+ # choose one of the shared environments shown by the CLI
285
+ # or deploy directly:
286
+ indraq deploy --env indraq-test-airtel
287
+ ```
288
+
289
+ Normal deploys reuse the scopes already saved for that project/environment. Use `--select-scopes` only when you intentionally want to review or change those bindings:
290
+
291
+ ```bash
292
+ indraq deploy --env indraq-test-airtel --select-scopes
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Provider scopes
298
+
299
+ ### Smart scope selection
300
+
301
+ When exactly one eligible provider scope is available, IndraQ can use/link that unambiguous scope without forcing an extra selection screen. When multiple eligible scopes exist, the CLI asks you to choose and shows safe company/account/endpoint metadata. Explicit `project scopes` commands remain available whenever you want to review or change a binding.
302
+
303
+ ### Unlimited named scopes
304
+
305
+ ```text
306
+ AWS Production ★
307
+ AWS Development
308
+ AWS Client ABC
309
+
310
+ Jenkins DEV India ★
311
+ Jenkins DEV Client ABC
312
+
313
+ NPM Main ★
314
+ NPM Europe
315
+
316
+ GitHub Packages IndraQ ★
317
+ ```
318
+
319
+ A star is conceptually the current user's default for that provider type. Defaults are per user.
320
+
321
+ ```bash
322
+ indraq scope default aws
323
+ indraq scope default npm
324
+ indraq scope default jenkins-dev
325
+ indraq scope default github-packages
326
+ ```
327
+
328
+ ### Add an existing user to a scope
329
+
330
+ ```bash
331
+ indraq scope add-user
332
+ ```
333
+
334
+ This performs both sides of the operation:
335
+
336
+ ```mermaid
337
+ sequenceDiagram
338
+ participant M as Admin / Manager
339
+ participant C as IndraQ Cloud
340
+ participant P as Provider
341
+ M->>C: Add user to scope (automatic creation audit reason)
342
+ C-->>M: Authorization check
343
+ M->>P: Provision native identity via scope admin credential
344
+ P-->>M: Native identity created
345
+ M->>C: Save scope membership + native mapping
346
+ C-->>M: Audited success
347
+ ```
348
+
349
+ ### Remove a user
350
+
351
+ ```bash
352
+ indraq scope remove-user
353
+ ```
354
+
355
+ The provider-native identity is removed first. Cloud membership is removed after successful provider cleanup.
356
+
357
+ ### Audit a scope
358
+
359
+ ```bash
360
+ indraq scope audit
361
+ ```
362
+
363
+ You can review who added/removed users, changed access, resolved credentials or rotated managed values and why.
364
+
365
+ ---
366
+
367
+ ## Personal credential self-service
368
+
369
+ Users do not administer organization scopes, but they can manage their own identities inside assigned scopes.
370
+
371
+ ### AWS
372
+
373
+ ```bash
374
+ indraq scope credentials
375
+ indraq scope rotate-key
376
+ ```
377
+
378
+ If several AWS scopes are assigned, IndraQ asks which account to use.
379
+
380
+ ### NPM / Jenkins
381
+
382
+ ```bash
383
+ indraq scope rotate-password
384
+ ```
385
+
386
+ The selected NPM/Jenkins scope is updated without exposing the organization administrator password/token.
387
+
388
+ ---
389
+
390
+ ## Projects and environments
391
+
392
+ A project can bind scopes by environment:
393
+
394
+ ```mermaid
395
+ flowchart LR
396
+ P[Project: accounting] --> D[dev]
397
+ P --> R[prod]
398
+ D --> JD[Jenkins DEV India]
399
+ D --> GD[GitHub Packages IndraQ]
400
+ D --> AD[AWS Development]
401
+ R --> JP[Jenkins PROD]
402
+ R --> GP[GitHub Packages IndraQ]
403
+ R --> AP[AWS Production]
404
+ R --> NP[NPM Production]
405
+ ```
406
+
407
+ Use:
408
+
409
+ ```bash
410
+ indraq project scopes --env indraq-test-airtel
411
+ indraq project scopes --env prod
412
+ ```
413
+
414
+ **GitHub Packages and Jenkins are required for a normal container deployment.** AWS Route53 and Nginx Proxy Manager remain optional because not every project needs IndraQ-managed DNS or reverse proxy. During project creation, `indraq setup` or `indraq prebuild`, the developer chooses the items to configure from one checklist.
415
+
416
+ ### Configure where a project may deploy
417
+
418
+ ```bash
419
+ indraq project environments
420
+ ```
421
+
422
+ Choose one environment for a normal project, or two or more for primary/backup/replicated deployments. The first selected target is stored as `primary`, the second as `secondary`, and additional targets as `replica`. These roles describe topology; Route53 routing policy is still configured per DNS resource.
423
+
424
+ Each environment keeps its own provider-scope links, so `prod-primary` may use Jenkins/NPM instance A while `prod-backup` uses Jenkins/NPM instance B. The logical component pipeline/image name remains the same across those servers.
425
+
426
+ ---
427
+
428
+ ## Prebuild and deploy
429
+
430
+ v2.5 uses a **single setup plan** for web infrastructure. Instead of deciding resource-by-resource and repeatedly asking `Would you like to configure it now?`, the CLI asks once and reuses the answer for every selected component/environment.
431
+
432
+ ```bash
433
+ indraq prebuild
434
+ ```
435
+
436
+ Example:
437
+
438
+ ```text
439
+ What should prebuild configure?
440
+
441
+ [ ] GitHub Packages
442
+ [ ] Jenkins
443
+ [ ] AWS Route53
444
+ [ ] Nginx Proxy Manager
445
+ ```
446
+
447
+ Only selected items run. For a guided first-time setup that also includes Dockerfile generation, use:
448
+
449
+ ```bash
450
+ indraq setup
451
+ ```
452
+
453
+ ### Dockerfile reliability (v2.5)
454
+
455
+ Web deployment requires a Dockerfile for each selected component. v2.5 handles this before the expensive build/deploy work starts:
456
+
457
+ - `indraq project create` can generate missing Dockerfiles when **Dockerfile(s)** is selected.
458
+ - `indraq setup` can generate missing Dockerfiles.
459
+ - `indraq deploy` preflights all selected components first. If files are missing, it offers **one repair prompt** for all missing Dockerfiles and then continues.
460
+ - Existing Dockerfiles are preserved unless you explicitly use the Dockerfile command to replace generated files.
461
+
462
+ You can always generate one manually:
463
+
464
+ ```bash
465
+ indraq dockerfile create
466
+ ```
467
+
468
+ ### Shared environment addressing
469
+
470
+ Each shared environment stores **two IPv4 addresses**:
471
+
472
+ - **External/Public IPv4** — used for AWS Route53/DNS A records.
473
+ - **Internal/Private IPv4** — used by Nginx Proxy Manager as the upstream server address.
474
+
475
+ Create or update environments with:
476
+
477
+ ```bash
478
+ indraq environment create
479
+ indraq environment update <name>
480
+ indraq environment list
481
+ ```
482
+
483
+ Existing environments migrated from older releases may initially use the old IPv4 for both fields. Update them once if the NPM/private address differs from the public address.
484
+
485
+ ### Multi-environment deployment (v2.3+)
486
+
487
+ `indraq deploy` asks **what** should be deployed and **where** it should run.
488
+
489
+ ```bash
490
+ indraq deploy
491
+ # choose backend / user frontend / admin frontend / all components
492
+ # choose prod-primary / prod-backup / ALL configured environments
493
+
494
+ indraq deploy --env prod-primary
495
+ indraq deploy --all
496
+ ```
497
+
498
+ For `--all`, IndraQ builds each selected component **once**, pushes it **once** to GitHub Packages (`ghcr.io`), resolves the immutable image digest, and then triggers each selected environment's Jenkins pipeline sequentially with the **same tag + digest**. Multi-environment deployment refuses to continue if environments point at different images or if an immutable digest cannot be resolved.
499
+
500
+ ```text
501
+ source
502
+ ↓
503
+ build once
504
+ ↓
505
+ GitHub Packages tag + sha256 digest
506
+ ├── Jenkins / prod-primary
507
+ └── Jenkins / prod-backup
508
+ ```
509
+
510
+ If one Jenkins target fails, the rollout stops at that target instead of silently continuing.
511
+
512
+ ### Jenkins build recovery (v2.5)
513
+
514
+ Before triggering Jenkins, IndraQ records Jenkins build state (`nextBuildNumber` / last build). The build POST is sent **once**.
515
+
516
+ If Jenkins accepts the request but the CLI/reverse proxy returns a temporary timeout or `502`/`503`/`504`, IndraQ does **not** blindly submit the build again. It tries to identify and reconnect to the build Jenkins already accepted and continues streaming that build's logs.
517
+
518
+ If it cannot safely identify the accepted build, it stops with an uncertain-result message and tells the developer to check Jenkins before retrying. This prevents duplicate deployments caused by running `indraq deploy` twice.
519
+
520
+ Queue/build/log reads also use bounded retry handling for transient proxy failures.
521
+
522
+ ### GitHub Packages
523
+
524
+ User-facing screens call the container registry **GitHub Packages**. The underlying registry remains `ghcr.io` and the internal provider key remains `ghcr` for backward compatibility with existing Cloud rows and Jenkins parameters such as `GHCR_IMAGE`.
525
+
526
+ Friendly scope commands accept:
527
+
528
+ ```bash
529
+ indraq scope create github-packages
530
+ indraq scope default github-packages
531
+ ```
532
+
533
+ ### Selected infrastructure behavior
534
+
535
+ When you select an item, IndraQ runs that item without another `Would you like to configure it now?` confirmation.
536
+
537
+ - **GitHub Packages** — choose/link the GitHub Packages scope and associate component image names.
538
+ - **Jenkins** — choose/link the correct DEV/PROD Jenkins scope and create/reconcile deployment pipelines.
539
+ - **AWS Route53** — create/reconcile or link DNS when selected.
540
+ - **Nginx Proxy Manager** — create/reconcile or link reverse proxy/SSL when selected.
541
+
542
+ Route53/NPM are not forced when they are not selected. Likewise, selecting Route53/NPM does not silently add Jenkins or GitHub Packages.
543
+
544
+ For compatibility/automation, `--required-only` still means GitHub Packages + Jenkins:
545
+
546
+ ```bash
547
+ indraq prebuild --all-targets --required-only
548
+ ```
549
+
550
+ ### Nginx Proxy Manager user verification (v2.5)
551
+
552
+ When IndraQ provisions an NPM user, it now verifies that user's own credentials before reporting success:
553
+
554
+ 1. create the native NPM user,
555
+ 2. authenticate using the same **email + password** saved for that user,
556
+ 3. retry briefly for provider propagation,
557
+ 4. roll back the new NPM user if verification fails,
558
+ 5. also roll back if the Cloud credential mapping cannot be saved.
559
+
560
+ Credential resolution uses the stored NPM email first, with username fallback for older records. This fixes the repeated `401 Unauthorized` behavior seen when NPM expected the email login identity.
561
+
562
+ ---
563
+
564
+ ## What `--env` means
565
+
566
+ ```bash
567
+ indraq deploy --env dev
568
+ indraq deploy --env staging
569
+ indraq deploy --env prod
570
+ ```
571
+
572
+ The flag selects **IndraQ resource state**:
573
+
574
+ ```text
575
+ project
576
+ └── dev
577
+ ├── Jenkins scope + job
578
+ ├── GitHub Packages scope + image
579
+ ├── optional AWS/DNS resource
580
+ └── optional NPM proxy resource
581
+ ```
582
+
583
+ It does not select application files such as `.env.dev`. Your Dockerfile/build configuration remains responsible for application environment variables.
584
+
585
+ `dev`, `staging`, `qa` and other non-production names use the development Jenkins family. `prod`/`production` use the production Jenkins family.
586
+
587
+ ---
588
+
589
+ ## Jenkins access model
590
+
591
+ IndraQ requires the Jenkins **Role Strategy** authorization strategy for managed access.
592
+
593
+ Global roles provide minimal base identity permissions. **Item Roles** grant access to exact project pipelines.
594
+
595
+ Example:
596
+
597
+ ```text
598
+ Role: indraq-<user>-<scope>
599
+ Pattern: ^(?:accounting-service|accounting-worker)$
600
+
601
+ Permissions
602
+ Job/Discover ✓
603
+ Job/Read ✓
604
+ Job/Build ✓
605
+ Job/Cancel ✓
606
+ Job/Workspace ✓
607
+ Job/Configure ✗
608
+ Overall/Admin ✗
609
+ ```
610
+
611
+ ```mermaid
612
+ flowchart LR
613
+ U[Developer] --> R[Scope-specific Jenkins Item Role]
614
+ R --> A[accounting-service]
615
+ R --> B[accounting-worker]
616
+ R -. no access .-> C[unrelated-production-job]
617
+ ```
618
+
619
+ When project access changes, IndraQ rebuilds the user's Item Role from their remaining grants.
620
+
621
+ ---
622
+
623
+ ## User lifecycle
624
+
625
+ ### Create
626
+
627
+ ```text
628
+ Cloud identity
629
+ → selected AWS identities
630
+ → selected NPM identities
631
+ → selected Jenkins identities
632
+ → scope memberships
633
+ ```
634
+
635
+ If provider provisioning fails, IndraQ attempts rollback instead of leaving a half-created user.
636
+
637
+ ### Role change
638
+
639
+ Admins can promote/demote organization roles:
640
+
641
+ ```bash
642
+ indraq user update rajvir --role manager
643
+ indraq user update rajvir --role user
644
+ ```
645
+
646
+ Promotion does not silently grant MANAGE to unrelated scopes. Demotion to `user` downgrades MANAGE memberships to USE and synchronizes provider-native role state.
647
+
648
+ ### Delete
649
+
650
+ ```bash
651
+ indraq user delete rajvir
652
+ ```
653
+
654
+ Provider identities are removed first. Cloud identity is deleted last. Projects and infrastructure remain.
655
+
656
+ ---
657
+
658
+ ## Command reference
659
+
660
+ ### Built-in focused help
661
+
662
+ The CLI help is aligned with the v2.3 component/topology workflow:
663
+
664
+ ```bash
665
+ indraq help setup
666
+ indraq help project
667
+ indraq help scope
668
+ indraq help users
669
+ indraq help environment
670
+ indraq help deploy
671
+ indraq help configure
672
+ indraq help aws
673
+ ```
674
+
675
+
676
+ ### Authentication and diagnostics
677
+
678
+ | Command | Use |
679
+ |---|---|
680
+ | `indraq login` | Sign in |
681
+ | `indraq logout` | Revoke the persistent Cloud session and remove local session credentials |
682
+ | `indraq whoami` | Show current identity |
683
+ | `indraq doctor` | Diagnose Node/Java/Git/tar/PATH |
684
+ | `indraq logs` | Audit/log access where permitted |
685
+
686
+ ### Scopes
687
+
688
+ | Command | Use |
689
+ |---|---|
690
+ | `indraq scope list` | List assigned scopes |
691
+ | `indraq scope describe [nameOrId]` | Safe scope identity/details |
692
+ | `indraq scope create [provider]` | Admin creates organization scope |
693
+ | `indraq scope delete [nameOrId]` | Admin deletes unused scope |
694
+ | `indraq scope members` | List members of manageable scope |
695
+ | `indraq scope add-user` | Add/provision user |
696
+ | `indraq scope remove-user` | Remove/deprovision user |
697
+ | `indraq scope default [provider]` | Personal provider default |
698
+ | `indraq scope audit` | Scope audit trail |
699
+ | `indraq scope credentials` | Own AWS credential |
700
+ | `indraq scope rotate-key` | Rotate own AWS access key |
701
+ | `indraq scope rotate-password` | Rotate own NPM/Jenkins password |
702
+
703
+ ### Users
704
+
705
+ | Command | Use |
706
+ |---|---|
707
+ | `indraq user list` | List organization users |
708
+ | `indraq user scopes [email]` | Show your own or a manageable user's assigned scopes |
709
+ | `indraq user create [username]` | Create user + select scopes |
710
+ | `indraq user update [username]` | Password/role operations |
711
+ | `indraq user delete [username]` | Hard delete after scope cleanup |
712
+ | `indraq password reset` | Self-service Cloud password reset |
713
+
714
+ ### Projects and access
715
+
716
+ | Command | Use |
717
+ |---|---|
718
+ | `indraq init [directory]` | Initialize/link project |
719
+ | `indraq project create [name]` | Register existing project |
720
+ | `indraq project list` | List accessible projects |
721
+ | `indraq project link` | Link current folder |
722
+ | `indraq project status` | Show project resources |
723
+ | `indraq project environments` | Choose one or multiple allowed deployment environments/servers |
724
+ | `indraq project scopes --env <env>` | Select project provider scopes |
725
+ | `indraq project add user` | Add project member + synchronize access |
726
+ | `indraq project delete user` | Remove project member |
727
+ | `indraq project rename [name]` | Rename the current project |
728
+ | `indraq project archive` | Archive the current project and block normal deployment access |
729
+ | `indraq project restore` | Restore an archived project |
730
+ | `indraq project delete` | Permanently delete current project metadata |
731
+ | `indraq access add user` | Add selected resource grants |
732
+ | `indraq access delete user` | Remove selected resource grants |
733
+
734
+ ### Deploy and Jenkins
735
+
736
+ | Command | Use |
737
+ |---|---|
738
+ | `indraq prebuild --env <env>` | Reconcile infrastructure for one environment |
739
+ | `indraq prebuild --all-targets --required-only` | Reconcile required GitHub Packages/Jenkins pipelines on every configured target |
740
+ | `indraq deploy` | Choose component(s) and one/all configured project environments |
741
+ | `indraq deploy --env <env>` | Deploy one configured project environment using its saved scope bindings |
742
+ | `indraq deploy --all` | Build once per component and deploy the same immutable digest to every configured environment |
743
+ | `indraq deploy:dev` | Convenience alias if `dev`/`development` exists; otherwise opens the environment picker |
744
+ | `indraq deploy:prod` | Convenience alias if `prod`/`production` exists; otherwise opens the environment picker |
745
+ | `indraq deploy --env <env> --select-scopes` | Explicitly review/change project scope bindings before deploy |
746
+ | `indraq jenkins pipelines --stage dev` | List visible pipelines |
747
+ | `indraq jenkins build [job] --stage dev` | Select a visible pipeline, discover its Jenkins parameters, prompt for required inputs, and trigger it |
748
+ | `indraq jenkins run [job] --stage dev` | Compatibility alias for `jenkins build` |
749
+
750
+ | `indraq jenkins create-deployment` | Bootstrap deployment pipeline |
751
+
752
+ `indraq jenkins build` mirrors Jenkins parameter optional/required behavior and streams the Jenkins console live while waiting. IndraQ-generated deployment pipelines mark `IMAGE_TAG` as required for manual deploy/rollback and keep `IMAGE_DIGEST` optional.
753
+
754
+
755
+ ### AWS / DNS / NPM advanced administration
756
+
757
+ Raw organization administration commands are intentionally admin-restricted. Normal users should use scope self-service commands.
758
+
759
+ Use `indraq scope aws-zone [nameOrId]` to set or repair the default Route53 hosted zone for an AWS scope; active scope members are reconciled automatically.
760
+
761
+ ```bash
762
+ indraq iam users
763
+ indraq iam user:create alice
764
+ indraq dns zones
765
+ indraq dns records
766
+ indraq healthcheck list
767
+ indraq npm-user create
768
+ indraq proxy create api.example.com
769
+ ```
770
+
771
+ ---
772
+
773
+
774
+ ### Mobile apps and self-hosted OTA
775
+
776
+ IndraQ mobile projects support **Expo** and **React Native CLI**. During `indraq init`, choose **Mobile App** and then the project type. Admins create reusable mobile environments that define a build type, Jenkins DEV/PROD stage and OTA channel; developers select one during prebuild/build.
777
+
778
+ ```bash
779
+ indraq mobile environment list
780
+ indraq mobile environment create # ADMIN
781
+ indraq prebuild --env production
782
+ indraq build mobile:prod
783
+ ```
784
+
785
+ Mobile prebuild is intentionally isolated from the web infrastructure workflow: it reconciles **Jenkins + OTA only** and does not configure Docker, GitHub Packages, AWS, Route53 or Nginx Proxy Manager.
786
+
787
+ The OTA service is hosted by the existing Cloud API at **https://cli.indraq.com** and stores immutable JS bundles/assets in **MinIO**. Expo and React Native CLI projects use `expo-updates` against this custom IndraQ server. The generated client checks only during **cold app startup** while the splash screen is held; when an eligible update is downloaded, the app force-reloads before the user enters the normal application flow.
788
+
789
+ ```bash
790
+ indraq mobile "My App" send update
791
+ indraq mobile "My App" release update
792
+ indraq mobile "My App" pause
793
+ indraq mobile "My App" rollback
794
+ indraq mobile "My App" metrics
795
+ ```
796
+
797
+ `send update` exports one immutable release and can target a specific installation ID, user ID, username, email or phone, a percentage rollout, or everyone. A tested release can then be promoted with `release update` **without rebuilding**, so production receives the exact bundle/assets that were tested.
798
+
799
+ Every successful native Jenkins build records a native compatibility fingerprint in IndraQ Cloud. If native dependencies or native Android/iOS configuration change, OTA publication is blocked until a new compatible native binary succeeds. This keeps OTA limited to JavaScript/assets that the installed binary can safely execute.
800
+
801
+ OTA release telemetry records installations, manifest delivery, downloads, successful launches, failures and rollback events. Signing private keys stay encrypted in the Cloud backend; the mobile repository receives only the public signing certificate.
802
+
803
+ ### Audit reason behavior (v2.5)
804
+
805
+ Creation/setup operations use safe automatic audit reasons and do not repeatedly interrupt developers. Examples include project/environment/provider creation and automatic setup/prebuild links.
806
+
807
+ IndraQ asks for a reason when an operation changes or removes existing state, including user/environment updates or deletes, project rename/archive/restore/delete, access removal and credential rotation. The action is still written to the Cloud audit log either way.
808
+
809
+ ### Persistent login sessions
810
+
811
+ `indraq login` creates a persistent CLI session. The access token is refreshed automatically by the CLI, so normal users do **not** need to log in again every few hours or before each build/deployment. The session continues until `indraq logout` is run, the Cloud account is removed/disabled, or the Cloud password is reset. `indraq logout` revokes the server-side session and removes the local session credentials.
812
+
813
+ Existing v2.2.1 tokens are upgraded automatically when still valid; if an old token has already expired, one final login is required after upgrading.
814
+
815
+ ## Common workflows
816
+
817
+ ### Admin adds a new customer server
818
+
819
+ ```bash
820
+ indraq scope create aws
821
+ indraq scope create jenkins-dev
822
+ indraq scope create npm
823
+ indraq scope describe
824
+ indraq scope add-user
825
+ ```
826
+
827
+ ### Manager adds a developer to an existing scope
828
+
829
+ ```bash
830
+ indraq scope add-user
831
+ ```
832
+
833
+ The manager can choose only a scope where they already have MANAGE access and can add only a normal user.
834
+
835
+ ### Developer checks the account before deployment
836
+
837
+ ```bash
838
+ indraq scope list
839
+ indraq scope describe "AWS Client ABC"
840
+ indraq project scopes --env indraq-test-airtel
841
+ indraq prebuild --env dev
842
+ indraq deploy:dev
843
+ ```
844
+
845
+ ### Existing project already has DNS/NPM
846
+
847
+ ```bash
848
+ indraq prebuild --env dev
849
+ ```
850
+
851
+ Choose **Link existing** for the resources you want recorded in IndraQ, or **Skip** if IndraQ should not manage them.
852
+
853
+ ---
854
+
855
+ ## Security model
856
+
857
+ > [!WARNING]
858
+ > Scope descriptions are intentionally safe, but provider scope administration is privileged. Do not paste secrets, generated access keys, API tokens or temporary passwords into tickets or chat.
859
+
860
+ Key rules:
861
+
862
+ - Provider scopes are visible only to members.
863
+ - Only admins create organization credentials/scopes.
864
+ - Managers can manage only normal users inside scopes where they hold MANAGE.
865
+ - Users rotate only their own provider identities.
866
+ - Every sensitive resolve/membership operation is audited.
867
+ - Cloud deletion happens after external provider cleanup.
868
+ - Jenkins project access uses least-privilege Item Roles.
869
+ - Project definitions/infrastructure survive user deletion.
870
+
871
+ ---
872
+
873
+ ## Troubleshooting
874
+
875
+ ### Dockerfile is missing
876
+
877
+ `indraq deploy` now checks all selected components before building. If one or more Dockerfiles are missing, choose **Yes** when IndraQ offers to generate them. You can also run:
878
+
879
+ ```bash
880
+ indraq dockerfile create
881
+ ```
882
+
883
+ ### Jenkins looks stuck / deploy usually works on the second try
884
+
885
+ Do **not** immediately run deploy again. v2.5 sends the Jenkins build request once and tries to reconnect to the build Jenkins already accepted when a proxy timeout/502/503/504 occurs. If IndraQ says the result is uncertain, check Jenkins first and retry only if no build started.
886
+
887
+ ### Nginx Proxy Manager user gets repeated `401 Unauthorized`
888
+
889
+ v2.5 uses the user's stored NPM **email** as the login identity and verifies new NPM accounts during provisioning. For an older broken account, rotate/recreate that user's NPM credential and verify the email stored in NPM matches the Cloud mapping.
890
+
891
+ ### `fetch failed` while configuring NPM
892
+
893
+ IndraQ surfaces the underlying network/TLS/authentication error where possible. Verify the URL uses the correct scheme and hostname, then compare with the web login. A browser login does not necessarily prove Node.js trusts the same TLS certificate chain.
894
+
895
+ ### Jenkins says Role Strategy is not active
896
+
897
+ Go to **Manage Jenkins → Security → Authorization** and select **Role-Based Strategy**. The administrator credential stored in the Jenkins scope needs `Overall/Administer` so IndraQ can manage users/roles.
898
+
899
+ ### User cannot see a provider account
900
+
901
+ That is expected unless the user is a scope member:
902
+
903
+ ```bash
904
+ indraq scope add-user
905
+ ```
906
+
907
+ ### Deploy says Jenkins/GitHub Packages is missing
908
+
909
+ Those two are mandatory for a normal container deployment. Add the user to the required scope and link/select it:
910
+
911
+ ```bash
912
+ indraq project scopes --env indraq-test-airtel
913
+ ```
914
+
915
+ ### DNS is missing but deployment should continue
916
+
917
+ Run prebuild and choose **Skip** for Route53.
918
+
919
+ ---
920
+
921
+ ## Cloud API upgrade through v2.5
922
+
923
+ Upgrade the CLI and Cloud API together. The v2.5 package uses **Cloud API v1.1.0** because Nginx Proxy Manager credential resolution changed server-side.
924
+
925
+ Apply SQL migrations in order through the mobile/OTA migration:
926
+
927
+ ```text
928
+ cloud-api/sql/001_init.sql
929
+ ...
930
+ cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql
931
+ cloud-api/sql/010_persistent_auth_sessions.sql
932
+ cloud-api/sql/011_environment_internal_ipv4.sql
933
+ cloud-api/sql/012_mobile_ota.sql
934
+ ```
935
+
936
+ - `010` — persistent CLI sessions.
937
+ - `011` — separate external/public IPv4 (Route53) from internal/private IPv4 (NPM).
938
+ - `012` — mobile environments, OTA apps/releases/assets/installations/events.
939
+
940
+ v2.5 itself adds **no new database migration**. It changes setup/deployment behavior and Cloud-side NPM credential resolution.
941
+
942
+ v2.6 requires **Cloud API v1.2.0** for selective project cleanup and mobile-backend OTA registration, with no new SQL migration.
943
+
944
+ For OTA, configure MinIO in `cloud-api/.env` using the values documented in `.env.example`. The OTA API remains on the existing Cloud backend at **https://cli.indraq.com**.
945
+
946
+ ---
947
+
948
+ ## Development and release
949
+
950
+ ```bash
951
+ npm install
952
+ npm run build
953
+ npm test
954
+ npm publish --dry-run
955
+ ```
956
+
957
+ Cloud API:
958
+
959
+ ```bash
960
+ npm --prefix cloud-api install
961
+ npm --prefix cloud-api run build
962
+ ```
963
+
964
+ ---
965
+
966
+ ## v2.5 highlights
967
+
968
+ - One setup checklist instead of repeated per-resource confirmation prompts.
969
+ - Missing Dockerfiles can be generated during project creation/setup/deploy preflight.
970
+ - Jenkins lost-response recovery prevents accidental duplicate deploy submissions.
971
+ - NPM users are verified with their stored email/password and bad provisioning is rolled back.
972
+ - User-facing `GHCR` wording is now **GitHub Packages**; internal compatibility remains unchanged.
973
+ - Creation/setup audit reasons are automatic; modify/delete operations ask for a reason.
974
+ - Existing v2.3 multi-server deployment and v2.4 mobile/OTA behavior remains compatible.
975
+
976
+ ---
977
+
978
+ <div align="center">
979
+ <img src="docs/assets/indraq-mark.png" alt="IndraQ mark" width="70" />
980
+
981
+ **IndraQ CLI v2.6.0**
982
+
983
+ Scope-based infrastructure access. Durable projects. Safer deployments.
984
+ </div>
985
+
986
+
987
+ ---
988
+
989
+ ## v2.6.0 — Backend + Mobile App projects
990
+
991
+ When creating a project, choose **Backend + Mobile App**. Use distinct
992
+ `backend/` and `mobile/` folders. A single IndraQ Cloud project tracks the
993
+ backend's Docker/Jenkins/GitHub Packages/Route53/NPM resources and the mobile
994
+ app's native Jenkins builds and OTA configuration. `indraq setup` configures
995
+ both (mobile stage once); `indraq deploy` deploys the backend; and
996
+ `indraq build mobile:prod` builds the mobile component.
997
+
998
+ ## v2.6.0 — Selective external cleanup during project deletion
999
+
1000
+ Run `indraq project delete`. The CLI inventories associated external resources
1001
+ and lets you individually select what to **DELETE** and what to **KEEP**:
1002
+
1003
+ - AWS Route53 A record sets
1004
+ - GitHub Packages container packages (deletion removes **all tags**)
1005
+ - Jenkins **project deployment** pipelines
1006
+ - Nginx Proxy Manager proxy hosts
1007
+
1008
+ Everything is **unchecked by default**. Shared resources are protected.
1009
+ The shared mobile Jenkins pipeline is never deleted automatically. Resources
1010
+ linked from outside IndraQ are flagged, and deleting any of them needs an
1011
+ additional confirmation. If any selected external deletion fails, the Cloud
1012
+ project is **retained** so that cleanup can be retried. AWS health checks, NPM
1013
+ SSL certificates, deployed containers, and local source files are not removed.
1014
+ `--yes` never auto-selects external resources.
1015
+
1016
+ ## v2.6.0 — Windows OTA signing
1017
+
1018
+ Expo's `codesigning:generate` is invoked with an argument-preserving
1019
+ Node-based `npx` launcher on Windows, fixing paths inadvertently formed from
1020
+ certificate common names that contain spaces. Temporary signing keys are
1021
+ removed even when generation fails.