@elevasis/sdk 1.21.0 → 1.22.1

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 (160) hide show
  1. package/dist/cli.cjs +1239 -173
  2. package/dist/index.d.ts +1752 -464
  3. package/dist/index.js +3477 -143
  4. package/dist/node/index.d.ts +1 -0
  5. package/dist/node/index.js +19 -1
  6. package/dist/test-utils/index.d.ts +1188 -127
  7. package/dist/test-utils/index.js +3359 -152
  8. package/dist/worker/index.js +3148 -80
  9. package/package.json +2 -2
  10. package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
  11. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
  12. package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
  13. package/reference/claude-config/registries/graph-skills.json +4 -4
  14. package/reference/claude-config/registries/knowledge-flags.json +0 -2
  15. package/reference/claude-config/rules/active-change-index.md +80 -80
  16. package/reference/claude-config/rules/agent-start-here.md +277 -277
  17. package/reference/claude-config/rules/deployment.md +57 -57
  18. package/reference/claude-config/rules/error-handling.md +56 -56
  19. package/reference/claude-config/rules/execution.md +40 -40
  20. package/reference/claude-config/rules/frontend.md +4 -4
  21. package/reference/claude-config/rules/observability.md +31 -31
  22. package/reference/claude-config/rules/operations.md +29 -17
  23. package/reference/claude-config/rules/organization-model.md +113 -81
  24. package/reference/claude-config/rules/organization-os.md +115 -113
  25. package/reference/claude-config/rules/package-taxonomy.md +33 -33
  26. package/reference/claude-config/rules/platform.md +42 -42
  27. package/reference/claude-config/rules/shared-types.md +49 -46
  28. package/reference/claude-config/rules/task-tracking.md +47 -47
  29. package/reference/claude-config/rules/ui.md +200 -200
  30. package/reference/claude-config/rules/vibe.md +235 -235
  31. package/reference/claude-config/scripts/statusline-command.js +18 -18
  32. package/reference/claude-config/settings.json +34 -34
  33. package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
  34. package/reference/claude-config/skills/dsp/SKILL.md +66 -66
  35. package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
  36. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  37. package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
  38. package/reference/claude-config/skills/knowledge/SKILL.md +314 -299
  39. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
  40. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -159
  41. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
  42. package/reference/claude-config/skills/knowledge/operations/features.md +76 -76
  43. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
  44. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
  45. package/reference/claude-config/skills/knowledge/operations/labels.md +94 -94
  46. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
  47. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
  48. package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
  49. package/reference/claude-config/skills/project/SKILL.md +1088 -1088
  50. package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
  51. package/reference/claude-config/skills/save/SKILL.md +3 -3
  52. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  53. package/reference/claude-config/skills/status/SKILL.md +59 -59
  54. package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
  55. package/reference/claude-config/skills/sync/SKILL.md +47 -47
  56. package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
  57. package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
  58. package/reference/claude-config/skills/tutorial/technical.md +1303 -1303
  59. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
  60. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
  61. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
  62. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
  63. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
  64. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
  65. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
  66. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
  67. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
  68. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
  69. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
  70. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
  71. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
  72. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
  73. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
  74. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
  75. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
  76. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
  77. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
  78. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
  79. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
  80. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
  81. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -30
  82. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +45 -0
  83. package/reference/claude-config/sync-notes/README.md +43 -43
  84. package/reference/cli.mdx +808 -808
  85. package/reference/concepts.mdx +146 -146
  86. package/reference/deployment/api.mdx +297 -297
  87. package/reference/deployment/command-center.mdx +209 -209
  88. package/reference/deployment/index.mdx +195 -195
  89. package/reference/deployment/provided-features.mdx +107 -107
  90. package/reference/deployment/ui-execution.mdx +250 -250
  91. package/reference/examples/organization-model.ts +171 -84
  92. package/reference/framework/agent.mdx +156 -156
  93. package/reference/framework/index.mdx +195 -195
  94. package/reference/framework/interaction-guidance.mdx +182 -182
  95. package/reference/framework/memory.mdx +326 -326
  96. package/reference/framework/project-structure.mdx +282 -282
  97. package/reference/framework/tutorial-system.mdx +135 -135
  98. package/reference/getting-started.mdx +142 -142
  99. package/reference/index.mdx +106 -106
  100. package/reference/packages/core/src/README.md +14 -14
  101. package/reference/packages/core/src/business/README.md +2 -2
  102. package/reference/packages/core/src/knowledge/README.md +32 -32
  103. package/reference/packages/core/src/organization-model/README.md +149 -149
  104. package/reference/packages/core/src/test-utils/README.md +37 -37
  105. package/reference/packages/ui/src/api/README.md +18 -18
  106. package/reference/packages/ui/src/app/README.md +24 -24
  107. package/reference/packages/ui/src/auth/README.md +18 -18
  108. package/reference/packages/ui/src/components/README.md +24 -24
  109. package/reference/packages/ui/src/execution/README.md +16 -16
  110. package/reference/packages/ui/src/features/README.md +28 -28
  111. package/reference/packages/ui/src/graph/README.md +16 -16
  112. package/reference/packages/ui/src/hooks/README.md +23 -23
  113. package/reference/packages/ui/src/initialization/README.md +19 -19
  114. package/reference/packages/ui/src/knowledge/README.md +31 -31
  115. package/reference/packages/ui/src/organization/README.md +18 -18
  116. package/reference/packages/ui/src/profile/README.md +19 -19
  117. package/reference/packages/ui/src/provider/README.md +32 -32
  118. package/reference/packages/ui/src/router/README.md +18 -18
  119. package/reference/packages/ui/src/sse/README.md +13 -13
  120. package/reference/packages/ui/src/test-utils/README.md +7 -7
  121. package/reference/packages/ui/src/theme/README.md +23 -23
  122. package/reference/packages/ui/src/theme/presets/README.md +19 -19
  123. package/reference/packages/ui/src/types/README.md +16 -16
  124. package/reference/packages/ui/src/utils/README.md +18 -18
  125. package/reference/packages/ui/src/zustand/README.md +18 -18
  126. package/reference/platform-tools/adapters-integration.mdx +301 -301
  127. package/reference/platform-tools/adapters-platform.mdx +553 -553
  128. package/reference/platform-tools/index.mdx +217 -217
  129. package/reference/platform-tools/type-safety.mdx +82 -82
  130. package/reference/resources/index.mdx +349 -349
  131. package/reference/resources/patterns.mdx +449 -449
  132. package/reference/resources/types.mdx +116 -116
  133. package/reference/roadmap.mdx +165 -165
  134. package/reference/runtime.mdx +173 -173
  135. package/reference/scaffold/core/organization-graph.mdx +110 -90
  136. package/reference/scaffold/core/organization-model.mdx +225 -213
  137. package/reference/scaffold/index.mdx +67 -67
  138. package/reference/scaffold/operations/propagation-pipeline.md +77 -77
  139. package/reference/scaffold/operations/scaffold-maintenance.md +12 -12
  140. package/reference/scaffold/operations/workflow-recipes.md +138 -138
  141. package/reference/scaffold/recipes/add-a-feature.md +307 -85
  142. package/reference/scaffold/recipes/add-a-resource.md +137 -103
  143. package/reference/scaffold/recipes/customize-knowledge-browser.md +5 -5
  144. package/reference/scaffold/recipes/customize-organization-model.md +275 -138
  145. package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
  146. package/reference/scaffold/recipes/extend-crm.md +3 -3
  147. package/reference/scaffold/recipes/extend-lead-gen.md +394 -394
  148. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -118
  149. package/reference/scaffold/recipes/index.md +46 -46
  150. package/reference/scaffold/recipes/query-the-knowledge-graph.md +197 -170
  151. package/reference/scaffold/reference/contracts.md +2136 -2093
  152. package/reference/scaffold/reference/glossary.md +76 -76
  153. package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
  154. package/reference/scaffold/ui/customization.md +243 -243
  155. package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
  156. package/reference/scaffold/ui/feature-shell.mdx +72 -72
  157. package/reference/scaffold/ui/recipes.md +221 -214
  158. package/reference/spine/spine-primer.md +96 -96
  159. package/reference/templates/index.mdx +47 -47
  160. package/reference/troubleshooting.mdx +223 -223
package/reference/cli.mdx CHANGED
@@ -1,808 +1,808 @@
1
- ---
2
- title: CLI Reference
3
- description: Full reference for every elevasis-sdk CLI command -- validate, deploy, execute, inspect resources, and manage Projects through the canonical SDK CLI surface
4
- loadWhen: "Running CLI operations"
5
- ---
6
-
7
- The `elevasis-sdk` CLI is the primary interface for working with your Elevasis SDK project. Install it as part of `@elevasis/sdk` and use it to validate resource definitions, deploy to the platform, inspect execution history, and manage Projects through `project:*`.
8
-
9
- **Installation:**
10
-
11
- ```bash
12
- pnpm add @elevasis/sdk
13
- ```
14
-
15
- After installation, the `elevasis-sdk` binary is available in your project's `node_modules/.bin/`. Most commands require `ELEVASIS_PLATFORM_KEY` to be set in your environment or a `.env` file.
16
-
17
- ---
18
-
19
- ## elevasis-sdk check
20
-
21
- Validate all resource definitions in your project without deploying.
22
-
23
- **Synopsis:**
24
-
25
- ```
26
- elevasis-sdk check
27
- ```
28
-
29
- **Behavior:**
30
-
31
- - Imports your `src/index.ts` and runs it through `ResourceRegistry` validation
32
- - Catches the same errors that the platform catches at deploy time:
33
- - Duplicate `resourceId` within the organization
34
- - Invalid model configuration (temperature and token bounds)
35
- - `ExecutionInterface` form fields not matching `inputSchema`
36
- - Broken workflow step chains (`next` referencing non-existent steps)
37
- - Relationship declarations referencing non-existent resources
38
- - Exits with code 0 on success, code 1 on validation failure
39
-
40
- **Flags:**
41
-
42
- | Flag | Description |
43
- | ------------------- | ------------------------- |
44
- | `--api-url <url>` | Override the API base URL |
45
-
46
- **Example output (success):**
47
-
48
- ```
49
- $ elevasis-sdk check
50
-
51
- Validating... done (4 resources, 0 errors)
52
- ```
53
-
54
- **Example output (failure):**
55
-
56
- ```
57
- $ elevasis-sdk check
58
-
59
- Validating...
60
- ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
61
- ERROR Workflow step 'send-email' references non-existent next step 'notify'
62
-
63
- 2 errors.
64
- ```
65
-
66
- ---
67
-
68
- ## elevasis-sdk deploy
69
-
70
- Bundle your project with esbuild and deploy it to the Elevasis platform.
71
-
72
- **Synopsis:**
73
-
74
- ```
75
- elevasis-sdk deploy
76
- ```
77
-
78
- **Behavior:**
79
-
80
- - Authenticates with `ELEVASIS_PLATFORM_KEY` and resolves your organization name
81
- - Runs the same `ResourceRegistry` validation as `elevasis-sdk check`
82
- - Bundles your `src/index.ts` and all dependencies into a single self-contained JS file (`dist/bundle.js`, approximately 50-200 KB)
83
- - Uploads the bundle plus resource metadata to `POST /api/external/deploy`
84
- - Streams deploy status and prints the result
85
- - Resources are live immediately after a successful deploy
86
-
87
- **Flags:**
88
-
89
- | Flag | Description |
90
- | ------------------- | ------------------------------------------------------------------------- |
91
- | `--api-url <url>` | Override the API base URL (default: production) |
92
- | `--prod` | Force production target, overriding `NODE_ENV=development` (internal use) |
93
-
94
- **Environment variables:**
95
-
96
- | Variable | Description |
97
- | ----------------------- | ----------------------------------- |
98
- | `ELEVASIS_PLATFORM_KEY` | Required. Your `sk_...` API key |
99
- | `ELEVASIS_API_URL` | Optional. Override the API base URL |
100
-
101
- **Example output (success):**
102
-
103
- ```
104
- $ elevasis-sdk deploy
105
-
106
- Authenticating... done (acme-corp)
107
- Validating... done (4 resources, 0 errors)
108
- Bundling... done (142 KB)
109
- Uploading... done
110
-
111
- Deployed! 4 resources live.
112
- Deployment: deploy_abc123
113
- ```
114
-
115
- **Example output (validation failure):**
116
-
117
- ```
118
- $ elevasis-sdk deploy
119
-
120
- Authenticating... done (acme-corp)
121
- Validating...
122
- ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
123
- ERROR Workflow step 'send-email' references non-existent next step 'notify'
124
-
125
- 2 errors. Deploy aborted.
126
- ```
127
-
128
- ---
129
-
130
- ## elevasis-sdk exec
131
-
132
- Execute a deployed resource by ID.
133
-
134
- **Synopsis:**
135
-
136
- ```
137
- elevasis-sdk exec <resource> --input '{...}'
138
- ```
139
-
140
- **Behavior:**
141
-
142
- - Executes the named resource synchronously by default and streams the result
143
- - Use `--async` to return an `executionId` immediately and poll for completion
144
- - `--input` accepts a JSON string matching the resource's `inputSchema`
145
- - Organization is derived from your API key -- no org prefix needed
146
-
147
- **Flags:**
148
-
149
- | Flag | Description |
150
- | ------------------- | ------------------------------------------------------- |
151
- | `--input <json>` | JSON input matching the resource's input schema |
152
- | `--async` | Execute asynchronously, return execution ID immediately |
153
- | `--json` | Output raw JSON instead of formatted display |
154
- | `--api-url <url>` | Override the API base URL |
155
-
156
- **Example:**
157
-
158
- ```bash
159
- elevasis-sdk exec onboard-client --input '{"clientName": "Jane", "email": "jane@example.com"}'
160
- ```
161
-
162
- ```
163
- Executing onboard-client...
164
-
165
- Status: completed
166
- Duration: 1.4s
167
-
168
- Output:
169
- {
170
- "success": true,
171
- "clientId": "client_1708521600000",
172
- "welcomeEmailSent": true
173
- }
174
- ```
175
-
176
- **Async example:**
177
-
178
- ```bash
179
- elevasis-sdk exec onboard-client --input '{"clientName": "Jane"}' --async
180
- ```
181
-
182
- ```
183
- Execution started: exec_550e8400
184
- Poll with: elevasis-sdk execution onboard-client exec_550e8400
185
- ```
186
-
187
- ---
188
-
189
- ## elevasis-sdk resources
190
-
191
- List all deployed resources for your organization.
192
-
193
- **Synopsis:**
194
-
195
- ```
196
- elevasis-sdk resources
197
- ```
198
-
199
- **Behavior:**
200
-
201
- - Lists all resources registered to your organization on the platform
202
- - In production, only `status: 'prod'` resources are shown
203
- - Displays resource ID, type, name, and status
204
-
205
- **Flags:**
206
-
207
- | Flag | Description |
208
- | ------------------- | ------------------------- |
209
- | `--json` | Output raw JSON |
210
- | `--api-url <url>` | Override the API base URL |
211
-
212
- **Example output:**
213
-
214
- ```
215
- $ elevasis-sdk resources
216
-
217
- onboard-client workflow Onboard Client prod
218
- send-report workflow Send Weekly Report prod
219
- email-assistant agent Email Assistant prod
220
- support-bot agent Support Bot dev
221
- ```
222
-
223
- ---
224
-
225
- ## elevasis-sdk executions
226
-
227
- View execution history for a resource.
228
-
229
- **Synopsis:**
230
-
231
- ```
232
- elevasis-sdk executions [resource]
233
- ```
234
-
235
- **Behavior:**
236
-
237
- - Lists recent executions for the specified resource
238
- - If `resource` is omitted, lists executions across all resources
239
- - Supports filtering by status and limiting result count
240
-
241
- **Flags:**
242
-
243
- | Flag | Description |
244
- | --------------------- | --------------------------------------------------------------- |
245
- | `--limit <n>` | Maximum number of executions to return (default: 20) |
246
- | `--status <status>` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
247
- | `--json` | Output raw JSON |
248
- | `--api-url <url>` | Override the API base URL |
249
-
250
- **Example:**
251
-
252
- ```bash
253
- elevasis-sdk executions onboard-client --limit 5
254
- ```
255
-
256
- ```
257
- exec_abc001 completed 2026-02-25 14:32:01 1.2s
258
- exec_abc002 completed 2026-02-25 13:18:44 0.9s
259
- exec_abc003 failed 2026-02-25 12:05:22 0.3s
260
- exec_abc004 completed 2026-02-24 17:51:09 1.8s
261
- exec_abc005 completed 2026-02-24 16:30:55 1.1s
262
- ```
263
-
264
- ---
265
-
266
- ## elevasis-sdk execution
267
-
268
- View full detail for a single execution.
269
-
270
- **Synopsis:**
271
-
272
- ```
273
- elevasis-sdk execution <resource> <id>
274
- ```
275
-
276
- **Behavior:**
277
-
278
- - Shows the complete execution record: input, output, logs, duration, and error (if any)
279
- - Use `--json` to get the raw JSON response for programmatic use
280
-
281
- **Flags:**
282
-
283
- | Flag | Description |
284
- | ------------------- | ------------------------- |
285
- | `--json` | Output raw JSON |
286
- | `--api-url <url>` | Override the API base URL |
287
-
288
- **Example:**
289
-
290
- ```bash
291
- elevasis-sdk execution onboard-client exec_abc001
292
- ```
293
-
294
- ```
295
- Resource: onboard-client
296
- Status: completed
297
- Started: 2026-02-25 14:32:01
298
- Duration: 1.2s
299
-
300
- Input:
301
- {
302
- "clientName": "Jane",
303
- "email": "jane@example.com"
304
- }
305
-
306
- Output:
307
- {
308
- "success": true,
309
- "clientId": "client_1708521600000",
310
- "welcomeEmailSent": true
311
- }
312
-
313
- Logs:
314
- [14:32:01.123] Starting onboard-client workflow
315
- [14:32:01.456] Created client record
316
- [14:32:01.891] Welcome email sent to jane@example.com
317
- ```
318
-
319
- ---
320
-
321
- ## elevasis-sdk deployments
322
-
323
- List all deployments for your organization.
324
-
325
- **Synopsis:**
326
-
327
- ```
328
- elevasis-sdk deployments
329
- ```
330
-
331
- **Behavior:**
332
-
333
- - Shows deployment history with status, timestamp, and resource count
334
- - Active deployment is marked; previous deployments show as `stopped`
335
-
336
- **Flags:**
337
-
338
- | Flag | Description |
339
- | ------------------- | ------------------------- |
340
- | `--json` | Output raw JSON |
341
- | `--api-url <url>` | Override the API base URL |
342
-
343
- **Example output:**
344
-
345
- ```
346
- $ elevasis-sdk deployments
347
-
348
- deploy_abc123 active 2026-02-25 14:00:00 4 resources
349
- deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
350
- deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
351
- ```
352
-
353
- ---
354
-
355
- ## elevasis-sdk describe
356
-
357
- Show the definition of a deployed resource.
358
-
359
- **Synopsis:**
360
-
361
- ```
362
- elevasis-sdk describe <resource>
363
- ```
364
-
365
- **Behavior:**
366
-
367
- - Displays resource metadata: name, type, description, status, and domains
368
- - Shows the full `inputSchema` and `outputSchema` as JSON
369
- - Type is color-coded: yellow for workflows, magenta for agents
370
-
371
- **Flags:**
372
-
373
- | Flag | Description |
374
- | ------------------- | ------------------------- |
375
- | `--json` | Output raw JSON response |
376
- | `--api-url <url>` | Override the API base URL |
377
-
378
- **Example:**
379
-
380
- ```bash
381
- elevasis-sdk describe onboard-client
382
- ```
383
-
384
- ```
385
- onboard-client [workflow]
386
-
387
- Name: Onboard Client
388
- Description: Creates a client record and sends a welcome email
389
- Status: prod
390
- Domains: crm, email
391
-
392
- Input Schema:
393
- {
394
- "type": "object",
395
- "properties": {
396
- "clientName": { "type": "string" },
397
- "email": { "type": "string", "format": "email" }
398
- },
399
- "required": ["clientName", "email"]
400
- }
401
- ```
402
-
403
- ---
404
-
405
- ## elevasis-sdk creds
406
-
407
- Manage credentials for your project.
408
-
409
- **Synopsis:**
410
-
411
- ```
412
- elevasis-sdk creds list
413
- elevasis-sdk creds set <key> <value>
414
- elevasis-sdk creds remove <key>
415
- ```
416
-
417
- **Behavior:**
418
-
419
- - `list` -- display all credentials configured for the project
420
- - `set` -- add or update a credential
421
- - `remove` -- delete a credential
422
-
423
- **Flags:**
424
-
425
- | Flag | Description |
426
- | ------------------- | ------------------------- |
427
- | `--api-url <url>` | Override the API base URL |
428
-
429
- **Examples:**
430
-
431
- ```bash
432
- elevasis-sdk creds list
433
- elevasis-sdk creds set OPENAI_API_KEY sk-proj-***
434
- elevasis-sdk creds remove OPENAI_API_KEY
435
- ```
436
-
437
- ---
438
-
439
- ## elevasis-sdk rename
440
-
441
- Rename a resource ID across all reference tables in the platform database.
442
-
443
- **Synopsis:**
444
-
445
- ```
446
- elevasis-sdk rename <old-id> --to <new-id> [--execute] [--prod]
447
- ```
448
-
449
- **Behavior:**
450
-
451
- - Dry-run by default -- shows all affected rows per table without modifying any data
452
- - Pass `--execute` to perform the rename
453
- - Org-scoped: only updates rows belonging to your organization
454
- - Updates resource references across 6 tables:
455
-
456
- | Table | Column(s) updated |
457
- | -------------------- | ----------------- |
458
- | `executions` | `resource_id` |
459
- | `sessions` | `resource_id` |
460
- | `workflow_configs` | `resource_id` |
461
- | `workflow_schedules` | `resource_id` |
462
- | `execution_events` | `resource_id` |
463
- | `session_events` | `resource_id` |
464
-
465
- **Flags:**
466
-
467
- | Flag | Description |
468
- | ------------------- | --------------------------------------- |
469
- | `--to <new-id>` | Required. The new resource ID |
470
- | `--execute` | Perform the rename (default is dry-run) |
471
- | `--prod` | Target the production environment |
472
- | `--api-url <url>` | Override the API base URL |
473
-
474
- **Example (dry-run):**
475
-
476
- ```bash
477
- elevasis-sdk rename ist-upload-workflow --to ist-upload-contacts-workflow
478
- ```
479
-
480
- ```
481
- Dry run — no changes made.
482
-
483
- Rows that would be updated:
484
- executions 6
485
- sessions 0
486
- workflow_configs 0
487
- workflow_schedules 0
488
- execution_events 0
489
- session_events 0
490
-
491
- Total: 6 rows
492
-
493
- Re-run with --execute to apply changes.
494
- ```
495
-
496
- **Example (execute):**
497
-
498
- ```bash
499
- elevasis-sdk rename ist-upload-workflow --to ist-upload-contacts-workflow --execute
500
- ```
501
-
502
- **Implementation:** `packages/sdk/src/cli/commands/rename.ts` -- delegates to `POST /api/external/resources/rename`
503
-
504
- ---
505
-
506
- ## elevasis-sdk project:\*
507
-
508
- `elevasis-sdk project:*` is the canonical project-management surface. Use it for project, milestone, task, and note operations whether the caller is a human, a scripted workflow, or a slash-command router like `/project`.
509
-
510
- This CLI family is SDK-first, but it is not semantically standalone. It operates on the same Organization OS contract that the shared delivery UI uses:
511
-
512
- - UI manifest key: `delivery`
513
- - Organization model feature ID: `projects`
514
- - Default surface: `projects.index`
515
- - Semantic domain fields: `organizationModel.delivery`
516
- - Core entity/capability IDs: `delivery.project`, `delivery.milestone`, `delivery.task`, `delivery.projects.view`
517
-
518
- ### Projects
519
-
520
- ```bash
521
- elevasis-sdk project:list
522
- elevasis-sdk project:get <id>
523
- elevasis-sdk project:create --name "Website Refresh" --kind client_engagement
524
- elevasis-sdk project:update <id> --status completed
525
- elevasis-sdk project:delete <id>
526
- ```
527
-
528
- **Behavior:**
529
-
530
- - `project:list` filters by `--kind` and `--status`
531
- - `project:get` returns a single project
532
- - `project:create` and `project:update` operate on `/api/external/projects`
533
-
534
- ### Milestones
535
-
536
- ```bash
537
- elevasis-sdk project:milestone:list --project <id>
538
- elevasis-sdk project:milestone:create --project <id> --name "Phase 1"
539
- elevasis-sdk project:milestone:update <id> --status completed
540
- elevasis-sdk project:milestone:update <id> --description "Updated scope description"
541
- elevasis-sdk project:milestone:delete <id>
542
- ```
543
-
544
- `project:milestone:update` accepts `--description` to set or clear the milestone description. Passing an empty string clears the field, matching `project:task:update --description` semantics.
545
-
546
- ### Tasks
547
-
548
- ```bash
549
- elevasis-sdk project:task:list --project <id>
550
- elevasis-sdk project:task:get <id>
551
- elevasis-sdk project:task:create --project <id> --title "Implement API"
552
- elevasis-sdk project:task:update <id> --status in_progress
553
- elevasis-sdk project:task:delete <id>
554
- ```
555
-
556
- Task commands also expose agent-oriented resume state:
557
-
558
- ```bash
559
- elevasis-sdk project:task:resume <id> --pretty
560
- elevasis-sdk project:task:save <id> --current-state "Implemented the route layer"
561
- ```
562
-
563
- - `project:task:resume` reads the task's `resume_context`
564
- - `project:task:save` merges fields into `resume_context`
565
- - these commands are the CLI counterpart to `/work resume` and `/work save` style flows
566
-
567
- ### Notes
568
-
569
- ```bash
570
- elevasis-sdk project:note:list --project <id>
571
- elevasis-sdk project:note:create --project <id> --content "Client approved scope"
572
- elevasis-sdk project:note:create --project <id> --type agent_learning --content "Learned X"
573
- elevasis-sdk project:note:update <id> --content "Updated status"
574
- elevasis-sdk project:note:delete <id>
575
- ```
576
-
577
- The `--type` flag accepts: `call_note`, `status_update`, `issue`, `blocker`, `agent_learning`. The `agent_learning` type is the canonical way for agents to record durable skill observations. Accepted values are derived from `NoteTypeSchema` in `packages/core/src/projects/api-schemas.ts` -- that schema is the source of truth; the CLI help text is generated from it to prevent drift.
578
-
579
- ### Requests
580
-
581
- ```bash
582
- elevasis-sdk request:submit --input-file ./tmp/request-report.json
583
- elevasis-sdk request:submit --input '{"type":"bug","category":"sdk","severity":"high","title":"..."}'
584
- ```
585
-
586
- Submits a structured request report to `POST /api/external/requests`. The payload is validated against `CreateRequestInputSchema` before the network call.
587
-
588
- **Payload enum values** (inline in `--help` output; sourced from `packages/core/src/requests/api-schemas.ts`):
589
-
590
- | Field | Accepted values |
591
- | ---------- | ------------------------------------------------------------------------------------- |
592
- | `type` | Values from `RequestTypeEnum` -- see `request:submit --help` for the current list |
593
- | `category` | Values from `RequestCategoryEnum` -- see `request:submit --help` for the current list |
594
- | `severity` | Values from `RequestSeverityEnum` -- see `request:submit --help` for the current list |
595
-
596
- **Flags:**
597
-
598
- | Flag | Description |
599
- | --------------------------- | ----------------------------------------------------------------------------- |
600
- | `-i, --input <json>` | Request body as JSON string |
601
- | `-f, --input-file <path>` | Read body from a JSON file; relative paths resolve against the project root |
602
- | `--pretty` | Human-readable output instead of raw JSON |
603
- | `--cleanup-input` | Delete the input file after success (only files under `<projectRoot>/tmp/`) |
604
- | `--api-url <url>` | Override the API base URL |
605
-
606
- ---
607
-
608
- ### Shared Flags
609
-
610
- Most `project:*` commands support:
611
-
612
- | Flag | Description |
613
- | ----------------- | -------------------------------------------------- |
614
- | `--pretty` | Human-readable terminal output instead of raw JSON |
615
- | `--api-url <url>` | Override the API base URL |
616
-
617
- For exact required flags and accepted enum values, see the command source under `packages/sdk/src/cli/commands/project/`.
618
-
619
- ### Command Boundary
620
-
621
- - `/project` is a convenience router to these `elevasis-sdk project:*` commands. It is not a separate project system.
622
- - `/work` is for docs-backed in-progress task tracking and session resume, not project CRUD.
623
- - `/external` is for managing standalone apps in `external/`, not project records inside a deployed system.
624
- - `/adev` is for implementation, debugging, testing, and platform execution flows. Use it when you need to build or run agent/workflow code rather than update project data.
625
-
626
- ---
627
-
628
- ## elevasis-sdk note:\*
629
-
630
- `elevasis-sdk note:*` is the agent-facing surface for pushing and reading personal user notes. Workflows and agents use it to surface information -- such as "deal X stalled" or "review run completed" -- directly into a user's Notes panel in the Command Center, without sending an email or notification.
631
-
632
- Notes are personal to the target user and scoped to the calling organization. The external API surface exposes `GET + POST` only; `note:update` and `note:delete` are not yet available via SDK CLI. Users edit and delete notes through the right-panel view in the Command Center.
633
-
634
- ### note:create
635
-
636
- Create a personal note for a user.
637
-
638
- **Synopsis:**
639
-
640
- ```
641
- elevasis-sdk note:create --content <text>
642
- [--user <email>]
643
- [--title <text>]
644
- [--priority low|normal|high|urgent]
645
- [--pinned]
646
- [--source <id>]
647
- [--api-url <url>] [--pretty]
648
- ```
649
-
650
- **Flags:**
651
-
652
- | Flag | Description |
653
- | ------------------------- | ----------------------------------------------------------------------------------------- |
654
- | `--content <text>` | Required. The note body text |
655
- | `--user <email>` | Target user email. Defaults to the API key owner when omitted |
656
- | `--title <text>` | Optional note title |
657
- | `--priority <priority>` | Priority level: `low`, `normal` (default), `high`, or `urgent` |
658
- | `--pinned` | Pin the note to the top of the panel |
659
- | `--source <id>` | Source identifier -- set this to the workflow or agent ID when calling from agent runtime |
660
- | `--api-url <url>` | Override the API base URL |
661
- | `--pretty` | Human-readable terminal output instead of raw JSON |
662
-
663
- **Behavior:**
664
-
665
- - Posts to `POST /api/external/user-notes`
666
- - When `--user` is omitted the note is created for the identity bound to the API key (the caller)
667
- - When `--user` is provided the platform resolves the email to a Supabase user UUID and verifies the resolved user is an active member of the calling organization before writing
668
- - The `--source` flag is recorded as the `source` column in `user_notes`; agent runtimes should pass their resource ID here so users can see which workflow created the note
669
- - Priority `normal` produces no badge in the UI; `high` renders orange, `urgent` renders red, `low` renders dimmed gray
670
-
671
- **Examples:**
672
-
673
- ```bash
674
- # Create a note for the API key owner
675
- elevasis-sdk note:create --content "Deal X has stalled -- follow up needed"
676
-
677
- # Create a high-priority pinned note for a specific user
678
- elevasis-sdk note:create \
679
- --content "Review run completed for batch_abc123" \
680
- --user ops@acme.com \
681
- --priority high \
682
- --pinned \
683
- --source "report-review-workflow" \
684
- --pretty
685
- ```
686
-
687
- ```
688
- Note created
689
- ID: note_550e8400-...
690
- Priority: high
691
- ```
692
-
693
- ---
694
-
695
- ### note:list
696
-
697
- List notes for a user.
698
-
699
- **Synopsis:**
700
-
701
- ```
702
- elevasis-sdk note:list --user <email>
703
- [--priority <p>] [--pinned]
704
- [--limit <n>] [--offset <n>]
705
- [--api-url <url>] [--pretty]
706
- ```
707
-
708
- **Flags:**
709
-
710
- | Flag | Description |
711
- | ------------------------- | -------------------------------------------------------- |
712
- | `--user <email>` | Required. The user whose notes to retrieve |
713
- | `--priority <priority>` | Filter by priority: `low`, `normal`, `high`, or `urgent` |
714
- | `--pinned` | Return only pinned notes |
715
- | `--limit <n>` | Maximum number of results to return |
716
- | `--offset <n>` | Pagination offset |
717
- | `--api-url <url>` | Override the API base URL |
718
- | `--pretty` | Human-readable terminal output instead of raw JSON |
719
-
720
- **Behavior:**
721
-
722
- - Queries `GET /api/external/user-notes?user_email=<email>`
723
- - `--user` is required -- the external GET endpoint requires an explicit user target
724
- - Results are sorted by the platform: pinned first, then by priority (`urgent` > `high` > `normal` > `low`), then by most recently updated
725
- - Organization scope is derived from the API key -- only notes belonging to users in the calling organization are returned
726
-
727
- **Examples:**
728
-
729
- ```bash
730
- # List all notes for a user
731
- elevasis-sdk note:list --user ops@acme.com
732
-
733
- # List only high-priority pinned notes, human-readable
734
- elevasis-sdk note:list --user ops@acme.com --priority high --pinned --pretty
735
- ```
736
-
737
- ```
738
- Notes (2):
739
-
740
- (no title) [pinned] [high]
741
- ID: note_abc001
742
- Review run completed for batch_abc123
743
-
744
- Deal X stalled [pinned] [high]
745
- ID: note_abc002
746
- Deal X has stalled -- follow up needed
747
- ```
748
-
749
- ---
750
-
751
- ### Shared Flags
752
-
753
- | Flag | Description |
754
- | ------------------- | -------------------------------------------------- |
755
- | `--pretty` | Human-readable terminal output instead of raw JSON |
756
- | `--api-url <url>` | Override the API base URL |
757
-
758
- ### Command Boundary
759
-
760
- - `note:create` and `note:list` operate on the **personal notes** surface -- not project notes. For project-scoped notes use `project:note:*`.
761
- - `note:update` and `note:delete` are not yet available via SDK CLI. Edit and delete notes using the Notes panel in the Command Center.
762
- - The Notes panel view (`NotesPanelView`) is registered in the right-panel registry alongside Overview, Recent Executions, and Notifications.
763
-
764
- **Implementation:** `packages/sdk/src/cli/commands/notes.ts` -- delegates to `POST /api/external/user-notes` and `GET /api/external/user-notes`
765
-
766
- ---
767
-
768
- ## elevasis-sdk ui:use-local / ui:use-published
769
-
770
- Switch the `@elevasis/ui` dependency in an external project between a local tarball build and the published npm package.
771
-
772
- **Synopsis:**
773
-
774
- ```bash
775
- elevasis-sdk ui:use-local
776
- elevasis-sdk ui:use-published
777
- ```
778
-
779
- **Behavior:**
780
-
781
- - `ui:use-local` -- builds a tarball from the local `packages/ui/` source and rewrites the project's `package.json` to point at the tarball path. Use this during active `@elevasis/ui` development to test changes without publishing.
782
- - `ui:use-published` -- reverts `package.json` to the published `@elevasis/ui` version string and removes any local tarball reference.
783
-
784
- Both commands install after rewriting `package.json`. The `external/_template` root scripts `ui:use-local` and `ui:use-published` are compatibility wrappers that delegate to these CLI commands.
785
-
786
- **Implementation:** `packages/sdk/src/cli/commands/ui/ui-switcher.ts`
787
-
788
- ---
789
-
790
- ## Global Flags
791
-
792
- These flags are accepted by all commands:
793
-
794
- | Flag | Description |
795
- | ------------------- | --------------------------------------------------------------------------------------------------- |
796
- | `--api-url <url>` | Override the API base URL. Priority: flag > `ELEVASIS_API_URL` env var > `NODE_ENV`-based default |
797
- | `--json` | Output raw JSON (available on most commands) |
798
-
799
- **API base URL resolution:**
800
-
801
- - Production (default): `https://api.elevasis.io`
802
- - Development (`NODE_ENV=development`): `http://localhost:<port>`
803
- - Override: set `ELEVASIS_API_URL` or pass `--api-url`
804
- - Force production: pass `--prod` on `deploy` (overrides `NODE_ENV=development`)
805
-
806
- ---
807
-
808
- **Last Updated:** 2026-04-17
1
+ ---
2
+ title: CLI Reference
3
+ description: Full reference for every elevasis-sdk CLI command -- validate, deploy, execute, inspect resources, and manage Projects through the canonical SDK CLI surface
4
+ loadWhen: "Running CLI operations"
5
+ ---
6
+
7
+ The `elevasis-sdk` CLI is the primary interface for working with your Elevasis SDK project. Install it as part of `@elevasis/sdk` and use it to validate resource definitions, deploy to the platform, inspect execution history, and manage Projects through `project:*`.
8
+
9
+ **Installation:**
10
+
11
+ ```bash
12
+ pnpm add @elevasis/sdk
13
+ ```
14
+
15
+ After installation, the `elevasis-sdk` binary is available in your project's `node_modules/.bin/`. Most commands require `ELEVASIS_PLATFORM_KEY` to be set in your environment or a `.env` file.
16
+
17
+ ---
18
+
19
+ ## elevasis-sdk check
20
+
21
+ Validate all resource definitions in your project without deploying.
22
+
23
+ **Synopsis:**
24
+
25
+ ```
26
+ elevasis-sdk check
27
+ ```
28
+
29
+ **Behavior:**
30
+
31
+ - Imports your `src/index.ts` and runs it through `ResourceRegistry` validation
32
+ - Catches the same errors that the platform catches at deploy time:
33
+ - Duplicate `resourceId` within the organization
34
+ - Invalid model configuration (temperature and token bounds)
35
+ - `ExecutionInterface` form fields not matching `inputSchema`
36
+ - Broken workflow step chains (`next` referencing non-existent steps)
37
+ - Relationship declarations referencing non-existent resources
38
+ - Exits with code 0 on success, code 1 on validation failure
39
+
40
+ **Flags:**
41
+
42
+ | Flag | Description |
43
+ | ------------------- | ------------------------- |
44
+ | `--api-url <url>` | Override the API base URL |
45
+
46
+ **Example output (success):**
47
+
48
+ ```
49
+ $ elevasis-sdk check
50
+
51
+ Validating... done (4 resources, 0 errors)
52
+ ```
53
+
54
+ **Example output (failure):**
55
+
56
+ ```
57
+ $ elevasis-sdk check
58
+
59
+ Validating...
60
+ ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
61
+ ERROR Workflow step 'send-email' references non-existent next step 'notify'
62
+
63
+ 2 errors.
64
+ ```
65
+
66
+ ---
67
+
68
+ ## elevasis-sdk deploy
69
+
70
+ Bundle your project with esbuild and deploy it to the Elevasis platform.
71
+
72
+ **Synopsis:**
73
+
74
+ ```
75
+ elevasis-sdk deploy
76
+ ```
77
+
78
+ **Behavior:**
79
+
80
+ - Authenticates with `ELEVASIS_PLATFORM_KEY` and resolves your organization name
81
+ - Runs the same `ResourceRegistry` validation as `elevasis-sdk check`
82
+ - Bundles your `src/index.ts` and all dependencies into a single self-contained JS file (`dist/bundle.js`, approximately 50-200 KB)
83
+ - Uploads the bundle plus resource metadata to `POST /api/external/deploy`
84
+ - Streams deploy status and prints the result
85
+ - Resources are live immediately after a successful deploy
86
+
87
+ **Flags:**
88
+
89
+ | Flag | Description |
90
+ | ------------------- | ------------------------------------------------------------------------- |
91
+ | `--api-url <url>` | Override the API base URL (default: production) |
92
+ | `--prod` | Force production target, overriding `NODE_ENV=development` (internal use) |
93
+
94
+ **Environment variables:**
95
+
96
+ | Variable | Description |
97
+ | ----------------------- | ----------------------------------- |
98
+ | `ELEVASIS_PLATFORM_KEY` | Required. Your `sk_...` API key |
99
+ | `ELEVASIS_API_URL` | Optional. Override the API base URL |
100
+
101
+ **Example output (success):**
102
+
103
+ ```
104
+ $ elevasis-sdk deploy
105
+
106
+ Authenticating... done (acme-corp)
107
+ Validating... done (4 resources, 0 errors)
108
+ Bundling... done (142 KB)
109
+ Uploading... done
110
+
111
+ Deployed! 4 resources live.
112
+ Deployment: deploy_abc123
113
+ ```
114
+
115
+ **Example output (validation failure):**
116
+
117
+ ```
118
+ $ elevasis-sdk deploy
119
+
120
+ Authenticating... done (acme-corp)
121
+ Validating...
122
+ ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
123
+ ERROR Workflow step 'send-email' references non-existent next step 'notify'
124
+
125
+ 2 errors. Deploy aborted.
126
+ ```
127
+
128
+ ---
129
+
130
+ ## elevasis-sdk exec
131
+
132
+ Execute a deployed resource by ID.
133
+
134
+ **Synopsis:**
135
+
136
+ ```
137
+ elevasis-sdk exec <resource> --input '{...}'
138
+ ```
139
+
140
+ **Behavior:**
141
+
142
+ - Executes the named resource synchronously by default and streams the result
143
+ - Use `--async` to return an `executionId` immediately and poll for completion
144
+ - `--input` accepts a JSON string matching the resource's `inputSchema`
145
+ - Organization is derived from your API key -- no org prefix needed
146
+
147
+ **Flags:**
148
+
149
+ | Flag | Description |
150
+ | ------------------- | ------------------------------------------------------- |
151
+ | `--input <json>` | JSON input matching the resource's input schema |
152
+ | `--async` | Execute asynchronously, return execution ID immediately |
153
+ | `--json` | Output raw JSON instead of formatted display |
154
+ | `--api-url <url>` | Override the API base URL |
155
+
156
+ **Example:**
157
+
158
+ ```bash
159
+ elevasis-sdk exec onboard-client --input '{"clientName": "Jane", "email": "jane@example.com"}'
160
+ ```
161
+
162
+ ```
163
+ Executing onboard-client...
164
+
165
+ Status: completed
166
+ Duration: 1.4s
167
+
168
+ Output:
169
+ {
170
+ "success": true,
171
+ "clientId": "client_1708521600000",
172
+ "welcomeEmailSent": true
173
+ }
174
+ ```
175
+
176
+ **Async example:**
177
+
178
+ ```bash
179
+ elevasis-sdk exec onboard-client --input '{"clientName": "Jane"}' --async
180
+ ```
181
+
182
+ ```
183
+ Execution started: exec_550e8400
184
+ Poll with: elevasis-sdk execution onboard-client exec_550e8400
185
+ ```
186
+
187
+ ---
188
+
189
+ ## elevasis-sdk resources
190
+
191
+ List all deployed resources for your organization.
192
+
193
+ **Synopsis:**
194
+
195
+ ```
196
+ elevasis-sdk resources
197
+ ```
198
+
199
+ **Behavior:**
200
+
201
+ - Lists all resources registered to your organization on the platform
202
+ - In production, only `status: 'prod'` resources are shown
203
+ - Displays resource ID, type, name, and status
204
+
205
+ **Flags:**
206
+
207
+ | Flag | Description |
208
+ | ------------------- | ------------------------- |
209
+ | `--json` | Output raw JSON |
210
+ | `--api-url <url>` | Override the API base URL |
211
+
212
+ **Example output:**
213
+
214
+ ```
215
+ $ elevasis-sdk resources
216
+
217
+ onboard-client workflow Onboard Client prod
218
+ send-report workflow Send Weekly Report prod
219
+ email-assistant agent Email Assistant prod
220
+ support-bot agent Support Bot dev
221
+ ```
222
+
223
+ ---
224
+
225
+ ## elevasis-sdk executions
226
+
227
+ View execution history for a resource.
228
+
229
+ **Synopsis:**
230
+
231
+ ```
232
+ elevasis-sdk executions [resource]
233
+ ```
234
+
235
+ **Behavior:**
236
+
237
+ - Lists recent executions for the specified resource
238
+ - If `resource` is omitted, lists executions across all resources
239
+ - Supports filtering by status and limiting result count
240
+
241
+ **Flags:**
242
+
243
+ | Flag | Description |
244
+ | --------------------- | --------------------------------------------------------------- |
245
+ | `--limit <n>` | Maximum number of executions to return (default: 20) |
246
+ | `--status <status>` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
247
+ | `--json` | Output raw JSON |
248
+ | `--api-url <url>` | Override the API base URL |
249
+
250
+ **Example:**
251
+
252
+ ```bash
253
+ elevasis-sdk executions onboard-client --limit 5
254
+ ```
255
+
256
+ ```
257
+ exec_abc001 completed 2026-02-25 14:32:01 1.2s
258
+ exec_abc002 completed 2026-02-25 13:18:44 0.9s
259
+ exec_abc003 failed 2026-02-25 12:05:22 0.3s
260
+ exec_abc004 completed 2026-02-24 17:51:09 1.8s
261
+ exec_abc005 completed 2026-02-24 16:30:55 1.1s
262
+ ```
263
+
264
+ ---
265
+
266
+ ## elevasis-sdk execution
267
+
268
+ View full detail for a single execution.
269
+
270
+ **Synopsis:**
271
+
272
+ ```
273
+ elevasis-sdk execution <resource> <id>
274
+ ```
275
+
276
+ **Behavior:**
277
+
278
+ - Shows the complete execution record: input, output, logs, duration, and error (if any)
279
+ - Use `--json` to get the raw JSON response for programmatic use
280
+
281
+ **Flags:**
282
+
283
+ | Flag | Description |
284
+ | ------------------- | ------------------------- |
285
+ | `--json` | Output raw JSON |
286
+ | `--api-url <url>` | Override the API base URL |
287
+
288
+ **Example:**
289
+
290
+ ```bash
291
+ elevasis-sdk execution onboard-client exec_abc001
292
+ ```
293
+
294
+ ```
295
+ Resource: onboard-client
296
+ Status: completed
297
+ Started: 2026-02-25 14:32:01
298
+ Duration: 1.2s
299
+
300
+ Input:
301
+ {
302
+ "clientName": "Jane",
303
+ "email": "jane@example.com"
304
+ }
305
+
306
+ Output:
307
+ {
308
+ "success": true,
309
+ "clientId": "client_1708521600000",
310
+ "welcomeEmailSent": true
311
+ }
312
+
313
+ Logs:
314
+ [14:32:01.123] Starting onboard-client workflow
315
+ [14:32:01.456] Created client record
316
+ [14:32:01.891] Welcome email sent to jane@example.com
317
+ ```
318
+
319
+ ---
320
+
321
+ ## elevasis-sdk deployments
322
+
323
+ List all deployments for your organization.
324
+
325
+ **Synopsis:**
326
+
327
+ ```
328
+ elevasis-sdk deployments
329
+ ```
330
+
331
+ **Behavior:**
332
+
333
+ - Shows deployment history with status, timestamp, and resource count
334
+ - Active deployment is marked; previous deployments show as `stopped`
335
+
336
+ **Flags:**
337
+
338
+ | Flag | Description |
339
+ | ------------------- | ------------------------- |
340
+ | `--json` | Output raw JSON |
341
+ | `--api-url <url>` | Override the API base URL |
342
+
343
+ **Example output:**
344
+
345
+ ```
346
+ $ elevasis-sdk deployments
347
+
348
+ deploy_abc123 active 2026-02-25 14:00:00 4 resources
349
+ deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
350
+ deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
351
+ ```
352
+
353
+ ---
354
+
355
+ ## elevasis-sdk describe
356
+
357
+ Show the definition of a deployed resource.
358
+
359
+ **Synopsis:**
360
+
361
+ ```
362
+ elevasis-sdk describe <resource>
363
+ ```
364
+
365
+ **Behavior:**
366
+
367
+ - Displays resource metadata: name, type, description, status, and domains
368
+ - Shows the full `inputSchema` and `outputSchema` as JSON
369
+ - Type is color-coded: yellow for workflows, magenta for agents
370
+
371
+ **Flags:**
372
+
373
+ | Flag | Description |
374
+ | ------------------- | ------------------------- |
375
+ | `--json` | Output raw JSON response |
376
+ | `--api-url <url>` | Override the API base URL |
377
+
378
+ **Example:**
379
+
380
+ ```bash
381
+ elevasis-sdk describe onboard-client
382
+ ```
383
+
384
+ ```
385
+ onboard-client [workflow]
386
+
387
+ Name: Onboard Client
388
+ Description: Creates a client record and sends a welcome email
389
+ Status: prod
390
+ Domains: crm, email
391
+
392
+ Input Schema:
393
+ {
394
+ "type": "object",
395
+ "properties": {
396
+ "clientName": { "type": "string" },
397
+ "email": { "type": "string", "format": "email" }
398
+ },
399
+ "required": ["clientName", "email"]
400
+ }
401
+ ```
402
+
403
+ ---
404
+
405
+ ## elevasis-sdk creds
406
+
407
+ Manage credentials for your project.
408
+
409
+ **Synopsis:**
410
+
411
+ ```
412
+ elevasis-sdk creds list
413
+ elevasis-sdk creds set <key> <value>
414
+ elevasis-sdk creds remove <key>
415
+ ```
416
+
417
+ **Behavior:**
418
+
419
+ - `list` -- display all credentials configured for the project
420
+ - `set` -- add or update a credential
421
+ - `remove` -- delete a credential
422
+
423
+ **Flags:**
424
+
425
+ | Flag | Description |
426
+ | ------------------- | ------------------------- |
427
+ | `--api-url <url>` | Override the API base URL |
428
+
429
+ **Examples:**
430
+
431
+ ```bash
432
+ elevasis-sdk creds list
433
+ elevasis-sdk creds set OPENAI_API_KEY sk-proj-***
434
+ elevasis-sdk creds remove OPENAI_API_KEY
435
+ ```
436
+
437
+ ---
438
+
439
+ ## elevasis-sdk rename
440
+
441
+ Rename a resource ID across all reference tables in the platform database.
442
+
443
+ **Synopsis:**
444
+
445
+ ```
446
+ elevasis-sdk rename <old-id> --to <new-id> [--execute] [--prod]
447
+ ```
448
+
449
+ **Behavior:**
450
+
451
+ - Dry-run by default -- shows all affected rows per table without modifying any data
452
+ - Pass `--execute` to perform the rename
453
+ - Org-scoped: only updates rows belonging to your organization
454
+ - Updates resource references across 6 tables:
455
+
456
+ | Table | Column(s) updated |
457
+ | -------------------- | ----------------- |
458
+ | `executions` | `resource_id` |
459
+ | `sessions` | `resource_id` |
460
+ | `workflow_configs` | `resource_id` |
461
+ | `workflow_schedules` | `resource_id` |
462
+ | `execution_events` | `resource_id` |
463
+ | `session_events` | `resource_id` |
464
+
465
+ **Flags:**
466
+
467
+ | Flag | Description |
468
+ | ------------------- | --------------------------------------- |
469
+ | `--to <new-id>` | Required. The new resource ID |
470
+ | `--execute` | Perform the rename (default is dry-run) |
471
+ | `--prod` | Target the production environment |
472
+ | `--api-url <url>` | Override the API base URL |
473
+
474
+ **Example (dry-run):**
475
+
476
+ ```bash
477
+ elevasis-sdk rename ist-upload-workflow --to ist-upload-contacts-workflow
478
+ ```
479
+
480
+ ```
481
+ Dry run — no changes made.
482
+
483
+ Rows that would be updated:
484
+ executions 6
485
+ sessions 0
486
+ workflow_configs 0
487
+ workflow_schedules 0
488
+ execution_events 0
489
+ session_events 0
490
+
491
+ Total: 6 rows
492
+
493
+ Re-run with --execute to apply changes.
494
+ ```
495
+
496
+ **Example (execute):**
497
+
498
+ ```bash
499
+ elevasis-sdk rename ist-upload-workflow --to ist-upload-contacts-workflow --execute
500
+ ```
501
+
502
+ **Implementation:** `packages/sdk/src/cli/commands/rename.ts` -- delegates to `POST /api/external/resources/rename`
503
+
504
+ ---
505
+
506
+ ## elevasis-sdk project:\*
507
+
508
+ `elevasis-sdk project:*` is the canonical project-management surface. Use it for project, milestone, task, and note operations whether the caller is a human, a scripted workflow, or a slash-command router like `/project`.
509
+
510
+ This CLI family is SDK-first, but it is not semantically standalone. It operates on the same Organization OS contract that the shared delivery UI uses:
511
+
512
+ - UI manifest key: `delivery`
513
+ - Organization model feature ID: `projects`
514
+ - Default surface: `projects.index`
515
+ - Semantic domain fields: `organizationModel.delivery`
516
+ - Core entity/capability IDs: `delivery.project`, `delivery.milestone`, `delivery.task`, `delivery.projects.view`
517
+
518
+ ### Projects
519
+
520
+ ```bash
521
+ elevasis-sdk project:list
522
+ elevasis-sdk project:get <id>
523
+ elevasis-sdk project:create --name "Website Refresh" --kind client_engagement
524
+ elevasis-sdk project:update <id> --status completed
525
+ elevasis-sdk project:delete <id>
526
+ ```
527
+
528
+ **Behavior:**
529
+
530
+ - `project:list` filters by `--kind` and `--status`
531
+ - `project:get` returns a single project
532
+ - `project:create` and `project:update` operate on `/api/external/projects`
533
+
534
+ ### Milestones
535
+
536
+ ```bash
537
+ elevasis-sdk project:milestone:list --project <id>
538
+ elevasis-sdk project:milestone:create --project <id> --name "Phase 1"
539
+ elevasis-sdk project:milestone:update <id> --status completed
540
+ elevasis-sdk project:milestone:update <id> --description "Updated scope description"
541
+ elevasis-sdk project:milestone:delete <id>
542
+ ```
543
+
544
+ `project:milestone:update` accepts `--description` to set or clear the milestone description. Passing an empty string clears the field, matching `project:task:update --description` semantics.
545
+
546
+ ### Tasks
547
+
548
+ ```bash
549
+ elevasis-sdk project:task:list --project <id>
550
+ elevasis-sdk project:task:get <id>
551
+ elevasis-sdk project:task:create --project <id> --title "Implement API"
552
+ elevasis-sdk project:task:update <id> --status in_progress
553
+ elevasis-sdk project:task:delete <id>
554
+ ```
555
+
556
+ Task commands also expose agent-oriented resume state:
557
+
558
+ ```bash
559
+ elevasis-sdk project:task:resume <id> --pretty
560
+ elevasis-sdk project:task:save <id> --current-state "Implemented the route layer"
561
+ ```
562
+
563
+ - `project:task:resume` reads the task's `resume_context`
564
+ - `project:task:save` merges fields into `resume_context`
565
+ - these commands are the CLI counterpart to `/work resume` and `/work save` style flows
566
+
567
+ ### Notes
568
+
569
+ ```bash
570
+ elevasis-sdk project:note:list --project <id>
571
+ elevasis-sdk project:note:create --project <id> --content "Client approved scope"
572
+ elevasis-sdk project:note:create --project <id> --type agent_learning --content "Learned X"
573
+ elevasis-sdk project:note:update <id> --content "Updated status"
574
+ elevasis-sdk project:note:delete <id>
575
+ ```
576
+
577
+ The `--type` flag accepts: `call_note`, `status_update`, `issue`, `blocker`, `agent_learning`. The `agent_learning` type is the canonical way for agents to record durable skill observations. Accepted values are derived from `NoteTypeSchema` in `packages/core/src/projects/api-schemas.ts` -- that schema is the source of truth; the CLI help text is generated from it to prevent drift.
578
+
579
+ ### Requests
580
+
581
+ ```bash
582
+ elevasis-sdk request:submit --input-file ./tmp/request-report.json
583
+ elevasis-sdk request:submit --input '{"type":"bug","category":"sdk","severity":"high","title":"..."}'
584
+ ```
585
+
586
+ Submits a structured request report to `POST /api/external/requests`. The payload is validated against `CreateRequestInputSchema` before the network call.
587
+
588
+ **Payload enum values** (inline in `--help` output; sourced from `packages/core/src/requests/api-schemas.ts`):
589
+
590
+ | Field | Accepted values |
591
+ | ---------- | ------------------------------------------------------------------------------------- |
592
+ | `type` | Values from `RequestTypeEnum` -- see `request:submit --help` for the current list |
593
+ | `category` | Values from `RequestCategoryEnum` -- see `request:submit --help` for the current list |
594
+ | `severity` | Values from `RequestSeverityEnum` -- see `request:submit --help` for the current list |
595
+
596
+ **Flags:**
597
+
598
+ | Flag | Description |
599
+ | --------------------------- | ----------------------------------------------------------------------------- |
600
+ | `-i, --input <json>` | Request body as JSON string |
601
+ | `-f, --input-file <path>` | Read body from a JSON file; relative paths resolve against the project root |
602
+ | `--pretty` | Human-readable output instead of raw JSON |
603
+ | `--cleanup-input` | Delete the input file after success (only files under `<projectRoot>/tmp/`) |
604
+ | `--api-url <url>` | Override the API base URL |
605
+
606
+ ---
607
+
608
+ ### Shared Flags
609
+
610
+ Most `project:*` commands support:
611
+
612
+ | Flag | Description |
613
+ | ----------------- | -------------------------------------------------- |
614
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
615
+ | `--api-url <url>` | Override the API base URL |
616
+
617
+ For exact required flags and accepted enum values, see the command source under `packages/sdk/src/cli/commands/project/`.
618
+
619
+ ### Command Boundary
620
+
621
+ - `/project` is a convenience router to these `elevasis-sdk project:*` commands. It is not a separate project system.
622
+ - `/work` is for docs-backed in-progress task tracking and session resume, not project CRUD.
623
+ - `/external` is for managing standalone apps in `external/`, not project records inside a deployed system.
624
+ - `/adev` is for implementation, debugging, testing, and platform execution flows. Use it when you need to build or run agent/workflow code rather than update project data.
625
+
626
+ ---
627
+
628
+ ## elevasis-sdk note:\*
629
+
630
+ `elevasis-sdk note:*` is the agent-facing surface for pushing and reading personal user notes. Workflows and agents use it to surface information -- such as "deal X stalled" or "review run completed" -- directly into a user's Notes panel in the Command Center, without sending an email or notification.
631
+
632
+ Notes are personal to the target user and scoped to the calling organization. The external API surface exposes `GET + POST` only; `note:update` and `note:delete` are not yet available via SDK CLI. Users edit and delete notes through the right-panel view in the Command Center.
633
+
634
+ ### note:create
635
+
636
+ Create a personal note for a user.
637
+
638
+ **Synopsis:**
639
+
640
+ ```
641
+ elevasis-sdk note:create --content <text>
642
+ [--user <email>]
643
+ [--title <text>]
644
+ [--priority low|normal|high|urgent]
645
+ [--pinned]
646
+ [--source <id>]
647
+ [--api-url <url>] [--pretty]
648
+ ```
649
+
650
+ **Flags:**
651
+
652
+ | Flag | Description |
653
+ | ------------------------- | ----------------------------------------------------------------------------------------- |
654
+ | `--content <text>` | Required. The note body text |
655
+ | `--user <email>` | Target user email. Defaults to the API key owner when omitted |
656
+ | `--title <text>` | Optional note title |
657
+ | `--priority <priority>` | Priority level: `low`, `normal` (default), `high`, or `urgent` |
658
+ | `--pinned` | Pin the note to the top of the panel |
659
+ | `--source <id>` | Source identifier -- set this to the workflow or agent ID when calling from agent runtime |
660
+ | `--api-url <url>` | Override the API base URL |
661
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
662
+
663
+ **Behavior:**
664
+
665
+ - Posts to `POST /api/external/user-notes`
666
+ - When `--user` is omitted the note is created for the identity bound to the API key (the caller)
667
+ - When `--user` is provided the platform resolves the email to a Supabase user UUID and verifies the resolved user is an active member of the calling organization before writing
668
+ - The `--source` flag is recorded as the `source` column in `user_notes`; agent runtimes should pass their resource ID here so users can see which workflow created the note
669
+ - Priority `normal` produces no badge in the UI; `high` renders orange, `urgent` renders red, `low` renders dimmed gray
670
+
671
+ **Examples:**
672
+
673
+ ```bash
674
+ # Create a note for the API key owner
675
+ elevasis-sdk note:create --content "Deal X has stalled -- follow up needed"
676
+
677
+ # Create a high-priority pinned note for a specific user
678
+ elevasis-sdk note:create \
679
+ --content "Review run completed for batch_abc123" \
680
+ --user ops@acme.com \
681
+ --priority high \
682
+ --pinned \
683
+ --source "report-review-workflow" \
684
+ --pretty
685
+ ```
686
+
687
+ ```
688
+ Note created
689
+ ID: note_550e8400-...
690
+ Priority: high
691
+ ```
692
+
693
+ ---
694
+
695
+ ### note:list
696
+
697
+ List notes for a user.
698
+
699
+ **Synopsis:**
700
+
701
+ ```
702
+ elevasis-sdk note:list --user <email>
703
+ [--priority <p>] [--pinned]
704
+ [--limit <n>] [--offset <n>]
705
+ [--api-url <url>] [--pretty]
706
+ ```
707
+
708
+ **Flags:**
709
+
710
+ | Flag | Description |
711
+ | ------------------------- | -------------------------------------------------------- |
712
+ | `--user <email>` | Required. The user whose notes to retrieve |
713
+ | `--priority <priority>` | Filter by priority: `low`, `normal`, `high`, or `urgent` |
714
+ | `--pinned` | Return only pinned notes |
715
+ | `--limit <n>` | Maximum number of results to return |
716
+ | `--offset <n>` | Pagination offset |
717
+ | `--api-url <url>` | Override the API base URL |
718
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
719
+
720
+ **Behavior:**
721
+
722
+ - Queries `GET /api/external/user-notes?user_email=<email>`
723
+ - `--user` is required -- the external GET endpoint requires an explicit user target
724
+ - Results are sorted by the platform: pinned first, then by priority (`urgent` > `high` > `normal` > `low`), then by most recently updated
725
+ - Organization scope is derived from the API key -- only notes belonging to users in the calling organization are returned
726
+
727
+ **Examples:**
728
+
729
+ ```bash
730
+ # List all notes for a user
731
+ elevasis-sdk note:list --user ops@acme.com
732
+
733
+ # List only high-priority pinned notes, human-readable
734
+ elevasis-sdk note:list --user ops@acme.com --priority high --pinned --pretty
735
+ ```
736
+
737
+ ```
738
+ Notes (2):
739
+
740
+ (no title) [pinned] [high]
741
+ ID: note_abc001
742
+ Review run completed for batch_abc123
743
+
744
+ Deal X stalled [pinned] [high]
745
+ ID: note_abc002
746
+ Deal X has stalled -- follow up needed
747
+ ```
748
+
749
+ ---
750
+
751
+ ### Shared Flags
752
+
753
+ | Flag | Description |
754
+ | ------------------- | -------------------------------------------------- |
755
+ | `--pretty` | Human-readable terminal output instead of raw JSON |
756
+ | `--api-url <url>` | Override the API base URL |
757
+
758
+ ### Command Boundary
759
+
760
+ - `note:create` and `note:list` operate on the **personal notes** surface -- not project notes. For project-scoped notes use `project:note:*`.
761
+ - `note:update` and `note:delete` are not yet available via SDK CLI. Edit and delete notes using the Notes panel in the Command Center.
762
+ - The Notes panel view (`NotesPanelView`) is registered in the right-panel registry alongside Overview, Recent Executions, and Notifications.
763
+
764
+ **Implementation:** `packages/sdk/src/cli/commands/notes.ts` -- delegates to `POST /api/external/user-notes` and `GET /api/external/user-notes`
765
+
766
+ ---
767
+
768
+ ## elevasis-sdk ui:use-local / ui:use-published
769
+
770
+ Switch the `@elevasis/ui` dependency in an external project between a local tarball build and the published npm package.
771
+
772
+ **Synopsis:**
773
+
774
+ ```bash
775
+ elevasis-sdk ui:use-local
776
+ elevasis-sdk ui:use-published
777
+ ```
778
+
779
+ **Behavior:**
780
+
781
+ - `ui:use-local` -- builds a tarball from the local `packages/ui/` source and rewrites the project's `package.json` to point at the tarball path. Use this during active `@elevasis/ui` development to test changes without publishing.
782
+ - `ui:use-published` -- reverts `package.json` to the published `@elevasis/ui` version string and removes any local tarball reference.
783
+
784
+ Both commands install after rewriting `package.json`. The `external/_template` root scripts `ui:use-local` and `ui:use-published` are compatibility wrappers that delegate to these CLI commands.
785
+
786
+ **Implementation:** `packages/sdk/src/cli/commands/ui/ui-switcher.ts`
787
+
788
+ ---
789
+
790
+ ## Global Flags
791
+
792
+ These flags are accepted by all commands:
793
+
794
+ | Flag | Description |
795
+ | ------------------- | --------------------------------------------------------------------------------------------------- |
796
+ | `--api-url <url>` | Override the API base URL. Priority: flag > `ELEVASIS_API_URL` env var > `NODE_ENV`-based default |
797
+ | `--json` | Output raw JSON (available on most commands) |
798
+
799
+ **API base URL resolution:**
800
+
801
+ - Production (default): `https://api.elevasis.io`
802
+ - Development (`NODE_ENV=development`): `http://localhost:<port>`
803
+ - Override: set `ELEVASIS_API_URL` or pass `--api-url`
804
+ - Force production: pass `--prod` on `deploy` (overrides `NODE_ENV=development`)
805
+
806
+ ---
807
+
808
+ **Last Updated:** 2026-04-17