@camunda8/cli 3.3.0 → 3.4.0-alpha.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.
- package/EXAMPLES.md +18 -1605
- package/README.md +32 -1711
- package/dist/default-plugins/element-template/AGENTS.md +19 -4
- package/dist/default-plugins/element-template/c8ctl-plugin.js +328 -130
- package/dist/framework/command-registry.js +1 -1
- package/dist/framework/command-registry.js.map +1 -1
- package/package.json +1 -1
package/EXAMPLES.md
CHANGED
|
@@ -1,1607 +1,20 @@
|
|
|
1
1
|
# c8ctl Examples
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- [Session Management](#session-management)
|
|
22
|
-
- [Plugin Management](#plugin-management)
|
|
23
|
-
- [Local Cluster](#local-cluster)
|
|
24
|
-
- [Which](#which)
|
|
25
|
-
- [Doctor](#doctor)
|
|
26
|
-
- [Agent / Programmatic Consumption](#agent--programmatic-consumption)
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Process Instances
|
|
31
|
-
|
|
32
|
-
### List All Process Instances
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
c8 list pi
|
|
36
|
-
c8 list process-instances
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### List Process Instances with Filter
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# Filter by BPMN process ID
|
|
43
|
-
c8 list pi --id=order-process
|
|
44
|
-
|
|
45
|
-
# Filter by state
|
|
46
|
-
c8 list pi --state=ACTIVE
|
|
47
|
-
|
|
48
|
-
# Filter by process definition version
|
|
49
|
-
c8 list pi --id=order-process --version=2
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Get Process Instance by Key
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
c8 get pi 2251799813685249
|
|
56
|
-
c8 get process-instance 2251799813685249
|
|
57
|
-
|
|
58
|
-
# Get process instance with variables
|
|
59
|
-
c8 get pi 2251799813685249 --variables
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Create Process Instance
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Create with process ID
|
|
66
|
-
c8 create pi --id=order-process
|
|
67
|
-
|
|
68
|
-
# Create with specific version
|
|
69
|
-
c8 create pi --id=order-process --version=2
|
|
70
|
-
|
|
71
|
-
# Create with variables
|
|
72
|
-
c8 create pi --id=order-process --variables='{"orderId":"12345","amount":100}'
|
|
73
|
-
|
|
74
|
-
# Create and wait for completion
|
|
75
|
-
c8 create pi --id=order-process --awaitCompletion
|
|
76
|
-
|
|
77
|
-
# Create and wait with custom timeout (30 seconds)
|
|
78
|
-
c8 create pi --id=order-process --awaitCompletion --requestTimeout=30000
|
|
79
|
-
|
|
80
|
-
# Note: --fetchVariables is reserved for future API support
|
|
81
|
-
# All variables are currently returned by default
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Await Process Instance Completion
|
|
85
|
-
|
|
86
|
-
The `await` command is an alias for `create` with `--awaitCompletion`. It uses the Camunda 8 API's built-in server-side waiting to create a process instance and wait for completion.
|
|
87
|
-
|
|
88
|
-
The `--requestTimeout` option specifies the maximum time in milliseconds to wait for the process instance to complete. By default (or when set to 0), the generic request timeout configured in the cluster is used.
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# Create and wait for completion (shorthand)
|
|
92
|
-
c8 await pi --id=order-process
|
|
93
|
-
c8 await process-instance --id=order-process
|
|
94
|
-
|
|
95
|
-
# With variables
|
|
96
|
-
c8 await pi --id=order-process --variables='{"orderId":"12345"}'
|
|
97
|
-
|
|
98
|
-
# With custom timeout (60 seconds)
|
|
99
|
-
c8 await pi --id=order-process --requestTimeout=60000
|
|
100
|
-
|
|
101
|
-
# Equivalent to:
|
|
102
|
-
c8 create pi --id=order-process --awaitCompletion
|
|
103
|
-
|
|
104
|
-
# Note: --fetchVariables is reserved for future API support
|
|
105
|
-
# All variables are currently returned by default
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Cancel Process Instance
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
c8 cancel pi 2251799813685249
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## User Tasks
|
|
117
|
-
|
|
118
|
-
### List All User Tasks
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
c8 list ut
|
|
122
|
-
c8 list user-tasks
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### List User Tasks with Filter
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Filter by state
|
|
129
|
-
c8 list ut --state=CREATED
|
|
130
|
-
|
|
131
|
-
# Filter by assignee
|
|
132
|
-
c8 list ut --assignee=john.doe
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Complete User Task
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
# Complete without variables
|
|
139
|
-
c8 complete ut 2251799813685250
|
|
140
|
-
|
|
141
|
-
# Complete with variables
|
|
142
|
-
c8 complete ut 2251799813685250 --variables='{"approved":true,"notes":"Looks good"}'
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Incidents
|
|
148
|
-
|
|
149
|
-
### List All Incidents
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
c8 list inc
|
|
153
|
-
c8 list incidents
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### List Incidents with Filter
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
# Filter by state
|
|
160
|
-
c8 list inc --state=ACTIVE
|
|
161
|
-
|
|
162
|
-
# Filter by process instance
|
|
163
|
-
c8 list inc --processInstanceKey=2251799813685249
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Get Incident by Key
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
c8 get inc 2251799813685251
|
|
170
|
-
c8 get incident 2251799813685251
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
### Resolve Incident
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
c8 resolve inc 2251799813685251
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## Jobs
|
|
182
|
-
|
|
183
|
-
### List All Jobs
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
c8 list jobs
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### List Jobs with Filter
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
# Filter by type
|
|
193
|
-
c8 list jobs --type=email-service
|
|
194
|
-
|
|
195
|
-
# Filter by state
|
|
196
|
-
c8 list jobs --state=ACTIVATABLE
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Activate Jobs
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
# Activate jobs of a specific type
|
|
203
|
-
c8 activate jobs email-service
|
|
204
|
-
|
|
205
|
-
# Activate with options
|
|
206
|
-
c8 activate jobs email-service --maxJobsToActivate=20 --timeout=120000 --worker=my-worker
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Complete Job
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Complete without variables
|
|
213
|
-
c8 complete job 2251799813685252
|
|
214
|
-
|
|
215
|
-
# Complete with variables
|
|
216
|
-
c8 complete job 2251799813685252 --variables='{"emailSent":true,"timestamp":"2024-01-15T10:30:00Z"}'
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Fail Job
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# Fail job with default message
|
|
223
|
-
c8 fail job 2251799813685252
|
|
224
|
-
|
|
225
|
-
# Fail job with custom message and retries
|
|
226
|
-
c8 fail job 2251799813685252 --retries=3 --errorMessage="Email service unavailable"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## Search
|
|
232
|
-
|
|
233
|
-
The `search` command provides powerful filtering across all major resource types. Unlike `list`, which shows resources with basic filters, `search` supports fine-grained query options including wildcard matching and case-insensitive search. All search commands respect the active tenant and profile.
|
|
234
|
-
|
|
235
|
-
### Wildcard Search
|
|
236
|
-
|
|
237
|
-
String filters support wildcard matching using the `$like` operator (applied automatically when wildcards are detected):
|
|
238
|
-
|
|
239
|
-
- `*` — matches zero, one, or multiple characters
|
|
240
|
-
- `?` — matches exactly one character
|
|
241
|
-
- Escape with backslash: `\*` or `\?`
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
# Find process definitions with names containing "order"
|
|
245
|
-
c8 search pd --name='*order*'
|
|
246
|
-
|
|
247
|
-
# Find process definitions starting with "main"
|
|
248
|
-
c8 search pd --name='main*'
|
|
249
|
-
|
|
250
|
-
# Find jobs with type matching a pattern
|
|
251
|
-
c8 search jobs --type='*-service'
|
|
252
|
-
|
|
253
|
-
# Find variables with names matching a pattern
|
|
254
|
-
c8 search variables --name='order*'
|
|
255
|
-
|
|
256
|
-
# Single character wildcard
|
|
257
|
-
c8 search pd --id='process-v?'
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
**Wildcard-capable fields per resource:**
|
|
261
|
-
|
|
262
|
-
| Resource | Fields supporting wildcards |
|
|
263
|
-
|---|---|
|
|
264
|
-
| Process Definitions | `--name`, `--id` (bpmnProcessId) |
|
|
265
|
-
| Process Instances | `--id` (processDefinitionId) |
|
|
266
|
-
| User Tasks | `--assignee` |
|
|
267
|
-
| Incidents | `--errorMessage`, `--id` (processDefinitionId) |
|
|
268
|
-
| Jobs | `--type` |
|
|
269
|
-
| Variables | `--name`, `--value` |
|
|
270
|
-
| Wait States | `--elementId` |
|
|
271
|
-
|
|
272
|
-
### Case-Insensitive Search
|
|
273
|
-
|
|
274
|
-
For case-insensitive matching, prefix the flag name with `i` (e.g., `--name` becomes `--iname`). Case-insensitive filtering is performed client-side after fetching results from the server, so it works with wildcards too.
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
# Case-insensitive name search — matches "order", "Order", "ORDER", etc.
|
|
278
|
-
c8 search pd --iname=order
|
|
279
|
-
|
|
280
|
-
# Case-insensitive wildcard search
|
|
281
|
-
c8 search pd --iname='*ORDER*'
|
|
282
|
-
|
|
283
|
-
# Case-insensitive assignee search
|
|
284
|
-
c8 search ut --iassignee=John
|
|
285
|
-
|
|
286
|
-
# Case-insensitive job type search
|
|
287
|
-
c8 search jobs --itype='*Service*'
|
|
288
|
-
|
|
289
|
-
# Case-insensitive error message search
|
|
290
|
-
c8 search inc --ierrorMessage='*timeout*'
|
|
291
|
-
|
|
292
|
-
# Case-insensitive variable name and value
|
|
293
|
-
c8 search variables --iname='OrderId'
|
|
294
|
-
c8 search variables --ivalue='*pending*'
|
|
295
|
-
|
|
296
|
-
# Combine case-insensitive with regular (case-sensitive) filters
|
|
297
|
-
c8 search pd --iname='*order*' --key=2251799813685249
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**Case-insensitive flags per resource:**
|
|
301
|
-
|
|
302
|
-
| Resource | Case-insensitive flags |
|
|
303
|
-
|---|---|
|
|
304
|
-
| Process Definitions | `--iname`, `--iid` |
|
|
305
|
-
| Process Instances | `--iid` |
|
|
306
|
-
| User Tasks | `--iassignee` |
|
|
307
|
-
| Incidents | `--ierrorMessage`, `--iid` |
|
|
308
|
-
| Jobs | `--itype` |
|
|
309
|
-
| Variables | `--iname`, `--ivalue` |
|
|
310
|
-
|
|
311
|
-
> **Note:** Case-insensitive filtering fetches up to 1000 results from the server and filters client-side. For very large result sets, consider combining with other (case-sensitive) filters to narrow results.
|
|
312
|
-
|
|
313
|
-
### Search Process Definitions
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
# Search by BPMN process ID
|
|
317
|
-
c8 search pd --id=order-process
|
|
318
|
-
c8 search process-definitions --bpmnProcessId=order-process
|
|
319
|
-
|
|
320
|
-
# Search by name
|
|
321
|
-
c8 search pd --name=Order
|
|
322
|
-
|
|
323
|
-
# Search by version
|
|
324
|
-
c8 search pd --id=order-process --version=2
|
|
325
|
-
|
|
326
|
-
# Search by key
|
|
327
|
-
c8 search pd --key=2251799813685249
|
|
328
|
-
|
|
329
|
-
# Combine filters
|
|
330
|
-
c8 search pd --id=order-process --name=Order
|
|
331
|
-
|
|
332
|
-
# Using a specific profile
|
|
333
|
-
c8 search pd --id=order-process --profile=prod
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### Search Process Instances
|
|
337
|
-
|
|
338
|
-
```bash
|
|
339
|
-
# Search by state
|
|
340
|
-
c8 search pi --state=ACTIVE
|
|
341
|
-
c8 search pi --state=COMPLETED
|
|
342
|
-
|
|
343
|
-
# Search by process definition ID
|
|
344
|
-
c8 search pi --id=order-process
|
|
345
|
-
c8 search pi --bpmnProcessId=order-process
|
|
346
|
-
|
|
347
|
-
# Search by process definition version
|
|
348
|
-
c8 search pi --id=order-process --version=2
|
|
349
|
-
|
|
350
|
-
# Search by process definition key
|
|
351
|
-
c8 search pi --processDefinitionKey=2251799813685249
|
|
352
|
-
|
|
353
|
-
# Search by process instance key
|
|
354
|
-
c8 search pi --key=2251799813685260
|
|
355
|
-
|
|
356
|
-
# Search by parent process instance (for call activities)
|
|
357
|
-
c8 search pi --parentProcessInstanceKey=2251799813685250
|
|
358
|
-
|
|
359
|
-
# Combine filters
|
|
360
|
-
c8 search pi --id=order-process --state=ACTIVE
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### Search User Tasks
|
|
364
|
-
|
|
365
|
-
```bash
|
|
366
|
-
# Search by state
|
|
367
|
-
c8 search ut --state=CREATED
|
|
368
|
-
c8 search ut --state=COMPLETED
|
|
369
|
-
|
|
370
|
-
# Search by assignee
|
|
371
|
-
c8 search ut --assignee=john.doe
|
|
372
|
-
|
|
373
|
-
# Search by process instance
|
|
374
|
-
c8 search ut --processInstanceKey=2251799813685249
|
|
375
|
-
|
|
376
|
-
# Search by process definition key
|
|
377
|
-
c8 search ut --processDefinitionKey=2251799813685249
|
|
378
|
-
|
|
379
|
-
# Search by element ID (BPMN element)
|
|
380
|
-
c8 search ut --elementId=UserTask_Approve
|
|
381
|
-
|
|
382
|
-
# Combine filters
|
|
383
|
-
c8 search ut --state=CREATED --assignee=john.doe
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### Search Incidents
|
|
387
|
-
|
|
388
|
-
```bash
|
|
389
|
-
# Search by state
|
|
390
|
-
c8 search inc --state=ACTIVE
|
|
391
|
-
c8 search incidents --state=ACTIVE
|
|
392
|
-
|
|
393
|
-
# Search by process instance
|
|
394
|
-
c8 search inc --processInstanceKey=2251799813685249
|
|
395
|
-
|
|
396
|
-
# Search by process definition key
|
|
397
|
-
c8 search inc --processDefinitionKey=2251799813685249
|
|
398
|
-
|
|
399
|
-
# Search by error type
|
|
400
|
-
c8 search inc --errorType=JOB_NO_RETRIES
|
|
401
|
-
|
|
402
|
-
# Search by error message (with wildcard)
|
|
403
|
-
c8 search inc --errorMessage='*timeout*'
|
|
404
|
-
|
|
405
|
-
# Combine filters
|
|
406
|
-
c8 search inc --state=ACTIVE --errorType=JOB_NO_RETRIES
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
### Search Jobs
|
|
410
|
-
|
|
411
|
-
```bash
|
|
412
|
-
# Search by type
|
|
413
|
-
c8 search jobs --type=email-service
|
|
414
|
-
|
|
415
|
-
# Search by state
|
|
416
|
-
c8 search jobs --state=CREATED
|
|
417
|
-
c8 search jobs --state=FAILED
|
|
418
|
-
|
|
419
|
-
# Search by process instance
|
|
420
|
-
c8 search jobs --processInstanceKey=2251799813685249
|
|
421
|
-
|
|
422
|
-
# Search by process definition key
|
|
423
|
-
c8 search jobs --processDefinitionKey=2251799813685249
|
|
424
|
-
|
|
425
|
-
# Combine filters
|
|
426
|
-
c8 search jobs --type=email-service --state=CREATED
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
### Search Variables
|
|
430
|
-
|
|
431
|
-
```bash
|
|
432
|
-
# Search by variable name
|
|
433
|
-
c8 search variables --name=orderId
|
|
434
|
-
|
|
435
|
-
# Search by variable value
|
|
436
|
-
c8 search variables --value=12345
|
|
437
|
-
|
|
438
|
-
# Search by process instance
|
|
439
|
-
c8 search variables --processInstanceKey=2251799813685249
|
|
440
|
-
|
|
441
|
-
# Search by scope key
|
|
442
|
-
c8 search variables --scopeKey=2251799813685260
|
|
443
|
-
|
|
444
|
-
# Show full (non-truncated) variable values
|
|
445
|
-
c8 search variables --name=orderPayload --fullValue
|
|
446
|
-
|
|
447
|
-
# Combine filters
|
|
448
|
-
c8 search variables --name=orderId --processInstanceKey=2251799813685249
|
|
449
|
-
|
|
450
|
-
# Combine name and full value
|
|
451
|
-
c8 search variables --name=orderPayload --processInstanceKey=2251799813685249 --fullValue
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
**Note**: By default, long variable values are truncated in the output. Truncated values are marked with a `✓` in the "Truncated" column. Use `--fullValue` to see the complete values.
|
|
455
|
-
|
|
456
|
-
### Search Wait States
|
|
457
|
-
|
|
458
|
-
```bash
|
|
459
|
-
# Search all wait states
|
|
460
|
-
c8 search wait-state
|
|
461
|
-
|
|
462
|
-
# Search wait states by type
|
|
463
|
-
c8 search ws --waitStateType=JOB
|
|
464
|
-
c8 search ws --waitStateType=MESSAGE
|
|
465
|
-
c8 search ws --waitStateType=TIMER
|
|
466
|
-
|
|
467
|
-
# Search wait states by BPMN element type
|
|
468
|
-
c8 search ws --elementType=SERVICE_TASK
|
|
469
|
-
c8 search ws --elementType=USER_TASK
|
|
470
|
-
|
|
471
|
-
# Filter by process instance
|
|
472
|
-
c8 search ws --processInstanceKey=2251799813685249
|
|
473
|
-
|
|
474
|
-
# Filter by element ID
|
|
475
|
-
c8 search ws --elementId=serviceTask1
|
|
476
|
-
|
|
477
|
-
# Combine filters
|
|
478
|
-
c8 search ws --processInstanceKey=2251799813685249 --waitStateType=JOB
|
|
479
|
-
c8 search ws --elementType=SERVICE_TASK --waitStateType=JOB
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
### Search Output
|
|
483
|
-
|
|
484
|
-
Search results are displayed as tables in text mode:
|
|
485
|
-
|
|
486
|
-
```bash
|
|
487
|
-
# Text mode (default)
|
|
488
|
-
c8 search pi --state=ACTIVE
|
|
489
|
-
# Key | Process ID | State | Version | Tenant ID
|
|
490
|
-
# 2251799813685260 | order-process | ACTIVE | 3 | <default>
|
|
491
|
-
# 2251799813685270 | order-process | ACTIVE | 3 | <default>
|
|
492
|
-
# Found 2 process instance(s)
|
|
493
|
-
|
|
494
|
-
# JSON mode
|
|
495
|
-
c8 output json
|
|
496
|
-
c8 search pi --state=ACTIVE
|
|
497
|
-
# [{"processInstanceKey":"2251799813685260",...}, ...]
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
---
|
|
501
|
-
|
|
502
|
-
## Messages
|
|
503
|
-
|
|
504
|
-
### Publish Message
|
|
505
|
-
|
|
506
|
-
```bash
|
|
507
|
-
# Publish simple message
|
|
508
|
-
c8 publish msg order-placed
|
|
509
|
-
|
|
510
|
-
# Publish with correlation key
|
|
511
|
-
c8 publish msg order-placed --correlationKey=order-12345
|
|
512
|
-
|
|
513
|
-
# Publish with variables
|
|
514
|
-
c8 publish msg order-placed --correlationKey=order-12345 --variables='{"orderId":"12345","total":250.00}'
|
|
515
|
-
|
|
516
|
-
# Publish with time-to-live
|
|
517
|
-
c8 publish msg order-placed --correlationKey=order-12345 --timeToLive=3600000
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
### Correlate Message
|
|
521
|
-
|
|
522
|
-
Correlate delivers a message to a specific waiting process instance. Unlike
|
|
523
|
-
`publish` (where `--correlationKey` is optional), `correlate` requires it.
|
|
524
|
-
|
|
525
|
-
```bash
|
|
526
|
-
# Correlate a message to a specific process instance
|
|
527
|
-
c8 correlate msg payment-received --correlationKey=order-12345 --variables='{"amount":250.00}'
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
---
|
|
531
|
-
|
|
532
|
-
## Deployments
|
|
533
|
-
|
|
534
|
-
### Deploy Single File
|
|
535
|
-
|
|
536
|
-
```bash
|
|
537
|
-
c8 deploy ./process.bpmn
|
|
538
|
-
c8 deploy ./decision.dmn
|
|
539
|
-
c8 deploy ./form.form
|
|
540
|
-
```
|
|
541
|
-
|
|
542
|
-
### Deploy Multiple Files
|
|
543
|
-
|
|
544
|
-
```bash
|
|
545
|
-
c8 deploy ./process1.bpmn ./process2.bpmn ./decision.dmn
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
### Deploy Directory
|
|
549
|
-
|
|
550
|
-
```bash
|
|
551
|
-
# Deploy current directory
|
|
552
|
-
c8 deploy
|
|
553
|
-
|
|
554
|
-
# Deploys all files in specified directory and subdirectories
|
|
555
|
-
c8 deploy ./my-project
|
|
556
|
-
|
|
557
|
-
# Building block folders (containing _bb- in name) are prioritized and marked with 🧱
|
|
558
|
-
# Process applications (folders with .process-application file) are marked with 📦
|
|
559
|
-
# Example output:
|
|
560
|
-
# Deploying 4 resource(s)...
|
|
561
|
-
# ✓ Deployment successful [Key: 123456789]
|
|
562
|
-
#
|
|
563
|
-
# File | Type | ID | Version | Key
|
|
564
|
-
# ----------------------------------|---------|-----------------|---------|-------------------
|
|
565
|
-
# 🧱 _bb-shared/common-process.bpmn | Process | common-process | 1 | 2251799813685249
|
|
566
|
-
# 📦 my-app/process.bpmn | Process | my-proc | 1 | 2251799813685250
|
|
567
|
-
# 📦 my-app/decision.dmn | Decision| my-dec | 1 | 2251799813685251
|
|
568
|
-
# processes/order-process.bpmn | Process | order-process | 1 | 2251799813685252
|
|
569
|
-
```
|
|
570
|
-
|
|
571
|
-
### Process Application Deployment
|
|
572
|
-
|
|
573
|
-
If a directory contains a `.process-application` file, **all resources in that directory and its subdirectories** are marked with the 📦 emoji in the deployment results table. Resources are grouped together based on their location:
|
|
574
|
-
|
|
575
|
-
```bash
|
|
576
|
-
# Directory structure:
|
|
577
|
-
# my-project/
|
|
578
|
-
# _bb-shared/
|
|
579
|
-
# common.bpmn
|
|
580
|
-
# nested/
|
|
581
|
-
# util.bpmn # Also part of _bb-shared group
|
|
582
|
-
# my-app/
|
|
583
|
-
# .process-application
|
|
584
|
-
# process.bpmn
|
|
585
|
-
# subfolder/
|
|
586
|
-
# form.form # Also part of my-app group
|
|
587
|
-
# standalone.bpmn
|
|
588
|
-
|
|
589
|
-
c8 deploy ./my-project
|
|
590
|
-
|
|
591
|
-
# Output shows resources grouped by their folder hierarchy:
|
|
592
|
-
# Deploying 5 resource(s)...
|
|
593
|
-
# ✓ Deployment successful [Key: 123456789]
|
|
594
|
-
#
|
|
595
|
-
# File | Type | ID | Version | Key
|
|
596
|
-
# --------------------------------|---------|---------------|---------|-------------------
|
|
597
|
-
# 🧱 _bb-shared/common.bpmn | Process | common | 1 | 2251799813685249
|
|
598
|
-
# 🧱 _bb-shared/nested/util.bpmn | Process | util | 1 | 2251799813685250
|
|
599
|
-
# 📦 my-app/process.bpmn | Process | my-proc | 1 | 2251799813685251
|
|
600
|
-
# 📦 my-app/subfolder/form.form | Form | form-id | 1 | 2251799813685252
|
|
601
|
-
# standalone.bpmn | Process | standalone | 1 | 2251799813685253
|
|
602
|
-
```
|
|
603
|
-
|
|
604
|
-
### Resource Grouping Rules
|
|
605
|
-
|
|
606
|
-
Resources are automatically grouped based on their folder hierarchy:
|
|
607
|
-
|
|
608
|
-
1. **Building Block Groups** - All resources in a folder with `_bb-` in the name (and its subdirectories) belong to the same group and are marked with 🧱
|
|
609
|
-
2. **Process Application Groups** - All resources in a folder containing `.process-application` file (and its subdirectories) belong to the same group and are marked with 📦
|
|
610
|
-
3. **Standalone Resources** - Resources not in a building block or process application folder are treated as standalone
|
|
611
|
-
|
|
612
|
-
In the deployment output:
|
|
613
|
-
- Building block groups are listed first, grouped together
|
|
614
|
-
- Process application groups are listed next, grouped together
|
|
615
|
-
- Standalone resources are listed last
|
|
616
|
-
|
|
617
|
-
### Deployment Output Details
|
|
618
|
-
|
|
619
|
-
The deployment results table shows:
|
|
620
|
-
- **File column** - Shows the file name with relative path
|
|
621
|
-
- 🧱 emoji indicates building block resources (from `_bb-*` folders, including nested files)
|
|
622
|
-
- 📦 emoji indicates process application resources (from folders with `.process-application` file, including nested files)
|
|
623
|
-
- **Type column** - Resource type (Process, Decision, or Form)
|
|
624
|
-
- **ID column** - The process/decision/form ID
|
|
625
|
-
- **Version column** - Version number assigned by Camunda
|
|
626
|
-
- **Key column** - Unique key assigned by Camunda
|
|
627
|
-
|
|
628
|
-
### Important: Duplicate Process IDs
|
|
629
|
-
|
|
630
|
-
Camunda does not allow deploying multiple resources with the same process/decision ID in a single deployment. If you have multiple BPMN files with the same process definition ID, deploy them separately:
|
|
631
|
-
|
|
632
|
-
```bash
|
|
633
|
-
# This will fail if both files have the same process ID
|
|
634
|
-
# c8 deploy process-v1.bpmn process-v2.bpmn
|
|
635
|
-
|
|
636
|
-
# Instead, deploy separately:
|
|
637
|
-
c8 deploy process-v1.bpmn
|
|
638
|
-
c8 deploy process-v2.bpmn
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
The CLI will detect duplicate IDs and provide a helpful error message showing which files conflict.
|
|
642
|
-
|
|
643
|
-
### Default Extensions
|
|
644
|
-
|
|
645
|
-
When scanning directories, `deploy` and `watch` only include files matching these extensions by default:
|
|
646
|
-
|
|
647
|
-
`.bpmn`, `.dmn`, `.form`
|
|
648
|
-
|
|
649
|
-
Explicitly named files bypass the extension allow-list (`.c8ignore` rules still apply):
|
|
650
|
-
|
|
651
|
-
```bash
|
|
652
|
-
# Explicit file — deploys regardless of extension
|
|
653
|
-
c8 deploy my-doc.md
|
|
654
|
-
|
|
655
|
-
# Directory walk — only .bpmn/.dmn/.form by default
|
|
656
|
-
c8 deploy ./my-project/
|
|
657
|
-
```
|
|
658
|
-
|
|
659
|
-
Use `--extensions` to add more types during directory discovery (merged with defaults):
|
|
660
|
-
|
|
661
|
-
```bash
|
|
662
|
-
c8 deploy --extensions=.md,.txt
|
|
663
|
-
c8 watch --extensions=.md
|
|
664
|
-
```
|
|
665
|
-
|
|
666
|
-
Use `--all-extensions` to include all server-supported types:
|
|
667
|
-
|
|
668
|
-
```bash
|
|
669
|
-
c8 deploy --all-extensions
|
|
670
|
-
c8 watch --all-extensions
|
|
671
|
-
```
|
|
672
|
-
|
|
673
|
-
### Ignoring Files (`.c8ignore`)
|
|
674
|
-
|
|
675
|
-
When deploying or watching a directory, c8ctl ignores `node_modules/`, `target/`, and `.git/` by default. Add a `.c8ignore` file to your project root for custom patterns (uses `.gitignore` syntax):
|
|
676
|
-
|
|
677
|
-
```gitignore
|
|
678
|
-
# .c8ignore — filter directories for deploy and watch
|
|
679
|
-
|
|
680
|
-
# Ignore build output
|
|
681
|
-
dist/
|
|
682
|
-
build/
|
|
683
|
-
|
|
684
|
-
# Ignore draft processes
|
|
685
|
-
**/draft-*.bpmn
|
|
686
|
-
|
|
687
|
-
# But keep this approved draft
|
|
688
|
-
!draft-approved.bpmn
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
```bash
|
|
692
|
-
# Deploy respects .c8ignore automatically
|
|
693
|
-
c8 deploy
|
|
694
|
-
|
|
695
|
-
# Watch mode also respects .c8ignore
|
|
696
|
-
c8 watch
|
|
697
|
-
```
|
|
698
|
-
|
|
699
|
-
### Deploy Confirmation
|
|
700
|
-
|
|
701
|
-
When multiple profiles are configured, `c8 deploy` presents an interactive
|
|
702
|
-
profile picker to prevent deploying to the wrong cluster:
|
|
703
|
-
|
|
704
|
-
```bash
|
|
705
|
-
# Shows an interactive profile selection menu
|
|
706
|
-
c8 deploy ./process.bpmn
|
|
707
|
-
|
|
708
|
-
# Skip the prompt with --yes / -y (uses active profile)
|
|
709
|
-
c8 deploy ./process.bpmn --yes
|
|
710
|
-
c8 deploy ./process.bpmn -y
|
|
711
|
-
|
|
712
|
-
# Explicit --profile also skips the prompt (target is unambiguous)
|
|
713
|
-
c8 deploy ./process.bpmn --profile=staging
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
In non-interactive environments (CI, piped input), the deploy fails with
|
|
717
|
-
guidance to use `--profile` or `--yes` to make the target explicit.
|
|
718
|
-
|
|
719
|
-
### Run (Deploy + Start)
|
|
720
|
-
|
|
721
|
-
```bash
|
|
722
|
-
# Deploy BPMN and create process instance
|
|
723
|
-
c8 run ./order-process.bpmn
|
|
724
|
-
|
|
725
|
-
# With variables
|
|
726
|
-
c8 run ./order-process.bpmn --variables='{"orderId":"12345","amount":100}'
|
|
727
|
-
```
|
|
728
|
-
|
|
729
|
-
---
|
|
730
|
-
|
|
731
|
-
## Forms
|
|
732
|
-
|
|
733
|
-
Forms in Camunda 8 are linked to user tasks and process definitions. You can retrieve the form associated with a specific resource.
|
|
734
|
-
|
|
735
|
-
### Get Form (Search Both Types)
|
|
736
|
-
|
|
737
|
-
```bash
|
|
738
|
-
# Search both user task and process definition (no flag required)
|
|
739
|
-
c8 get form 2251799813685251
|
|
740
|
-
|
|
741
|
-
# The output will indicate whether the form was found as a user task, process definition, both, or neither
|
|
742
|
-
# Using profile
|
|
743
|
-
c8 get form 2251799813685251 --profile prod
|
|
744
|
-
```
|
|
745
|
-
|
|
746
|
-
### Get Form for User Task Only
|
|
747
|
-
|
|
748
|
-
```bash
|
|
749
|
-
# Get the form associated with a user task (short form with --ut alias)
|
|
750
|
-
c8 get form 2251799813685251 --ut
|
|
751
|
-
|
|
752
|
-
# Long form
|
|
753
|
-
c8 get form 2251799813685251 --userTask
|
|
754
|
-
|
|
755
|
-
# Using profile
|
|
756
|
-
c8 get form 2251799813685251 --ut --profile prod
|
|
757
|
-
```
|
|
758
|
-
|
|
759
|
-
### Get Start Form for Process Definition Only
|
|
760
|
-
|
|
761
|
-
```bash
|
|
762
|
-
# Get the start form for a process definition (short form with --pd alias)
|
|
763
|
-
c8 get form 2251799813685252 --pd
|
|
764
|
-
|
|
765
|
-
# Long form
|
|
766
|
-
c8 get form 2251799813685252 --processDefinition
|
|
767
|
-
|
|
768
|
-
# Using profile
|
|
769
|
-
c8 get form 2251799813685252 --pd --profile prod
|
|
770
|
-
```
|
|
771
|
-
|
|
772
|
-
**Note**: When no flag is specified, the command searches both user tasks and process definitions and reports where the form was found. With a flag, it only searches the specified type.
|
|
773
|
-
|
|
774
|
-
---
|
|
775
|
-
|
|
776
|
-
## Topology
|
|
777
|
-
|
|
778
|
-
### Get Cluster Topology
|
|
779
|
-
|
|
780
|
-
```bash
|
|
781
|
-
c8 get topology
|
|
782
|
-
```
|
|
783
|
-
|
|
784
|
-
---
|
|
785
|
-
|
|
786
|
-
## Variables
|
|
787
|
-
|
|
788
|
-
### Set Variables
|
|
789
|
-
|
|
790
|
-
Set variables on a process instance or flow element scope. Variables propagate to the outermost scope by default.
|
|
791
|
-
|
|
792
|
-
```bash
|
|
793
|
-
# Set variables on a process instance
|
|
794
|
-
c8 set variable 2251799813685249 --variables='{"status":"approved"}'
|
|
795
|
-
|
|
796
|
-
# Set variables in local scope only (no propagation)
|
|
797
|
-
c8 set variable 2251799813685249 --variables='{"x":1}' --local
|
|
798
|
-
```
|
|
799
|
-
|
|
800
|
-
---
|
|
801
|
-
|
|
802
|
-
## Date Range Filtering
|
|
803
|
-
|
|
804
|
-
Use `--between=<from>..<to>` to filter by date range (process instances, user tasks, incidents, jobs). Either side can be omitted for open-ended ranges.
|
|
805
|
-
|
|
806
|
-
```bash
|
|
807
|
-
# Process instances between specific dates
|
|
808
|
-
c8 search pi --between=2024-01-01..2024-12-31
|
|
809
|
-
|
|
810
|
-
# Open-ended: everything from a date onward
|
|
811
|
-
c8 search pi --between=2024-01-01..
|
|
812
|
-
|
|
813
|
-
# Open-ended: everything up to a date
|
|
814
|
-
c8 search pi --between=..2024-12-31
|
|
815
|
-
|
|
816
|
-
# Use --dateField to filter on a different field (not supported by incidents)
|
|
817
|
-
c8 search pi --between=2024-01-01..2024-12-31 --dateField=endDate
|
|
818
|
-
```
|
|
819
|
-
|
|
820
|
-
---
|
|
821
|
-
|
|
822
|
-
## Identity Management
|
|
823
|
-
|
|
824
|
-
c8ctl supports managing identity resources: users, roles, groups, tenants, authorizations, and mapping rules.
|
|
825
|
-
|
|
826
|
-
### Users
|
|
827
|
-
|
|
828
|
-
```bash
|
|
829
|
-
# List users
|
|
830
|
-
c8 list users
|
|
831
|
-
|
|
832
|
-
# Search users
|
|
833
|
-
c8 search users --username=john
|
|
834
|
-
c8 search users --name=John --email=john@example.com
|
|
835
|
-
|
|
836
|
-
# Get user by username
|
|
837
|
-
c8 get user john
|
|
838
|
-
|
|
839
|
-
# Create a user
|
|
840
|
-
c8 create user --username=john --name='John Doe' --email=john@example.com --password=secret
|
|
841
|
-
|
|
842
|
-
# Delete a user
|
|
843
|
-
c8 delete user john
|
|
844
|
-
```
|
|
845
|
-
|
|
846
|
-
### Roles
|
|
847
|
-
|
|
848
|
-
```bash
|
|
849
|
-
# List roles
|
|
850
|
-
c8 list roles
|
|
851
|
-
|
|
852
|
-
# Search roles
|
|
853
|
-
c8 search roles --name=admin
|
|
854
|
-
|
|
855
|
-
# Get role by ID
|
|
856
|
-
c8 get role admin
|
|
857
|
-
|
|
858
|
-
# Create a role
|
|
859
|
-
c8 create role --roleId=viewer --name=Viewer
|
|
860
|
-
|
|
861
|
-
# Delete a role
|
|
862
|
-
c8 delete role viewer
|
|
863
|
-
|
|
864
|
-
# Assign a role to a user
|
|
865
|
-
c8 assign role admin --to-user=john
|
|
866
|
-
|
|
867
|
-
# Unassign a role from a user
|
|
868
|
-
c8 unassign role admin --from-user=john
|
|
869
|
-
|
|
870
|
-
# Assign a role to a group
|
|
871
|
-
c8 assign role admin --to-group=engineering
|
|
872
|
-
```
|
|
873
|
-
|
|
874
|
-
### Groups
|
|
875
|
-
|
|
876
|
-
```bash
|
|
877
|
-
# List groups
|
|
878
|
-
c8 list groups
|
|
879
|
-
|
|
880
|
-
# Search groups
|
|
881
|
-
c8 search groups --name=engineering
|
|
882
|
-
|
|
883
|
-
# Get group by ID
|
|
884
|
-
c8 get group engineering
|
|
885
|
-
|
|
886
|
-
# Create a group
|
|
887
|
-
c8 create group --groupId=engineering --name=Engineering
|
|
888
|
-
|
|
889
|
-
# Delete a group
|
|
890
|
-
c8 delete group engineering
|
|
891
|
-
|
|
892
|
-
# Assign a user to a group
|
|
893
|
-
c8 assign user john --to-group=engineering
|
|
894
|
-
|
|
895
|
-
# Unassign a user from a group
|
|
896
|
-
c8 unassign user john --from-group=engineering
|
|
897
|
-
```
|
|
898
|
-
|
|
899
|
-
### Tenants
|
|
900
|
-
|
|
901
|
-
```bash
|
|
902
|
-
# List tenants
|
|
903
|
-
c8 list tenants
|
|
904
|
-
|
|
905
|
-
# Search tenants
|
|
906
|
-
c8 search tenants --name=production
|
|
907
|
-
|
|
908
|
-
# Get tenant by ID
|
|
909
|
-
c8 get tenant production
|
|
910
|
-
|
|
911
|
-
# Create a tenant
|
|
912
|
-
c8 create tenant --tenantId=production --name=Production
|
|
913
|
-
|
|
914
|
-
# Delete a tenant
|
|
915
|
-
c8 delete tenant production
|
|
916
|
-
|
|
917
|
-
# Assign a group to a tenant
|
|
918
|
-
c8 assign group engineering --to-tenant=production
|
|
919
|
-
```
|
|
920
|
-
|
|
921
|
-
### Authorizations
|
|
922
|
-
|
|
923
|
-
```bash
|
|
924
|
-
# List authorizations
|
|
925
|
-
c8 list auth
|
|
926
|
-
|
|
927
|
-
# Search authorizations
|
|
928
|
-
c8 search auth --ownerId=john --ownerType=USER
|
|
929
|
-
|
|
930
|
-
# Get authorization by key
|
|
931
|
-
c8 get auth 2251799813685249
|
|
932
|
-
|
|
933
|
-
# Create an authorization
|
|
934
|
-
c8 create auth --ownerId=john --ownerType=USER --resourceType=PROCESS_DEFINITION --resourceId=order-process --permissions=READ,UPDATE
|
|
935
|
-
|
|
936
|
-
# Delete an authorization
|
|
937
|
-
c8 delete auth 2251799813685249
|
|
938
|
-
```
|
|
939
|
-
|
|
940
|
-
### Mapping Rules
|
|
941
|
-
|
|
942
|
-
```bash
|
|
943
|
-
# List mapping rules
|
|
944
|
-
c8 list mapping-rules
|
|
945
|
-
|
|
946
|
-
# Search mapping rules
|
|
947
|
-
c8 search mapping-rules --claimName=groups --claimValue=admins
|
|
948
|
-
|
|
949
|
-
# Get mapping rule by ID
|
|
950
|
-
c8 get mapping-rule my-rule
|
|
951
|
-
|
|
952
|
-
# Create a mapping rule
|
|
953
|
-
c8 create mapping-rule --mappingRuleId=my-rule --name='Admin Mapping' --claimName=groups --claimValue=admins
|
|
954
|
-
|
|
955
|
-
# Delete a mapping rule
|
|
956
|
-
c8 delete mapping-rule my-rule
|
|
957
|
-
|
|
958
|
-
# Assign a mapping rule to a tenant
|
|
959
|
-
c8 assign mapping-rule my-rule --to-tenant=production
|
|
960
|
-
```
|
|
961
|
-
|
|
962
|
-
---
|
|
963
|
-
|
|
964
|
-
## Which
|
|
965
|
-
|
|
966
|
-
Show the currently active profile or output mode:
|
|
967
|
-
|
|
968
|
-
```bash
|
|
969
|
-
# Show active profile
|
|
970
|
-
c8 which profile
|
|
971
|
-
|
|
972
|
-
# Show current output mode
|
|
973
|
-
c8 which output
|
|
974
|
-
```
|
|
975
|
-
|
|
976
|
-
---
|
|
977
|
-
|
|
978
|
-
## Doctor
|
|
979
|
-
|
|
980
|
-
Surface plugin-loading collisions detected at startup:
|
|
981
|
-
|
|
982
|
-
```bash
|
|
983
|
-
# List loaded plugins and any collisions
|
|
984
|
-
c8 doctor plugin
|
|
985
|
-
|
|
986
|
-
# Machine-readable output
|
|
987
|
-
c8 doctor plugin --json
|
|
988
|
-
```
|
|
989
|
-
|
|
990
|
-
---
|
|
991
|
-
|
|
992
|
-
## Watch with Process Applications
|
|
993
|
-
|
|
994
|
-
Watch mode supports process application deployment with `--process-application` (or `--pa`):
|
|
995
|
-
|
|
996
|
-
```bash
|
|
997
|
-
# Watch and deploy the entire process application
|
|
998
|
-
c8 watch --process-application
|
|
999
|
-
|
|
1000
|
-
# Short form
|
|
1001
|
-
c8 watch --pa
|
|
1002
|
-
|
|
1003
|
-
# Watch a specific directory as a process application
|
|
1004
|
-
c8 watch ./my-app --pa
|
|
1005
|
-
```
|
|
1006
|
-
|
|
1007
|
-
---
|
|
1008
|
-
|
|
1009
|
-
## Profile Management
|
|
1010
|
-
|
|
1011
|
-
c8ctl supports two types of profiles:
|
|
1012
|
-
1. **c8ctl profiles**: Directly managed by c8ctl commands
|
|
1013
|
-
2. **Modeler profiles**: Automatically imported from Camunda Modeler (read-only)
|
|
1014
|
-
|
|
1015
|
-
### Show Profile Help
|
|
1016
|
-
|
|
1017
|
-
```bash
|
|
1018
|
-
# Show all profile-related commands and flags
|
|
1019
|
-
c8 help profiles
|
|
1020
|
-
```
|
|
1021
|
-
|
|
1022
|
-
### Add c8ctl Profile
|
|
1023
|
-
|
|
1024
|
-
`c8 add profile <name>` usage rules:
|
|
1025
|
-
|
|
1026
|
-
- **Always required**: profile `<name>`
|
|
1027
|
-
- **Required for OAuth-secured clusters**: `--clientId`, `--clientSecret`
|
|
1028
|
-
- **Optional with defaults**:
|
|
1029
|
-
- `--baseUrl` (default: `http://localhost:8080/v2`)
|
|
1030
|
-
- `--defaultTenantId` (runtime default tenant: `<default>`)
|
|
1031
|
-
- **Optional without c8ctl defaults**: `--audience`, `--oAuthUrl`, `--scope`
|
|
1032
|
-
- **Import shortcuts**: `--from-file <path>`, `--from-env`
|
|
1033
|
-
|
|
1034
|
-
```bash
|
|
1035
|
-
# Minimal local profile (uses default --baseUrl)
|
|
1036
|
-
c8 add profile local
|
|
1037
|
-
|
|
1038
|
-
# Local profile with explicit URL
|
|
1039
|
-
c8 add profile local --baseUrl=http://localhost:8080
|
|
1040
|
-
|
|
1041
|
-
# Minimal OAuth profile (required OAuth switches)
|
|
1042
|
-
c8 add profile prod \
|
|
1043
|
-
--baseUrl=https://camunda.example.com \
|
|
1044
|
-
--clientId=your-client-id \
|
|
1045
|
-
--clientSecret=your-client-secret
|
|
1046
|
-
|
|
1047
|
-
# OAuth profile with explicit audience/token endpoint
|
|
1048
|
-
c8 add profile prod \
|
|
1049
|
-
--baseUrl=https://camunda.example.com \
|
|
1050
|
-
--clientId=your-client-id \
|
|
1051
|
-
--clientSecret=your-client-secret \
|
|
1052
|
-
--audience=camunda-api \
|
|
1053
|
-
--oAuthUrl=https://auth.example.com/oauth/token
|
|
1054
|
-
|
|
1055
|
-
# OAuth profile against an IdP that requires an explicit scope (e.g. Microsoft Entra ID)
|
|
1056
|
-
c8 add profile prod \
|
|
1057
|
-
--baseUrl=https://camunda.example.com \
|
|
1058
|
-
--clientId=your-client-id \
|
|
1059
|
-
--clientSecret=your-client-secret \
|
|
1060
|
-
--oAuthUrl=https://login.microsoftonline.com/your-tenant-id/oauth2/v2.0/token \
|
|
1061
|
-
--scope=api://your-app-id/.default
|
|
1062
|
-
|
|
1063
|
-
# Add profile with default tenant
|
|
1064
|
-
c8 add profile dev \
|
|
1065
|
-
--baseUrl=https://dev.camunda.example.com \
|
|
1066
|
-
--clientId=dev-client \
|
|
1067
|
-
--clientSecret=dev-secret \
|
|
1068
|
-
--defaultTenantId=dev-tenant
|
|
1069
|
-
|
|
1070
|
-
# Create a profile from a .env file
|
|
1071
|
-
c8 add profile staging --from-file .env.staging
|
|
1072
|
-
|
|
1073
|
-
# Create a profile from current environment variables
|
|
1074
|
-
source .env.prod
|
|
1075
|
-
c8 add profile prod --from-env
|
|
1076
|
-
```
|
|
1077
|
-
|
|
1078
|
-
### List All Profiles
|
|
1079
|
-
|
|
1080
|
-
```bash
|
|
1081
|
-
# Lists both c8ctl and modeler profiles
|
|
1082
|
-
# Modeler profiles are shown with 'modeler:' prefix
|
|
1083
|
-
c8 list profiles
|
|
1084
|
-
|
|
1085
|
-
# Example output:
|
|
1086
|
-
# Name Base URL Client ID Default Tenant
|
|
1087
|
-
# local http://localhost:8080/v2 (none) <default>
|
|
1088
|
-
# prod https://camunda.example.com your-client <default>
|
|
1089
|
-
# modeler:Local Dev http://localhost:8080/v2 (none) <default>
|
|
1090
|
-
# modeler:Cloud Cluster https://abc123.zeebe.camunda.io XYZ <default>
|
|
1091
|
-
```
|
|
1092
|
-
|
|
1093
|
-
### Use Modeler Profiles
|
|
1094
|
-
|
|
1095
|
-
```bash
|
|
1096
|
-
# Use a modeler profile by name
|
|
1097
|
-
c8 use profile modeler:Local Dev
|
|
1098
|
-
|
|
1099
|
-
# Use a modeler profile by cluster ID
|
|
1100
|
-
c8 use profile modeler:abc123-def456
|
|
1101
|
-
|
|
1102
|
-
# One-off command with modeler profile
|
|
1103
|
-
c8 list pi --profile=modeler:Cloud Cluster
|
|
1104
|
-
|
|
1105
|
-
# Deploy with modeler profile
|
|
1106
|
-
c8 deploy ./process.bpmn --profile=modeler:Local Dev
|
|
1107
|
-
```
|
|
1108
|
-
|
|
1109
|
-
### Remove c8ctl Profile
|
|
1110
|
-
|
|
1111
|
-
```bash
|
|
1112
|
-
# Only c8ctl profiles can be removed
|
|
1113
|
-
# Modeler profiles are managed via Camunda Modeler
|
|
1114
|
-
c8 remove profile local
|
|
1115
|
-
c8 rm profile local # alias
|
|
1116
|
-
|
|
1117
|
-
# Attempting to remove a modeler profile will fail
|
|
1118
|
-
# c8 remove profile modeler:Local Dev # Error: Profile not found
|
|
1119
|
-
```
|
|
1120
|
-
|
|
1121
|
-
---
|
|
1122
|
-
|
|
1123
|
-
## Session Management
|
|
1124
|
-
|
|
1125
|
-
### Set Active Profile
|
|
1126
|
-
|
|
1127
|
-
```bash
|
|
1128
|
-
# Set c8ctl profile to use for all subsequent commands
|
|
1129
|
-
c8 use profile prod
|
|
1130
|
-
|
|
1131
|
-
# Set modeler profile to use for all subsequent commands
|
|
1132
|
-
c8 use profile modeler:Local Dev
|
|
1133
|
-
|
|
1134
|
-
# Clear the active profile (so env vars or default 'local' take effect)
|
|
1135
|
-
c8 use profile --none
|
|
1136
|
-
|
|
1137
|
-
# All commands now use the active profile automatically
|
|
1138
|
-
c8 list pi
|
|
1139
|
-
c8 deploy ./process.bpmn
|
|
1140
|
-
```
|
|
1141
|
-
|
|
1142
|
-
### Override Profile for Single Command
|
|
1143
|
-
|
|
1144
|
-
```bash
|
|
1145
|
-
# Use specific profile for one command only
|
|
1146
|
-
c8 list pi --profile=dev
|
|
1147
|
-
c8 deploy ./process.bpmn --profile=staging
|
|
1148
|
-
```
|
|
1149
|
-
|
|
1150
|
-
### Set Active Tenant
|
|
1151
|
-
|
|
1152
|
-
```bash
|
|
1153
|
-
# Set tenant for all subsequent commands
|
|
1154
|
-
c8 use tenant my-tenant-123
|
|
1155
|
-
|
|
1156
|
-
# All commands now include tenant filter/parameter
|
|
1157
|
-
c8 list pi
|
|
1158
|
-
c8 create pi --id=order-process
|
|
1159
|
-
```
|
|
1160
|
-
|
|
1161
|
-
### Set Output Mode
|
|
1162
|
-
|
|
1163
|
-
```bash
|
|
1164
|
-
# Switch to JSON output
|
|
1165
|
-
c8 output json
|
|
1166
|
-
|
|
1167
|
-
# All commands now output JSON
|
|
1168
|
-
c8 list pi
|
|
1169
|
-
# Output: [{"processInstanceKey":"...","bpmnProcessId":"..."}]
|
|
1170
|
-
|
|
1171
|
-
# Switch back to human-readable text
|
|
1172
|
-
c8 output text
|
|
1173
|
-
```
|
|
1174
|
-
|
|
1175
|
-
---
|
|
1176
|
-
|
|
1177
|
-
## Local Cluster
|
|
1178
|
-
|
|
1179
|
-
### Start a Local Cluster
|
|
1180
|
-
|
|
1181
|
-
```bash
|
|
1182
|
-
# Start a local Camunda 8 cluster (downloads c8run automatically if needed)
|
|
1183
|
-
c8 cluster start
|
|
1184
|
-
|
|
1185
|
-
# Start a specific version
|
|
1186
|
-
c8 cluster start 8.9.0-alpha5
|
|
1187
|
-
|
|
1188
|
-
# Start the latest cached release for a major.minor version
|
|
1189
|
-
c8 cluster start 8.8
|
|
1190
|
-
|
|
1191
|
-
# Start with debug output (streams raw c8run logs)
|
|
1192
|
-
c8 cluster start --debug
|
|
1193
|
-
```
|
|
1194
|
-
|
|
1195
|
-
### Stop a Local Cluster
|
|
1196
|
-
|
|
1197
|
-
```bash
|
|
1198
|
-
c8 cluster stop
|
|
1199
|
-
```
|
|
1200
|
-
|
|
1201
|
-
### Cluster Status
|
|
1202
|
-
|
|
1203
|
-
```bash
|
|
1204
|
-
# Check if a cluster is running and see connection details
|
|
1205
|
-
c8 cluster status
|
|
1206
|
-
```
|
|
1207
|
-
|
|
1208
|
-
### Stream Logs
|
|
1209
|
-
|
|
1210
|
-
```bash
|
|
1211
|
-
# Stream log output from the running cluster (Ctrl+C to stop)
|
|
1212
|
-
c8 cluster logs
|
|
1213
|
-
```
|
|
1214
|
-
|
|
1215
|
-
### List Installed Versions
|
|
1216
|
-
|
|
1217
|
-
```bash
|
|
1218
|
-
# Show locally cached versions and version aliases
|
|
1219
|
-
c8 cluster list
|
|
1220
|
-
```
|
|
1221
|
-
|
|
1222
|
-
### List Available Remote Versions
|
|
1223
|
-
|
|
1224
|
-
```bash
|
|
1225
|
-
# Query the Camunda Download Center for all available versions
|
|
1226
|
-
c8 cluster list-remote
|
|
1227
|
-
```
|
|
1228
|
-
|
|
1229
|
-
### Install a Version Without Starting
|
|
1230
|
-
|
|
1231
|
-
```bash
|
|
1232
|
-
# Pre-download a version for later use
|
|
1233
|
-
c8 cluster install 8.8
|
|
1234
|
-
c8 cluster install alpha
|
|
1235
|
-
```
|
|
1236
|
-
|
|
1237
|
-
### Delete a Cached Version
|
|
1238
|
-
|
|
1239
|
-
```bash
|
|
1240
|
-
# Remove a locally cached version to reclaim disk space
|
|
1241
|
-
c8 cluster delete 8.8
|
|
1242
|
-
```
|
|
1243
|
-
|
|
1244
|
-
### Purge Cluster Data
|
|
1245
|
-
|
|
1246
|
-
Wipe history and journal data while keeping the downloaded binary intact.
|
|
1247
|
-
The next `cluster start` begins with a fresh empty state without re-downloading anything.
|
|
1248
|
-
|
|
1249
|
-
```bash
|
|
1250
|
-
# Purge data for a specific version (version required, like delete)
|
|
1251
|
-
c8 cluster purge 8.9
|
|
1252
|
-
c8 cluster purge 8.9.0-alpha5
|
|
1253
|
-
|
|
1254
|
-
# Stop the running cluster and purge its data in one step
|
|
1255
|
-
c8 cluster stop --purge
|
|
1256
|
-
```
|
|
1257
|
-
|
|
1258
|
-
If the target version is currently running, stop it first with `cluster stop`
|
|
1259
|
-
(or use `cluster stop --purge` to stop and purge in one step).
|
|
1260
|
-
|
|
1261
|
-
`cluster stop --purge` is the recommended way to reset a running cluster:
|
|
1262
|
-
it captures the running version, stops it, then purges the data atomically.
|
|
1263
|
-
|
|
1264
|
-
### Typical Local Development Workflow
|
|
1265
|
-
|
|
1266
|
-
```bash
|
|
1267
|
-
# Start local cluster
|
|
1268
|
-
c8 cluster start
|
|
1269
|
-
|
|
1270
|
-
# Set up a local profile
|
|
1271
|
-
c8 add profile local --baseUrl=http://localhost:8080
|
|
1272
|
-
c8 use profile local
|
|
1273
|
-
|
|
1274
|
-
# Deploy and run a process
|
|
1275
|
-
c8 run ./my-process.bpmn
|
|
1276
|
-
|
|
1277
|
-
# When done, stop the cluster
|
|
1278
|
-
c8 cluster stop
|
|
1279
|
-
```
|
|
1280
|
-
|
|
1281
|
-
---
|
|
1282
|
-
|
|
1283
|
-
## Open Camunda Applications
|
|
1284
|
-
|
|
1285
|
-
Open Camunda web applications directly from the command line. The URL is derived
|
|
1286
|
-
automatically from the active profile's base URL.
|
|
1287
|
-
|
|
1288
|
-
### Open Camunda Operate
|
|
1289
|
-
|
|
1290
|
-
```bash
|
|
1291
|
-
# Open Operate for the currently active profile
|
|
1292
|
-
c8 open operate
|
|
1293
|
-
|
|
1294
|
-
# Open Operate using a specific profile
|
|
1295
|
-
c8 open operate --profile=prod
|
|
1296
|
-
```
|
|
1297
|
-
|
|
1298
|
-
### Open Camunda Tasklist
|
|
1299
|
-
|
|
1300
|
-
```bash
|
|
1301
|
-
c8 open tasklist
|
|
1302
|
-
c8 open tasklist --profile=staging
|
|
1303
|
-
```
|
|
1304
|
-
|
|
1305
|
-
### Open Camunda Web Modeler
|
|
1306
|
-
|
|
1307
|
-
```bash
|
|
1308
|
-
c8 open modeler
|
|
1309
|
-
```
|
|
1310
|
-
|
|
1311
|
-
### Open Camunda Optimize
|
|
1312
|
-
|
|
1313
|
-
```bash
|
|
1314
|
-
c8 open optimize
|
|
1315
|
-
```
|
|
1316
|
-
|
|
1317
|
-
**URL derivation:** The command strips the API path suffix (e.g. `/v2`) from the
|
|
1318
|
-
profile's `baseUrl` and appends the application path.
|
|
1319
|
-
Example: `baseUrl=http://localhost:8080/v2` → `http://localhost:8080/operate`
|
|
1320
|
-
|
|
1321
|
-
---
|
|
1322
|
-
|
|
1323
|
-
## Plugin Management
|
|
1324
|
-
|
|
1325
|
-
### Load Plugin
|
|
1326
|
-
|
|
1327
|
-
```bash
|
|
1328
|
-
# Install a c8ctl plugin from npm registry
|
|
1329
|
-
c8 load plugin my-custom-plugin
|
|
1330
|
-
|
|
1331
|
-
# Install a plugin from a URL (file, https, git, etc.)
|
|
1332
|
-
c8 load plugin --from https://github.com/user/my-plugin
|
|
1333
|
-
c8 load plugin --from file:///path/to/local/plugin
|
|
1334
|
-
c8 load plugin --from git://github.com/user/plugin.git
|
|
1335
|
-
|
|
1336
|
-
# The plugin is now available
|
|
1337
|
-
# (assuming the plugin exports an 'analyze' command)
|
|
1338
|
-
c8 analyze
|
|
1339
|
-
```
|
|
1340
|
-
|
|
1341
|
-
### Unload Plugin
|
|
1342
|
-
|
|
1343
|
-
```bash
|
|
1344
|
-
# Remove a plugin
|
|
1345
|
-
c8 unload plugin my-custom-plugin
|
|
1346
|
-
```
|
|
1347
|
-
|
|
1348
|
-
### List Plugins
|
|
1349
|
-
|
|
1350
|
-
```bash
|
|
1351
|
-
# Show all installed c8ctl plugins with version and sync status
|
|
1352
|
-
c8 list plugins
|
|
1353
|
-
|
|
1354
|
-
# Example output:
|
|
1355
|
-
# Name | Version | Status | Source | Installed At
|
|
1356
|
-
# ------------------+---------+-----------------+---------------------------+----------------------
|
|
1357
|
-
# my-custom-plugin | 1.2.0 | ✓ Installed | my-custom-plugin | 1/30/2026, 6:00:00 PM
|
|
1358
|
-
# local-dev-plugin | Unknown | ⚠ Not installed | file:///path/to/plugin | 1/30/2026, 5:00:00 PM
|
|
1359
|
-
|
|
1360
|
-
# If any plugins are out of sync, you'll see a hint to run sync
|
|
1361
|
-
```
|
|
1362
|
-
|
|
1363
|
-
### Sync Plugins
|
|
1364
|
-
|
|
1365
|
-
```bash
|
|
1366
|
-
# Synchronize plugins from the registry
|
|
1367
|
-
# - Rebuilds installed plugins
|
|
1368
|
-
# - Reinstalls missing plugins
|
|
1369
|
-
c8 sync plugins
|
|
1370
|
-
|
|
1371
|
-
# Example output showing detailed sync progress:
|
|
1372
|
-
# Starting plugin synchronization...
|
|
1373
|
-
#
|
|
1374
|
-
# Found 2 registered plugin(s):
|
|
1375
|
-
# - my-custom-plugin (my-custom-plugin)
|
|
1376
|
-
# - local-dev-plugin (file:///path/to/plugin)
|
|
1377
|
-
#
|
|
1378
|
-
# Syncing my-custom-plugin...
|
|
1379
|
-
# ✓ my-custom-plugin is already installed, attempting rebuild...
|
|
1380
|
-
# ✓ ✓ my-custom-plugin rebuilt successfully
|
|
1381
|
-
#
|
|
1382
|
-
# Syncing local-dev-plugin...
|
|
1383
|
-
# ⚠ local-dev-plugin not found, installing...
|
|
1384
|
-
# ✓ ✓ local-dev-plugin installed successfully
|
|
1385
|
-
#
|
|
1386
|
-
# Synchronization complete:
|
|
1387
|
-
# ✓ Synced: 2 plugin(s)
|
|
1388
|
-
# ✓ All plugins synced successfully!
|
|
1389
|
-
```
|
|
1390
|
-
|
|
1391
|
-
### Downgrade Plugin
|
|
1392
|
-
|
|
1393
|
-
```bash
|
|
1394
|
-
# Downgrade a plugin by version
|
|
1395
|
-
c8 downgrade plugin my-custom-plugin 1.0.0
|
|
1396
|
-
|
|
1397
|
-
# Downgrade is source-aware:
|
|
1398
|
-
# - npm source: installs my-custom-plugin@1.0.0
|
|
1399
|
-
# - git/URL source: installs <source>#1.0.0
|
|
1400
|
-
# - file:// source: version downgrade is not supported
|
|
1401
|
-
```
|
|
1402
|
-
|
|
1403
|
-
### Upgrade Plugin
|
|
1404
|
-
|
|
1405
|
-
```bash
|
|
1406
|
-
# Upgrade a plugin to latest
|
|
1407
|
-
c8 upgrade plugin my-custom-plugin
|
|
1408
|
-
|
|
1409
|
-
# Upgrade a plugin to a specific version
|
|
1410
|
-
c8 upgrade plugin my-custom-plugin 1.2.3
|
|
1411
|
-
|
|
1412
|
-
# Versioned upgrade is source-aware:
|
|
1413
|
-
# - npm source: installs my-custom-plugin@1.2.3
|
|
1414
|
-
# - git/URL source: installs <source>#1.2.3
|
|
1415
|
-
# - file:// source: version upgrade is not supported
|
|
1416
|
-
```
|
|
1417
|
-
|
|
1418
|
-
**Plugin Development:**
|
|
1419
|
-
|
|
1420
|
-
Plugins must be regular Node.js modules with a `c8ctl-plugin.js` or `c8ctl-plugin.ts` file in the root directory. The plugin file must export a `commands` object. The `c8ctl` runtime object provides environment information:
|
|
1421
|
-
|
|
1422
|
-
When bootstrapping with `c8ctl init plugin <name>`, the generated project also includes an `AGENTS.md` file with an implementation workflow and runtime API reference for coding agents.
|
|
1423
|
-
|
|
1424
|
-
```typescript
|
|
1425
|
-
// c8ctl-plugin.ts
|
|
1426
|
-
|
|
1427
|
-
// Use import type for TypeScript autocomplete only (not a runtime import)
|
|
1428
|
-
import type { C8ctlPluginRuntime } from '@camunda8/cli/runtime';
|
|
1429
|
-
|
|
1430
|
-
// Access the injected runtime via globalThis
|
|
1431
|
-
const c8ctl = globalThis.c8ctl as C8ctlPluginRuntime;
|
|
1432
|
-
|
|
1433
|
-
export const commands = {
|
|
1434
|
-
analyze: async (args: string[]) => {
|
|
1435
|
-
console.log(`Running on Node ${c8ctl.nodeVersion}`);
|
|
1436
|
-
console.log(`Platform: ${c8ctl.platform}`);
|
|
1437
|
-
// Custom analysis logic here
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
|
-
```
|
|
1441
|
-
|
|
1442
|
-
**Plugin Registry:**
|
|
1443
|
-
|
|
1444
|
-
Plugins are tracked in a registry file (`~/.config/c8ctl/plugins.json` on Linux) independently of `package.json`. This ensures plugins persist across npm operations and can be synchronized when moving between environments or after npm operations.
|
|
1445
|
-
|
|
1446
|
-
---
|
|
1447
|
-
|
|
1448
|
-
## Combined Examples
|
|
1449
|
-
|
|
1450
|
-
### Complete Workflow
|
|
1451
|
-
|
|
1452
|
-
```bash
|
|
1453
|
-
# 1. Configure environment
|
|
1454
|
-
c8 add profile prod --baseUrl=https://camunda.example.com --clientId=xxx --clientSecret=yyy
|
|
1455
|
-
c8 use profile prod
|
|
1456
|
-
c8 use tenant production
|
|
1457
|
-
|
|
1458
|
-
# 2. Deploy process
|
|
1459
|
-
c8 deploy ./processes/
|
|
1460
|
-
|
|
1461
|
-
# 3. Create and monitor instance
|
|
1462
|
-
c8 create pi --id=order-process --variables='{"orderId":"12345"}'
|
|
1463
|
-
# ✓ Process instance created [Key: 2251799813685249]
|
|
1464
|
-
|
|
1465
|
-
c8 get pi 2251799813685249
|
|
1466
|
-
|
|
1467
|
-
# 4. Search for related resources
|
|
1468
|
-
c8 search pi --id=order-process --state=ACTIVE
|
|
1469
|
-
c8 search variables --processInstanceKey=2251799813685249
|
|
1470
|
-
|
|
1471
|
-
# 5. Complete user task
|
|
1472
|
-
c8 search ut --state=CREATED --processInstanceKey=2251799813685249
|
|
1473
|
-
c8 complete ut 2251799813685250 --variables='{"approved":true}'
|
|
1474
|
-
|
|
1475
|
-
# 6. Handle incidents if any
|
|
1476
|
-
c8 search inc --state=ACTIVE --processInstanceKey=2251799813685249
|
|
1477
|
-
c8 resolve inc 2251799813685251
|
|
1478
|
-
```
|
|
1479
|
-
|
|
1480
|
-
### Testing Workflow
|
|
1481
|
-
|
|
1482
|
-
```bash
|
|
1483
|
-
# 1. Use local environment
|
|
1484
|
-
c8 use profile local
|
|
1485
|
-
c8 output json # For automated testing
|
|
1486
|
-
|
|
1487
|
-
# 2. Deploy and run
|
|
1488
|
-
c8 run ./test-process.bpmn --variables='{"testData":"value"}'
|
|
1489
|
-
|
|
1490
|
-
# 3. Verify
|
|
1491
|
-
c8 list pi --id=test-process
|
|
1492
|
-
```
|
|
1493
|
-
|
|
1494
|
-
### Multi-Tenant Management
|
|
1495
|
-
|
|
1496
|
-
```bash
|
|
1497
|
-
# Deploy to multiple tenants
|
|
1498
|
-
c8 use tenant tenant-A
|
|
1499
|
-
c8 deploy ./shared-processes/
|
|
1500
|
-
|
|
1501
|
-
c8 use tenant tenant-B
|
|
1502
|
-
c8 deploy ./shared-processes/
|
|
1503
|
-
|
|
1504
|
-
# List instances per tenant
|
|
1505
|
-
c8 use tenant tenant-A
|
|
1506
|
-
c8 list pi
|
|
1507
|
-
|
|
1508
|
-
c8 use tenant tenant-B
|
|
1509
|
-
c8 list pi
|
|
1510
|
-
```
|
|
1511
|
-
|
|
1512
|
-
---
|
|
1513
|
-
|
|
1514
|
-
## Tips
|
|
1515
|
-
|
|
1516
|
-
1. **Use Aliases**: Save typing with resource aliases (pi, ut, inc, msg)
|
|
1517
|
-
2. **Search vs List**: Use `search` for fine-grained filtering, `list` for simple overviews
|
|
1518
|
-
3. **Profile Override**: Use `--profile` flag for one-off commands without changing session
|
|
1519
|
-
4. **JSON Output**: Use `c8 output json` for scripting and automation
|
|
1520
|
-
5. **Building Blocks**: Organize reusable processes in `_bb-*` folders for deployment priority
|
|
1521
|
-
6. **Session State**: Set profile and tenant once, use everywhere
|
|
1522
|
-
7. **Full Values**: Use `--fullValue` with `search variables` to see non-truncated values
|
|
1523
|
-
8. **Help**: Run `c8 <verb>` without resource to see available resources for that verb
|
|
1524
|
-
|
|
1525
|
-
---
|
|
1526
|
-
|
|
1527
|
-
## Environment Variables
|
|
1528
|
-
|
|
1529
|
-
Instead of profiles, you can use environment variables:
|
|
1530
|
-
|
|
1531
|
-
```bash
|
|
1532
|
-
export CAMUNDA_BASE_URL=https://camunda.example.com
|
|
1533
|
-
export CAMUNDA_CLIENT_ID=your-client-id
|
|
1534
|
-
export CAMUNDA_CLIENT_SECRET=your-client-secret
|
|
1535
|
-
export CAMUNDA_DEFAULT_TENANT_ID=my-tenant
|
|
1536
|
-
|
|
1537
|
-
# Now commands use these credentials
|
|
1538
|
-
c8 list pi
|
|
1539
|
-
```
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
---
|
|
1543
|
-
|
|
1544
|
-
## Agent / Programmatic Consumption
|
|
1545
|
-
|
|
1546
|
-
These examples use flags designed specifically for AI agents and programmatic consumers.
|
|
1547
|
-
See [`CONTEXT.md`](./CONTEXT.md) for the complete agent reference.
|
|
1548
|
-
|
|
1549
|
-
### `--fields` — Reduce Context Window Size
|
|
1550
|
-
|
|
1551
|
-
```bash
|
|
1552
|
-
# List process instances with only Key and State
|
|
1553
|
-
c8 output json
|
|
1554
|
-
c8 list pi --fields Key,State
|
|
1555
|
-
|
|
1556
|
-
# Search with selected fields (case-insensitive field names)
|
|
1557
|
-
c8 search pd --fields Key,processDefinitionId,name | jq .
|
|
1558
|
-
|
|
1559
|
-
# Works with any list/search/get command
|
|
1560
|
-
c8 list ut --fields Key,State,Assignee
|
|
1561
|
-
c8 search inc --state=ACTIVE --fields Key,Type,processInstanceKey
|
|
1562
|
-
c8 get pi 2251799813685249 --fields processInstanceKey,state,processDefinitionId
|
|
1563
|
-
```
|
|
1564
|
-
|
|
1565
|
-
### `--dry-run` — Preview Mutations Without Executing
|
|
1566
|
-
|
|
1567
|
-
```bash
|
|
1568
|
-
# Preview creating a process instance
|
|
1569
|
-
c8 create pi --id=my-process --dry-run
|
|
1570
|
-
# Output: {"dryRun":true,"command":"create process-instance","method":"POST","url":"...","body":{...}}
|
|
1571
|
-
|
|
1572
|
-
# Preview deploying resources
|
|
1573
|
-
c8 deploy ./my-process.bpmn --dry-run
|
|
1574
|
-
|
|
1575
|
-
# Preview cancelling a process instance
|
|
1576
|
-
c8 cancel pi 2251799813685249 --dry-run
|
|
1577
|
-
|
|
1578
|
-
# Preview completing a user task
|
|
1579
|
-
c8 complete ut 2251799813685250 --variables='{"approved":true}' --dry-run
|
|
1580
|
-
|
|
1581
|
-
# Preview publishing a message
|
|
1582
|
-
c8 publish msg order-received --correlationKey=order-123 --dry-run
|
|
1583
|
-
|
|
1584
|
-
# Recommended agent workflow:
|
|
1585
|
-
# 1. Run with --dry-run, show user the would-be API call
|
|
1586
|
-
c8 create pi --id=my-process --variables='{"key":"value"}' --dry-run
|
|
1587
|
-
# 2. After user confirmation, execute
|
|
1588
|
-
c8 create pi --id=my-process --variables='{"key":"value"}'
|
|
1589
|
-
```
|
|
1590
|
-
|
|
1591
|
-
### Machine-Readable Help (JSON Mode)
|
|
1592
|
-
|
|
1593
|
-
```bash
|
|
1594
|
-
c8 output json
|
|
1595
|
-
c8 help # → structured JSON command reference
|
|
1596
|
-
c8 help list # → JSON for list command
|
|
1597
|
-
c8 help search # → JSON for search command
|
|
1598
|
-
```
|
|
1599
|
-
|
|
1600
|
-
---
|
|
1601
|
-
|
|
1602
|
-
## Feedback
|
|
1603
|
-
|
|
1604
|
-
```bash
|
|
1605
|
-
# Open the issue tracker to report bugs or request features
|
|
1606
|
-
c8 feedback
|
|
1607
|
-
```
|
|
3
|
+
> **Moved.** The comprehensive, task-oriented examples that used to live here are now
|
|
4
|
+
> maintained in the documentation under [`docs/`](docs/), which is the single source of
|
|
5
|
+
> truth and is published (and kept in sync) on
|
|
6
|
+
> [docs.camunda.io](https://docs.camunda.io/docs/next/apis-tools/c8ctl/getting-started/).
|
|
7
|
+
|
|
8
|
+
Find examples for each area here:
|
|
9
|
+
|
|
10
|
+
| Task area | Documentation page |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| Install, local cluster, credentials, profiles, output modes, shell completion | [Getting started](docs/getting-started.md) |
|
|
13
|
+
| Process instances, user tasks, incidents, jobs, variables, search, messages, forms | [Cluster inspection and process management](docs/cluster-inspection.md) |
|
|
14
|
+
| Users, roles, groups, tenants, authorizations, mapping rules | [Identity management](docs/identity-management.md) |
|
|
15
|
+
| Deploy, run, watch, profiles, sessions, MCP proxy, opening web apps | [Development workflows](docs/development-workflows.md) |
|
|
16
|
+
| Scaffold, install, and manage plugins | [Plugins](docs/plugins.md) |
|
|
17
|
+
| Every command, flag, resource, and alias | [Command reference](docs/command-reference.md) |
|
|
18
|
+
|
|
19
|
+
When adding or changing a command, document it in the relevant page under [`docs/`](docs/)
|
|
20
|
+
rather than here.
|