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
package/README.md CHANGED
@@ -1,889 +1,706 @@
1
- <div align="center">
2
- <img src="docs/assets/indraq-logo.png" alt="IndraQ" width="360" />
1
+ # IndraQ CLI v2.6.0
3
2
 
4
- # IndraQ CLI
3
+ IndraQ CLI helps our team set up, build and deploy web and mobile apps.
5
4
 
6
- **One CLI for provider access, project infrastructure and deployments.**
7
-
8
- ![version](https://img.shields.io/badge/version-2.4.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>
5
+ This guide uses simple steps. Start with the **Developer quick start**.
15
6
 
16
7
  ---
17
8
 
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.
9
+ # Developer quick start — Web
21
10
 
22
- Instead of configuring “one AWS”, “one Jenkins”, or “one NPM” globally, IndraQ uses **provider scopes** as the normal deployment credential path. v2.3 adds a component-first project model, explicit single/multi-environment topology, and build-once immutable multi-server deployment. A scope is one named account or server such as:
11
+ ## 1. Login once
23
12
 
24
- - `AWS — IndraQ Production`
25
- - `AWS — Client ABC`
26
- - `Jenkins DEV — India`
27
- - `Jenkins PROD — Production`
28
- - `NPM — Main Reverse Proxy`
29
- - `GHCR — IndraQ`
13
+ ```powershell
14
+ indraq login
15
+ ```
30
16
 
31
- Admins create scopes once. Managers assign users inside scopes they manage. Users see and use only scopes assigned to them.
17
+ Check your login:
32
18
 
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[GHCR]
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]
19
+ ```powershell
20
+ indraq whoami
47
21
  ```
48
22
 
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.
23
+ Your login stays saved. You do not need to login before every build or deploy.
51
24
 
52
- ---
53
-
54
- ## Why scopes?
25
+ Revoke the persistent Cloud session when you want to sign out.
55
26
 
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.
27
+ To logout and revoke the persistent Cloud session:
57
28
 
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 |
29
+ ```powershell
30
+ indraq logout
31
+ ```
68
32
 
69
33
  ---
70
34
 
71
- ## Core concepts
72
-
73
- ### Provider scope
35
+ ## 2. Open your project folder
74
36
 
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
37
+ ```powershell
38
+ cd C:\Projects\my-app
39
+ ```
78
40
 
79
- A relationship between a person and a scope:
41
+ If the project is not in IndraQ yet:
80
42
 
81
- - `USE` — consume the scope and self-manage only your own credentials.
82
- - `MANAGE` — add/remove normal users and manage membership in that scope.
43
+ ```powershell
44
+ indraq project create
45
+ ```
83
46
 
84
- ### Project
47
+ Choose your project type:
85
48
 
86
- A durable application definition. Deleting a developer does **not** delete the project, Jenkins jobs, DNS, proxy configuration or image associations.
49
+ ```text
50
+ Frontend
51
+ Backend
52
+ Frontend + Backend
53
+ User Frontend + Admin Frontend + Backend
54
+ Mobile App
55
+ ```
87
56
 
88
- ### Components (v2.3)
57
+ For web projects, choose the server/environment where the app will run.
89
58
 
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.
59
+ Then IndraQ shows **one setup list**:
91
60
 
92
61
  ```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
- ```
62
+ What do you want to configure for this project now?
98
63
 
99
- Components answer **what gets built**. Deployment environments answer **where it runs**. These are deliberately separate concepts.
64
+ [x] Dockerfile(s)
65
+ [x] GitHub Packages
66
+ [x] Jenkins
67
+ [ ] AWS Route53
68
+ [ ] Nginx Proxy Manager
69
+ ```
100
70
 
101
- ### Deployment topology (v2.3)
71
+ Select what you want. IndraQ only starts the items you selected.
102
72
 
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.
73
+ It does not keep asking:
104
74
 
105
75
  ```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
76
+ Would you like to configure it now?
111
77
  ```
112
78
 
113
- Use `indraq project environments` to change the allowed deployment servers later.
114
-
115
- ### Environment
79
+ for every item.
116
80
 
117
- An IndraQ deployment/resource environment such as `dev`, `staging` or `prod`.
81
+ ### What the setup items mean
118
82
 
119
- > [!IMPORTANT]
120
- > `--env dev` selects the **IndraQ project/resource environment**. It does **not** load `.env.dev`, `.env`, or any application environment file.
83
+ | Option | What it does |
84
+ |---|---|
85
+ | Dockerfile(s) | Creates missing Docker files |
86
+ | GitHub Packages | Stores your Docker image at `ghcr.io` |
87
+ | Jenkins | Creates/repairs the Jenkins deploy pipeline |
88
+ | AWS Route53 | Creates/repairs DNS records |
89
+ | Nginx Proxy Manager | Creates/repairs the reverse proxy and SSL |
121
90
 
122
- ---
91
+ For a new Jenkins deployment, select **GitHub Packages + Jenkins** together.
123
92
 
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
- All membership changes require an audit reason and are written to the Cloud audit log.
93
+ Route53 and Nginx Proxy Manager run only when you select them.
154
94
 
155
95
  ---
156
96
 
157
- ## Quick start
97
+ ## 3. Deploy
158
98
 
159
- ### 1. Install
160
-
161
- ```bash
162
- npm install -g indraq_cli
163
- indraq --version
164
- # or
165
- indraq -V
99
+ ```powershell
100
+ indraq deploy
166
101
  ```
167
102
 
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.
103
+ For a project with more than one part, choose what you want to deploy:
171
104
 
172
- ### 2. Guided setup (recommended)
105
+ ```text
106
+ All components
107
+ Frontend
108
+ Backend
109
+ Admin frontend
110
+ ```
173
111
 
174
- For a new machine/project, the shortest path is:
112
+ Enter an image tag, for example:
175
113
 
176
- ```bash
177
- indraq setup
114
+ ```text
115
+ latest
178
116
  ```
179
117
 
180
- The wizard signs in if needed, registers the current folder, can create the first shared environment (admin), asks whether the project uses one or multiple servers, and can reconcile required GHCR/Jenkins infrastructure. Optional Route53/NPM setup remains optional.
181
-
182
- Or run the individual commands manually:
118
+ or:
183
119
 
184
- ```bash
185
- indraq login
186
- indraq whoami
120
+ ```text
121
+ 1.2.0
187
122
  ```
188
123
 
189
- ### 3. Admin creates organization scopes
124
+ IndraQ will:
190
125
 
191
- ```bash
192
- indraq scope create aws
193
- indraq scope create jenkins-dev
194
- indraq scope create npm
195
- indraq scope create ghcr
196
- ```
126
+ 1. Check the project setup.
127
+ 2. Check Dockerfiles.
128
+ 3. Build the Docker image.
129
+ 4. Push the image to GitHub Packages.
130
+ 5. Start the Jenkins build.
131
+ 6. Show the Jenkins logs in the terminal.
132
+ 7. Wait for Jenkins to finish.
197
133
 
198
- You can create as many as required.
134
+ ### If Dockerfile is missing
199
135
 
200
- ### 4. Verify what a scope represents
136
+ You do not need to stop and create it manually.
201
137
 
202
- ```bash
203
- indraq scope list
204
- indraq scope describe "AWS Production"
205
- ```
138
+ `indraq deploy` checks all selected components first.
206
139
 
207
- Example safe output:
140
+ If a Dockerfile is missing, it asks once:
208
141
 
209
142
  ```text
210
- provider AWS
211
- name Production
212
- company IndraQ
213
- account 123456789012
214
- region ap-south-1
215
- username indraq-admin
216
- access use
217
- default yes
218
- credentials stored securely (secret hidden)
143
+ Generate the missing Dockerfile(s) now? Yes
219
144
  ```
220
145
 
221
- `describe` never prints passwords, tokens, AWS secret keys or GHCR tokens.
146
+ Then deploy continues.
222
147
 
223
- ### 5. Create a user and choose scopes
148
+ ---
224
149
 
225
- ```bash
226
- indraq user create
227
- ```
150
+ # Easy guided setup
228
151
 
229
- The admin/manager sees only scopes they can manage and can select multiple:
152
+ If you are not sure which command to use, run:
230
153
 
231
- ```text
232
- [✓] AWS — Production
233
- [ ] AWS — Client ABC
234
- [✓] Jenkins DEV — India
235
- [✓] NPM — Main
236
- [✓] GHCR — IndraQ
154
+ ```powershell
155
+ indraq setup
237
156
  ```
238
157
 
239
- Native AWS/NPM/Jenkins identities are created only in selected scopes.
158
+ IndraQ will guide you through:
240
159
 
241
- ### 6. Link a project
160
+ 1. Login.
161
+ 2. Project create/link.
162
+ 3. Environment selection.
163
+ 4. One setup list.
164
+ 5. Only the items you select.
242
165
 
243
- Register an existing application folder without scaffolding source code or running `npm install`:
166
+ Use this command for first-time setup or repair.
244
167
 
245
- ```bash
246
- indraq project create cloud-api --kind backend --framework express --port 4010 --health /health
247
- # or link this folder to an already registered project
248
- indraq project link
249
- ```
168
+ ---
250
169
 
251
- `indraq project create` does **not** scaffold source code, run `npm install`, generate Docker files, or create cloud infrastructure. It only registers the existing folder and writes the local `.indraq/project.json` reference.
170
+ # Prebuild
252
171
 
253
- ### 7. Choose project provider defaults
172
+ Use prebuild when you want to add or repair project services:
254
173
 
255
- ```bash
256
- indraq project scopes --env indraq-test-airtel
174
+ ```powershell
175
+ indraq prebuild
257
176
  ```
258
177
 
259
- A project may use a different scope than your personal default.
178
+ You get one list:
260
179
 
261
- ### 8. Reconcile infrastructure
180
+ ```text
181
+ What should prebuild configure?
262
182
 
263
- ```bash
264
- indraq prebuild
265
- # choose one of the shared environments shown by the CLI
183
+ [ ] GitHub Packages
184
+ [ ] Jenkins
185
+ [ ] AWS Route53
186
+ [ ] Nginx Proxy Manager
266
187
  ```
267
188
 
268
- ### 9. Deploy
189
+ Only selected items run.
269
190
 
270
- ```bash
271
- indraq deploy
272
- # choose one of the shared environments shown by the CLI
273
- # or deploy directly:
274
- indraq deploy --env indraq-test-airtel
275
- ```
191
+ For one environment:
276
192
 
277
- 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:
278
-
279
- ```bash
280
- indraq deploy --env indraq-test-airtel --select-scopes
193
+ ```powershell
194
+ indraq prebuild --env production
281
195
  ```
282
196
 
283
- ---
197
+ For all project environments:
284
198
 
285
- ## Provider scopes
199
+ ```powershell
200
+ indraq prebuild --all-targets
201
+ ```
286
202
 
287
- ### Smart scope selection
203
+ GitHub Packages + Jenkins only:
288
204
 
289
- 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.
205
+ ```powershell
206
+ indraq prebuild --required-only
207
+ ```
290
208
 
291
- ### Unlimited named scopes
209
+ ---
292
210
 
293
- ```text
294
- AWS Production ★
295
- AWS Development
296
- AWS Client ABC
211
+ # Multiple servers
297
212
 
298
- Jenkins DEV India ★
299
- Jenkins DEV Client ABC
213
+ A project can run on more than one server.
300
214
 
301
- NPM Main ★
302
- NPM Europe
215
+ Choose the servers:
303
216
 
304
- GHCR IndraQ ★
217
+ ```powershell
218
+ indraq project environments
305
219
  ```
306
220
 
307
- A star is conceptually the current user's default for that provider type. Defaults are per user.
221
+ Example:
308
222
 
309
- ```bash
310
- indraq scope default aws
311
- indraq scope default npm
312
- indraq scope default jenkins-dev
313
- indraq scope default ghcr
223
+ ```text
224
+ prod-primary
225
+ prod-backup
314
226
  ```
315
227
 
316
- ### Add an existing user to a scope
228
+ Deploy one server:
317
229
 
318
- ```bash
319
- indraq scope add-user
230
+ ```powershell
231
+ indraq deploy --env prod-primary
320
232
  ```
321
233
 
322
- This performs both sides of the operation:
234
+ Deploy all configured servers:
323
235
 
324
- ```mermaid
325
- sequenceDiagram
326
- participant M as Admin / Manager
327
- participant C as IndraQ Cloud
328
- participant P as Provider
329
- M->>C: Add user to scope + reason
330
- C-->>M: Authorization check
331
- M->>P: Provision native identity via scope admin credential
332
- P-->>M: Native identity created
333
- M->>C: Save scope membership + native mapping
334
- C-->>M: Audited success
236
+ ```powershell
237
+ indraq deploy --all
335
238
  ```
336
239
 
337
- ### Remove a user
240
+ IndraQ builds the image once and sends the **same exact image** to every selected Jenkins server.
338
241
 
339
- ```bash
340
- indraq scope remove-user
341
- ```
242
+ ---
342
243
 
343
- The provider-native identity is removed first. Cloud membership is removed after successful provider cleanup.
244
+ # Jenkins build reliability
344
245
 
345
- ### Audit a scope
246
+ IndraQ v2.5.0 is safer when Jenkins or the reverse proxy is slow.
346
247
 
347
- ```bash
348
- indraq scope audit
349
- ```
248
+ If Jenkins accepts the deploy request but the CLI temporarily gets a timeout or 502, IndraQ does **not** automatically send the same deploy again.
350
249
 
351
- You can review who added/removed users, changed access, resolved credentials or rotated managed values and why.
250
+ It tries to find the Jenkins build that was already started and continues following that build.
352
251
 
353
- ---
252
+ If IndraQ cannot safely find the build, it tells you to check Jenkins before retrying. This avoids duplicate deployments.
354
253
 
355
- ## Personal credential self-service
254
+ ---
356
255
 
357
- Users do not administer organization scopes, but they can manage their own identities inside assigned scopes.
256
+ # GitHub Packages
358
257
 
359
- ### AWS
258
+ The CLI now shows the name:
360
259
 
361
- ```bash
362
- indraq scope credentials
363
- indraq scope rotate-key
260
+ ```text
261
+ GitHub Packages
364
262
  ```
365
263
 
366
- If several AWS scopes are assigned, IndraQ asks which account to use.
264
+ Internally the Docker registry is still:
367
265
 
368
- ### NPM / Jenkins
369
-
370
- ```bash
371
- indraq scope rotate-password
266
+ ```text
267
+ ghcr.io
372
268
  ```
373
269
 
374
- The selected NPM/Jenkins scope is updated without exposing the organization administrator password/token.
270
+ Developers do not need to remember the name `GHCR`.
375
271
 
376
272
  ---
377
273
 
378
- ## Projects and environments
274
+ # Web environment IPs
379
275
 
380
- A project can bind scopes by environment:
276
+ Admins create web environments with two IPs:
381
277
 
382
- ```mermaid
383
- flowchart LR
384
- P[Project: accounting] --> D[dev]
385
- P --> R[prod]
386
- D --> JD[Jenkins DEV India]
387
- D --> GD[GHCR IndraQ]
388
- D --> AD[AWS Development]
389
- R --> JP[Jenkins PROD]
390
- R --> GP[GHCR IndraQ]
391
- R --> AP[AWS Production]
392
- R --> NP[NPM Production]
393
- ```
394
-
395
- Use:
396
-
397
- ```bash
398
- indraq project scopes --env indraq-test-airtel
399
- indraq project scopes --env prod
278
+ ```text
279
+ External/Public IPv4
280
+ Internal/Private IPv4
400
281
  ```
401
282
 
402
- **Jenkins and GHCR are required** for deployment. AWS and NPM scope links are optional because not every project needs IndraQ-managed DNS or reverse proxy.
403
-
404
- ### Configure where a project may deploy
283
+ They are used like this:
405
284
 
406
- ```bash
407
- indraq project environments
285
+ ```text
286
+ AWS Route53 -> External/Public IPv4
287
+ Nginx Proxy Manager -> Internal/Private IPv4
408
288
  ```
409
289
 
410
- 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.
411
-
412
- 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.
290
+ Developers normally only select the environment name.
413
291
 
414
292
  ---
415
293
 
416
- ## Prebuild and deploy
294
+ # Audit reasons
417
295
 
296
+ Normal creation/setup should stay quick.
418
297
 
419
- ### Shared environment addressing
298
+ IndraQ does **not** ask for an audit reason when creating or setting up new items such as:
420
299
 
421
- Each shared environment stores **two IPv4 addresses**:
300
+ - project creation
301
+ - environment creation
302
+ - provider scope creation
303
+ - mobile environment creation
304
+ - automatic setup/prebuild links
422
305
 
423
- - **External/Public IPv4** — used for AWS Route53/DNS A records.
424
- - **Internal/Private IPv4** — used by Nginx Proxy Manager as the upstream server address.
306
+ IndraQ writes a safe automatic reason for those actions.
425
307
 
426
- Create or update environments with:
308
+ IndraQ asks for a reason when you change or delete existing data, for example:
427
309
 
428
- ```bash
429
- indraq environment create
430
- indraq environment update <name>
431
- indraq environment list
432
- ```
310
+ - update/delete an environment
311
+ - update/delete a user
312
+ - rename/delete a project
313
+ - archive/restore a project
314
+ - remove access
315
+ - rotate credentials
433
316
 
434
- Existing environments migrated from v2.2.4 initially use the old IPv4 for both fields. Update them once if the NPM/private address is different from the public address.
317
+ ---
435
318
 
436
- ### Multi-environment deployment (v2.3)
319
+ # Mobile quick start
437
320
 
438
- `indraq deploy` asks **what** should be deployed and **where** it should run.
321
+ IndraQ supports:
439
322
 
440
- ```bash
441
- indraq deploy
442
- # choose backend / user frontend / admin frontend / all components
443
- # choose prod-primary / prod-backup / ALL configured environments
323
+ - Expo
324
+ - React Native CLI
444
325
 
445
- indraq deploy --env prod-primary
446
- indraq deploy --all
326
+ Create a new mobile project:
327
+
328
+ ```powershell
329
+ indraq init
447
330
  ```
448
331
 
449
- For `--all`, IndraQ builds each selected component **once**, pushes it **once**, resolves the immutable GHCR 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 GHCR images or if the immutable digest cannot be resolved.
332
+ Choose:
450
333
 
451
334
  ```text
452
- source
453
- ↓
454
- build once
455
- ↓
456
- GHCR tag + sha256 digest
457
- ├── Jenkins / prod-primary
458
- └── Jenkins / prod-backup
335
+ Mobile App
459
336
  ```
460
337
 
461
- If one Jenkins target fails, the rollout stops at that target instead of silently continuing. Reconcile required pipelines on every configured target with:
338
+ Then choose:
462
339
 
463
- ```bash
464
- indraq prebuild --all-targets --required-only
340
+ ```text
341
+ Expo
465
342
  ```
466
343
 
467
- `prebuild` reconciles the project before deployment. It uses an admin-defined shared environment and saved project scope bindings; it does not offer a project-local custom IPv4 fallback.
344
+ or:
468
345
 
469
- ```mermaid
470
- flowchart TD
471
- Start[indraq prebuild --env dev] --> G{GHCR scope?}
472
- G -->|No| Stop1[Stop: required]
473
- G -->|Yes| J{Jenkins scope?}
474
- J -->|No| Stop2[Stop: required]
475
- J -->|Yes| Job[Reconcile Jenkins deployment]
476
- Job --> DNS{Route53?}
477
- DNS -->|Skip| NPM
478
- DNS -->|Create| DNSC[Create / reconcile]
479
- DNS -->|Link existing| DNSL[Link without modifying]
480
- DNSC --> NPM{NPM?}
481
- DNSL --> NPM
482
- NPM -->|Skip| Ready[Ready]
483
- NPM -->|Create| NPC[Create / reconcile proxy]
484
- NPM -->|Link existing| NPL[Link existing proxy]
485
- NPC --> Ready
486
- NPL --> Ready
346
+ ```text
347
+ React Native CLI
487
348
  ```
488
349
 
489
- ### Required
490
-
491
- - GHCR image association
492
- - Jenkins deployment/pipeline association
350
+ For an existing mobile project:
493
351
 
494
- ### Optional Route53
352
+ ```powershell
353
+ indraq project create
354
+ ```
495
355
 
496
- - **Skip** — deploy without IndraQ-managed DNS.
497
- - **Create / reconcile** — create or repair a managed Route53 record.
498
- - **Link existing** — select an existing record and record the association without modifying it.
356
+ and select **Mobile App**.
499
357
 
500
- ### Optional NPM
358
+ ---
501
359
 
502
- - **Skip** — deploy without IndraQ-managed reverse proxy.
503
- - **Create / reconcile** — create or repair an NPM proxy host.
504
- - **Link existing** — select an existing proxy and associate it without modifying it.
360
+ # Mobile prebuild
505
361
 
506
- This is useful for projects that existed before IndraQ or where DNS/proxy is managed elsewhere.
362
+ Inside the mobile project:
507
363
 
508
- ---
364
+ ```powershell
365
+ indraq prebuild
366
+ ```
509
367
 
510
- ## What `--env` means
368
+ or:
511
369
 
512
- ```bash
513
- indraq deploy --env dev
514
- indraq deploy --env staging
515
- indraq deploy --env prod
370
+ ```powershell
371
+ indraq mobile prebuild
516
372
  ```
517
373
 
518
- The flag selects **IndraQ resource state**:
374
+ Mobile prebuild configures only:
519
375
 
520
- ```text
521
- project
522
- └── dev
523
- ├── Jenkins scope + job
524
- ├── GHCR scope + image
525
- ├── optional AWS/DNS resource
526
- └── optional NPM proxy resource
527
- ```
376
+ - Jenkins
377
+ - IndraQ OTA
528
378
 
529
- It does not select application files such as `.env.dev`. Your Dockerfile/build configuration remains responsible for application environment variables.
379
+ It does not configure:
530
380
 
531
- `dev`, `staging`, `qa` and other non-production names use the development Jenkins family. `prod`/`production` use the production Jenkins family.
381
+ - Docker
382
+ - GitHub Packages
383
+ - AWS
384
+ - Route53
385
+ - Nginx Proxy Manager
532
386
 
533
387
  ---
534
388
 
535
- ## Jenkins access model
536
-
537
- IndraQ requires the Jenkins **Role Strategy** authorization strategy for managed access.
389
+ # Mobile builds
538
390
 
539
- Global roles provide minimal base identity permissions. **Item Roles** grant access to exact project pipelines.
391
+ Development:
540
392
 
541
- Example:
393
+ ```powershell
394
+ indraq build mobile:dev
395
+ ```
542
396
 
543
- ```text
544
- Role: indraq-<user>-<scope>
545
- Pattern: ^(?:accounting-service|accounting-worker)$
397
+ Staging:
546
398
 
547
- Permissions
548
- Job/Discover ✓
549
- Job/Read ✓
550
- Job/Build ✓
551
- Job/Cancel ✓
552
- Job/Workspace ✓
553
- Job/Configure ✗
554
- Overall/Admin ✗
399
+ ```powershell
400
+ indraq build mobile:staging
555
401
  ```
556
402
 
557
- ```mermaid
558
- flowchart LR
559
- U[Developer] --> R[Scope-specific Jenkins Item Role]
560
- R --> A[accounting-service]
561
- R --> B[accounting-worker]
562
- R -. no access .-> C[unrelated-production-job]
403
+ Production:
404
+
405
+ ```powershell
406
+ indraq build mobile:prod
563
407
  ```
564
408
 
565
- When project access changes, IndraQ rebuilds the user's Item Role from their remaining grants.
409
+ A successful native Jenkins build saves the app's native fingerprint in IndraQ Cloud. OTA is allowed only when the current app is compatible with that native build.
566
410
 
567
411
  ---
568
412
 
569
- ## User lifecycle
413
+ # OTA updates
414
+
415
+ OTA sends JavaScript and asset changes without publishing a new store build when native code did not change.
570
416
 
571
- ### Create
417
+ Backend:
572
418
 
573
419
  ```text
574
- Cloud identity
575
- → selected AWS identities
576
- → selected NPM identities
577
- → selected Jenkins identities
578
- → scope memberships
420
+ https://cli.indraq.com
579
421
  ```
580
422
 
581
- If provider provisioning fails, IndraQ attempts rollback instead of leaving a half-created user.
423
+ OTA files are stored in MinIO.
582
424
 
583
- ### Role change
425
+ ## Send a test update
584
426
 
585
- Admins can promote/demote organization roles:
586
-
587
- ```bash
588
- indraq user update rajvir --role manager
589
- indraq user update rajvir --role user
427
+ ```powershell
428
+ indraq mobile send update --app "My App" --env production
590
429
  ```
591
430
 
592
- Promotion does not silently grant MANAGE to unrelated scopes. Demotion to `user` downgrades MANAGE memberships to USE and synchronizes provider-native role state.
431
+ You can target:
593
432
 
594
- ### Delete
433
+ - installation ID
434
+ - user ID
435
+ - username
436
+ - email
437
+ - phone
438
+ - percentage of users
439
+ - everyone
595
440
 
596
- ```bash
597
- indraq user delete rajvir
598
- ```
441
+ The app checks for an OTA update when the app starts. If an update is found, it downloads it and reloads before the user starts normal work.
599
442
 
600
- Provider identities are removed first. Cloud identity is deleted last. Projects and infrastructure remain.
443
+ ## Release the same tested update to everyone
601
444
 
602
- ---
445
+ ```powershell
446
+ indraq mobile release update --app "My App"
447
+ ```
603
448
 
604
- ## Command reference
449
+ IndraQ does not rebuild the bundle. It releases the same bundle you already tested.
605
450
 
606
- ### Built-in focused help
451
+ ## Metrics
607
452
 
608
- The CLI help is aligned with the v2.3 component/topology workflow:
453
+ ```powershell
454
+ indraq mobile metrics --app "My App"
455
+ ```
609
456
 
610
- ```bash
611
- indraq help setup
612
- indraq help project
613
- indraq help scope
614
- indraq help users
615
- indraq help environment
616
- indraq help deploy
617
- indraq help configure
618
- indraq help aws
457
+ ## Pause an update
458
+
459
+ ```powershell
460
+ indraq mobile pause --app "My App"
619
461
  ```
620
462
 
463
+ ## Roll back
621
464
 
622
- ### Authentication and diagnostics
465
+ ```powershell
466
+ indraq mobile rollback --app "My App"
467
+ ```
623
468
 
624
- | Command | Use |
625
- |---|---|
626
- | `indraq login` | Sign in |
627
- | `indraq logout` | Revoke the persistent Cloud session and remove local session credentials |
628
- | `indraq whoami` | Show current identity |
629
- | `indraq doctor` | Diagnose Node/Java/Git/tar/PATH |
630
- | `indraq logs` | Audit/log access where permitted |
469
+ ---
631
470
 
632
- ### Scopes
471
+ # Admin commands
633
472
 
634
- | Command | Use |
635
- |---|---|
636
- | `indraq scope list` | List assigned scopes |
637
- | `indraq scope describe [nameOrId]` | Safe scope identity/details |
638
- | `indraq scope create [provider]` | Admin creates organization scope |
639
- | `indraq scope delete [nameOrId]` | Admin deletes unused scope |
640
- | `indraq scope members` | List members of manageable scope |
641
- | `indraq scope add-user` | Add/provision user |
642
- | `indraq scope remove-user` | Remove/deprovision user |
643
- | `indraq scope default [provider]` | Personal provider default |
644
- | `indraq scope audit` | Scope audit trail |
645
- | `indraq scope credentials` | Own AWS credential |
646
- | `indraq scope rotate-key` | Rotate own AWS access key |
647
- | `indraq scope rotate-password` | Rotate own NPM/Jenkins password |
648
-
649
- ### Users
650
-
651
- | Command | Use |
652
- |---|---|
653
- | `indraq user list` | List organization users |
654
- | `indraq user scopes [email]` | Show your own or a manageable user's assigned scopes |
655
- | `indraq user create [username]` | Create user + select scopes |
656
- | `indraq user update [username]` | Password/role operations |
657
- | `indraq user delete [username]` | Hard delete after scope cleanup |
658
- | `indraq password reset` | Self-service Cloud password reset |
473
+ Developers normally do not need this section.
659
474
 
660
- ### Projects and access
475
+ ## Web environments
661
476
 
662
- | Command | Use |
663
- |---|---|
664
- | `indraq init [directory]` | Initialize/link project |
665
- | `indraq project create [name]` | Register existing project |
666
- | `indraq project list` | List accessible projects |
667
- | `indraq project link` | Link current folder |
668
- | `indraq project status` | Show project resources |
669
- | `indraq project environments` | Choose one or multiple allowed deployment environments/servers |
670
- | `indraq project scopes --env <env>` | Select project provider scopes |
671
- | `indraq project add user` | Add project member + synchronize access |
672
- | `indraq project delete user` | Remove project member |
673
- | `indraq project rename [name]` | Rename the current project |
674
- | `indraq project archive` | Archive the current project and block normal deployment access |
675
- | `indraq project restore` | Restore an archived project |
676
- | `indraq project delete` | Permanently delete current project metadata |
677
- | `indraq access add user` | Add selected resource grants |
678
- | `indraq access delete user` | Remove selected resource grants |
679
-
680
- ### Deploy and Jenkins
681
-
682
- | Command | Use |
683
- |---|---|
684
- | `indraq prebuild --env <env>` | Reconcile infrastructure for one environment |
685
- | `indraq prebuild --all-targets --required-only` | Reconcile required GHCR/Jenkins pipelines on every configured target |
686
- | `indraq deploy` | Choose component(s) and one/all configured project environments |
687
- | `indraq deploy --env <env>` | Deploy one configured project environment using its saved scope bindings |
688
- | `indraq deploy --all` | Build once per component and deploy the same immutable digest to every configured environment |
689
- | `indraq deploy:dev` | Convenience alias if `dev`/`development` exists; otherwise opens the environment picker |
690
- | `indraq deploy:prod` | Convenience alias if `prod`/`production` exists; otherwise opens the environment picker |
691
- | `indraq deploy --env <env> --select-scopes` | Explicitly review/change project scope bindings before deploy |
692
- | `indraq jenkins pipelines --stage dev` | List visible pipelines |
693
- | `indraq jenkins build [job] --stage dev` | Select a visible pipeline, discover its Jenkins parameters, prompt for required inputs, and trigger it |
694
- | `indraq jenkins run [job] --stage dev` | Compatibility alias for `jenkins build` |
477
+ Create:
695
478
 
696
- | `indraq jenkins create-deployment` | Bootstrap deployment pipeline |
479
+ ```powershell
480
+ indraq environment create
481
+ ```
697
482
 
698
- `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.
483
+ List:
699
484
 
485
+ ```powershell
486
+ indraq environment list
487
+ ```
700
488
 
701
- ### AWS / DNS / NPM advanced administration
489
+ Update:
702
490
 
703
- Raw organization administration commands are intentionally admin-restricted. Normal users should use scope self-service commands.
491
+ ```powershell
492
+ indraq environment update <name>
493
+ ```
704
494
 
705
- 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.
495
+ Delete:
706
496
 
707
- ```bash
708
- indraq iam users
709
- indraq iam user:create alice
710
- indraq dns zones
711
- indraq dns records
712
- indraq healthcheck list
713
- indraq npm-user create
714
- indraq proxy create api.example.com
497
+ ```powershell
498
+ indraq environment delete <name>
715
499
  ```
716
500
 
717
- ---
501
+ ## Mobile environments
718
502
 
503
+ Create:
719
504
 
720
- ### Mobile apps and self-hosted OTA
505
+ ```powershell
506
+ indraq mobile environment create
507
+ ```
721
508
 
722
- 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.
509
+ List:
723
510
 
724
- ```bash
511
+ ```powershell
725
512
  indraq mobile environment list
726
- indraq mobile environment create # ADMIN
727
- indraq prebuild --env production
728
- indraq build mobile:prod
729
513
  ```
730
514
 
731
- Mobile prebuild is intentionally isolated from the web infrastructure workflow: it reconciles **Jenkins + OTA only** and does not configure Docker, GHCR, AWS, Route53 or Nginx Proxy Manager.
515
+ ## Provider connections
732
516
 
733
- 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.
517
+ Create a provider connection:
734
518
 
735
- ```bash
736
- indraq mobile "My App" send update
737
- indraq mobile "My App" release update
738
- indraq mobile "My App" pause
739
- indraq mobile "My App" rollback
740
- indraq mobile "My App" metrics
519
+ ```powershell
520
+ indraq scope create
741
521
  ```
742
522
 
743
- `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.
523
+ Provider names shown in the CLI:
744
524
 
745
- 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.
525
+ ```text
526
+ AWS
527
+ Nginx Proxy Manager
528
+ Jenkins Development
529
+ Jenkins Production
530
+ GitHub Packages
531
+ ```
746
532
 
747
- 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.
533
+ List them:
748
534
 
749
- ### Persistent login sessions
535
+ ```powershell
536
+ indraq scope list
537
+ ```
750
538
 
751
- `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.
539
+ ## Users
752
540
 
753
- 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.
541
+ Create a user:
754
542
 
755
- ## Common workflows
543
+ ```powershell
544
+ indraq user create
545
+ ```
756
546
 
757
- ### Admin adds a new customer server
547
+ List users:
758
548
 
759
- ```bash
760
- indraq scope create aws
761
- indraq scope create jenkins-dev
762
- indraq scope create npm
763
- indraq scope describe
764
- indraq scope add-user
549
+ ```powershell
550
+ indraq user list
765
551
  ```
766
552
 
767
- ### Manager adds a developer to an existing scope
553
+ When IndraQ creates a Nginx Proxy Manager user, it now tests that user's email/password login before reporting success.
768
554
 
769
- ```bash
770
- indraq scope add-user
771
- ```
555
+ ---
772
556
 
773
- The manager can choose only a scope where they already have MANAGE access and can add only a normal user.
557
+ # Common commands
774
558
 
775
- ### Developer checks the account before deployment
559
+ | Task | Command |
560
+ |---|---|
561
+ | Login | `indraq login` |
562
+ | Check login | `indraq whoami` |
563
+ | Guided setup | `indraq setup` |
564
+ | Create project | `indraq project create` |
565
+ | Project status | `indraq project status` |
566
+ | Choose project servers | `indraq project environments` |
567
+ | Configure project services | `indraq prebuild` |
568
+ | Deploy web app | `indraq deploy` |
569
+ | Create Dockerfile | `indraq dockerfile create` |
570
+ | List environments | `indraq environment list` |
571
+ | List provider connections | `indraq scope list` |
572
+ | Create user | `indraq user create` |
573
+ | Run Jenkins pipeline | `indraq jenkins run` |
574
+ | Mobile prebuild | `indraq mobile prebuild` |
575
+ | Mobile production build | `indraq build mobile:prod` |
576
+ | Send OTA | `indraq mobile send update --app "My App"` |
577
+ | OTA metrics | `indraq mobile metrics --app "My App"` |
578
+ | Main help | `indraq --help` |
579
+ | Topic help | `indraq help project` |
776
580
 
777
- ```bash
778
- indraq scope list
779
- indraq scope describe "AWS Client ABC"
780
- indraq project scopes --env indraq-test-airtel
781
- indraq prebuild --env dev
782
- indraq deploy:dev
783
- ```
581
+ ---
784
582
 
785
- ### Existing project already has DNS/NPM
583
+ # Troubleshooting
786
584
 
787
- ```bash
788
- indraq prebuild --env dev
789
- ```
585
+ ## Dockerfile is missing
790
586
 
791
- Choose **Link existing** for the resources you want recorded in IndraQ, or **Skip** if IndraQ should not manage them.
587
+ Run:
792
588
 
793
- ---
589
+ ```powershell
590
+ indraq deploy
591
+ ```
794
592
 
795
- ## Security model
593
+ and choose **Yes** when IndraQ offers to create the missing Dockerfile(s).
796
594
 
797
- > [!WARNING]
798
- > 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.
595
+ Or run:
799
596
 
800
- Key rules:
597
+ ```powershell
598
+ indraq dockerfile create
599
+ ```
801
600
 
802
- - Provider scopes are visible only to members.
803
- - Only admins create organization credentials/scopes.
804
- - Managers can manage only normal users inside scopes where they hold MANAGE.
805
- - Users rotate only their own provider identities.
806
- - Every sensitive resolve/membership operation is audited.
807
- - Cloud deletion happens after external provider cleanup.
808
- - Jenkins project access uses least-privilege Item Roles.
809
- - Project definitions/infrastructure survive user deletion.
601
+ ## Jenkins looks stuck
810
602
 
811
- ---
603
+ Do not immediately run deploy again.
812
604
 
813
- ## Troubleshooting
605
+ IndraQ v2.5.0 tries to reconnect to the same Jenkins build.
814
606
 
815
- ### `fetch failed` while configuring NPM
607
+ If IndraQ says the result is uncertain, open Jenkins and check whether the build started before retrying.
816
608
 
817
- 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.
609
+ ## Nginx Proxy Manager gives 401 for a user
818
610
 
819
- ### Jenkins says Role Strategy is not active
611
+ New users created with v2.5.0 are tested during creation.
820
612
 
821
- 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.
613
+ For an old user, rotate/recreate the NPM user credential. IndraQ uses the user's **email address** as the NPM login identity.
822
614
 
823
- ### User cannot see a provider account
615
+ ## Need Route53 or NPM after project creation
824
616
 
825
- That is expected unless the user is a scope member:
617
+ Run:
826
618
 
827
- ```bash
828
- indraq scope add-user
619
+ ```powershell
620
+ indraq prebuild
829
621
  ```
830
622
 
831
- ### Deploy says Jenkins/GHCR is missing
623
+ Select only the missing item.
832
624
 
833
- Those two are mandatory. Add the user to the required scope and link/select it:
625
+ ## Need a full setup/repair
834
626
 
835
- ```bash
836
- indraq project scopes --env indraq-test-airtel
627
+ Run:
628
+
629
+ ```powershell
630
+ indraq setup
837
631
  ```
838
632
 
839
- ### DNS is missing but deployment should continue
633
+ ---
840
634
 
841
- Run prebuild and choose **Skip** for Route53.
635
+ # Cloud API development
842
636
 
843
- ---
637
+ The Cloud API has its own npm dependencies.
638
+
639
+ From the repository root:
844
640
 
845
- ## Cloud API upgrade for v2.3
641
+ ```powershell
642
+ cd cloud-api
643
+ npm install
644
+ npm run build
645
+ npm run dev
646
+ ```
846
647
 
847
- The CLI and Cloud API should be upgraded together. Apply all SQL migrations in order through `011_environment_internal_ipv4.sql`. v2.3 itself stores project component/deployment topology inside the existing `projects.config` JSONB document, so **v2.3 does not add a new SQL migration**.
648
+ Running `npm install` in the root folder does not install `cloud-api` dependencies.
649
+
650
+ Cloud API environment settings are in:
848
651
 
849
652
  ```text
850
- cloud-api/sql/001_init.sql
851
- ...
852
- cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql
853
- cloud-api/sql/010_persistent_auth_sessions.sql
854
- cloud-api/sql/011_environment_internal_ipv4.sql
653
+ cloud-api/.env.example
855
654
  ```
856
655
 
857
- Migration `010` provides persistent CLI sessions. Migration `011` separates external/public environment IPv4 (Route53) from internal/private IPv4 (NPM).
858
-
859
656
  ---
860
657
 
861
- ## Development and release
658
+ # Before publishing the CLI
862
659
 
863
- ```bash
660
+ From the repository root:
661
+
662
+ ```powershell
864
663
  npm install
865
664
  npm run build
866
665
  npm test
867
- npm pack --dry-run
666
+ npm publish --dry-run
868
667
  ```
869
668
 
870
- Cloud API:
871
-
872
- ```bash
873
- npm --prefix cloud-api install
874
- npm --prefix cloud-api run build
669
+ Then:
875
670
 
876
- # Cloud API development (`npm run dev`) also requires the nested install first:
877
- # npm --prefix cloud-api install
878
- # npm --prefix cloud-api run dev
671
+ ```powershell
672
+ npm publish
879
673
  ```
880
674
 
881
675
  ---
882
676
 
883
- <div align="center">
884
- <img src="docs/assets/indraq-mark.png" alt="IndraQ mark" width="70" />
677
+ **IndraQ Innovations — IndraQ CLI v2.6.0**
678
+
679
+
680
+ ---
681
+
682
+ # What is new in v2.6.0
683
+
684
+ ## Backend + Mobile App
685
+
686
+ Choose **Backend + Mobile App** under `indraq init` or `indraq project create`.
687
+ The backend lives in `backend/` and uses normal Docker, GitHub Packages, Jenkins,
688
+ Route53, and NPM provisioning. The mobile app lives in `mobile/` and uses
689
+ Jenkins native builds and IndraQ OTA. `indraq setup` configures both once.
690
+
691
+ ## Project deletion cleanup
692
+
693
+ `indraq project delete` lists the actual resources linked to the project and
694
+ asks which to delete: Route53 A records, GitHub Packages container packages,
695
+ project-specific Jenkins jobs, and NPM proxy hosts. **Everything starts as KEEP.**
696
+ Shared resources and the shared mobile Jenkins pipeline are protected.
697
+ An external resource marked as linked requires extra approval to delete.
698
+ If any chosen provider deletion fails, the Cloud project stays available for retry.
699
+ Deleting GitHub Packages removes all tags and versions of the selected package.
700
+ AWS health checks, NPM certificates, running containers, and local source files
701
+ are not automatically deleted. `--yes` does not select any resources automatically.
885
702
 
886
- **IndraQ CLI v2.4.0**
703
+ ## Windows OTA signing fix
887
704
 
888
- Scope-based infrastructure access. Durable projects. Safer deployments.
889
- </div>
705
+ `expo-updates codesigning:generate` now uses a Windows-safe argument-preserving
706
+ `npx` launcher. Temporary private key material is cleaned up after errors too.