@camunda8/cli 3.1.0 → 3.2.0-alpha.10
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/CONTEXT.md +7 -15
- package/EXAMPLES.md +253 -1
- package/PLUGIN-HELP.md +1 -1
- package/README.md +50 -180
- package/dist/command-dispatch.d.ts +1 -1
- package/dist/command-dispatch.d.ts.map +1 -1
- package/dist/command-dispatch.js +1 -1
- package/dist/command-dispatch.js.map +1 -1
- package/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +2 -3
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/deploy.d.ts +13 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +328 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/forms.d.ts +1 -1
- package/dist/commands/forms.d.ts.map +1 -1
- package/dist/commands/forms.js +8 -8
- package/dist/commands/forms.js.map +1 -1
- package/dist/commands/helpers/deploy-helpers.d.ts +120 -0
- package/dist/commands/helpers/deploy-helpers.d.ts.map +1 -0
- package/dist/{deployments.js → commands/helpers/deploy-helpers.js} +307 -155
- package/dist/commands/helpers/deploy-helpers.js.map +1 -0
- package/dist/commands/identity-authorizations.d.ts +5 -18
- package/dist/commands/identity-authorizations.d.ts.map +1 -1
- package/dist/commands/identity-authorizations.js +8 -10
- package/dist/commands/identity-authorizations.js.map +1 -1
- package/dist/commands/identity-groups.d.ts +5 -5
- package/dist/commands/identity-groups.d.ts.map +1 -1
- package/dist/commands/identity-groups.js +7 -8
- package/dist/commands/identity-groups.js.map +1 -1
- package/dist/commands/identity-mapping-rules.d.ts +5 -5
- package/dist/commands/identity-mapping-rules.d.ts.map +1 -1
- package/dist/commands/identity-mapping-rules.js +7 -8
- package/dist/commands/identity-mapping-rules.js.map +1 -1
- package/dist/commands/identity-roles.d.ts +5 -5
- package/dist/commands/identity-roles.d.ts.map +1 -1
- package/dist/commands/identity-roles.js +7 -8
- package/dist/commands/identity-roles.js.map +1 -1
- package/dist/commands/identity-tenants.d.ts +5 -5
- package/dist/commands/identity-tenants.d.ts.map +1 -1
- package/dist/commands/identity-tenants.js +7 -8
- package/dist/commands/identity-tenants.js.map +1 -1
- package/dist/commands/identity-users.d.ts +5 -5
- package/dist/commands/identity-users.d.ts.map +1 -1
- package/dist/commands/identity-users.js +7 -8
- package/dist/commands/identity-users.js.map +1 -1
- package/dist/commands/identity.d.ts +11 -31
- package/dist/commands/identity.d.ts.map +1 -1
- package/dist/commands/identity.js +15 -15
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/incidents.d.ts +3 -3
- package/dist/commands/incidents.d.ts.map +1 -1
- package/dist/commands/incidents.js +6 -6
- package/dist/commands/incidents.js.map +1 -1
- package/dist/commands/jobs.d.ts +4 -4
- package/dist/commands/jobs.d.ts.map +1 -1
- package/dist/commands/jobs.js +7 -7
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/mcp-proxy.d.ts +1 -1
- package/dist/commands/mcp-proxy.d.ts.map +1 -1
- package/dist/commands/mcp-proxy.js +5 -9
- package/dist/commands/mcp-proxy.js.map +1 -1
- package/dist/commands/messages.d.ts +2 -2
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +4 -4
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/open.d.ts +4 -4
- package/dist/commands/open.d.ts.map +1 -1
- package/dist/commands/open.js +6 -6
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/plugins.d.ts +9 -9
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +2 -7
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/process-definitions.d.ts +2 -2
- package/dist/commands/process-definitions.d.ts.map +1 -1
- package/dist/commands/process-definitions.js +5 -5
- package/dist/commands/process-definitions.js.map +1 -1
- package/dist/commands/process-instances.d.ts +5 -5
- package/dist/commands/process-instances.d.ts.map +1 -1
- package/dist/commands/process-instances.js +8 -9
- package/dist/commands/process-instances.js.map +1 -1
- package/dist/commands/profiles.d.ts +4 -36
- package/dist/commands/profiles.d.ts.map +1 -1
- package/dist/commands/profiles.js +43 -41
- package/dist/commands/profiles.js.map +1 -1
- package/dist/commands/run.d.ts +2 -2
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +4 -4
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/search.d.ts +7 -7
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +9 -11
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/session.d.ts +4 -4
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +26 -5
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/topology.d.ts +1 -1
- package/dist/commands/topology.d.ts.map +1 -1
- package/dist/commands/topology.js +2 -2
- package/dist/commands/topology.js.map +1 -1
- package/dist/commands/user-tasks.d.ts +2 -2
- package/dist/commands/user-tasks.d.ts.map +1 -1
- package/dist/commands/user-tasks.js +5 -5
- package/dist/commands/user-tasks.js.map +1 -1
- package/dist/commands/variables.d.ts +1 -1
- package/dist/commands/variables.d.ts.map +1 -1
- package/dist/commands/variables.js +3 -3
- package/dist/commands/variables.js.map +1 -1
- package/dist/commands/watch.d.ts +2 -2
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +86 -19
- package/dist/commands/watch.js.map +1 -1
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js.map +1 -0
- package/dist/{config.d.ts → core/config.d.ts} +28 -2
- package/dist/core/config.d.ts.map +1 -0
- package/dist/{config.js → core/config.js} +61 -5
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/{runtime.js → core/runtime.js} +2 -2
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/update-check.d.ts.map +1 -0
- package/dist/core/update-check.js.map +1 -0
- package/dist/default-plugins/bpmn/README.md +12 -3
- package/dist/default-plugins/bpmn/c8ctl-plugin.js +7376 -108
- package/dist/default-plugins/bpmn/package.json +8 -1
- package/dist/default-plugins/cluster/c8ctl-plugin.js +66 -9
- package/dist/default-plugins/element-template/README.md +6 -3
- package/dist/default-plugins/element-template/c8ctl-plugin.js +10195 -229
- package/dist/default-plugins/element-template/docs/design.md +1 -1
- package/dist/default-plugins/element-template/package.json +11 -1
- package/dist/default-plugins/feel/c8ctl-plugin.js +14030 -584
- package/dist/default-plugins/feel/package.json +4 -1
- package/dist/{command-framework.d.ts → framework/command-framework.d.ts} +23 -9
- package/dist/framework/command-framework.d.ts.map +1 -0
- package/dist/{command-framework.js → framework/command-framework.js} +16 -29
- package/dist/framework/command-framework.js.map +1 -0
- package/dist/{command-registry.d.ts → framework/command-registry.d.ts} +35 -8
- package/dist/framework/command-registry.d.ts.map +1 -0
- package/dist/{command-registry.js → framework/command-registry.js} +74 -9
- package/dist/framework/command-registry.js.map +1 -0
- package/dist/{command-validation.d.ts → framework/command-validation.d.ts} +0 -14
- package/dist/framework/command-validation.d.ts.map +1 -0
- package/dist/{command-validation.js → framework/command-validation.js} +1 -34
- package/dist/framework/command-validation.js.map +1 -0
- package/dist/framework/index.d.ts +10 -0
- package/dist/framework/index.d.ts.map +1 -0
- package/dist/framework/index.js +16 -0
- package/dist/framework/index.js.map +1 -0
- package/dist/{plugin-loader.d.ts → framework/plugins/plugin-loader.d.ts} +30 -5
- package/dist/framework/plugins/plugin-loader.d.ts.map +1 -0
- package/dist/{plugin-loader.js → framework/plugins/plugin-loader.js} +26 -10
- package/dist/framework/plugins/plugin-loader.js.map +1 -0
- package/dist/framework/plugins/plugin-registry.d.ts.map +1 -0
- package/dist/{plugin-registry.js → framework/plugins/plugin-registry.js} +1 -1
- package/dist/framework/plugins/plugin-registry.js.map +1 -0
- package/dist/framework/plugins/plugin-version.d.ts.map +1 -0
- package/dist/framework/plugins/plugin-version.js.map +1 -0
- package/dist/{completion.d.ts → framework/ui/completion.d.ts} +2 -2
- package/dist/framework/ui/completion.d.ts.map +1 -0
- package/dist/{completion.js → framework/ui/completion.js} +7 -9
- package/dist/framework/ui/completion.js.map +1 -0
- package/dist/framework/ui/help.d.ts.map +1 -0
- package/dist/{help.js → framework/ui/help.js} +4 -4
- package/dist/framework/ui/help.js.map +1 -0
- package/dist/framework/ui/prompt.d.ts +132 -0
- package/dist/framework/ui/prompt.d.ts.map +1 -0
- package/dist/framework/ui/prompt.js +298 -0
- package/dist/framework/ui/prompt.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/utils/command-local/deploy-version.d.ts +21 -0
- package/dist/utils/command-local/deploy-version.d.ts.map +1 -0
- package/dist/utils/command-local/deploy-version.js +31 -0
- package/dist/utils/command-local/deploy-version.js.map +1 -0
- package/dist/{mcp-proxy-helpers.d.ts → utils/command-local/mcp-proxy-helpers.d.ts} +1 -1
- package/dist/utils/command-local/mcp-proxy-helpers.d.ts.map +1 -0
- package/dist/{mcp-proxy-helpers.js → utils/command-local/mcp-proxy-helpers.js} +1 -1
- package/dist/utils/command-local/mcp-proxy-helpers.js.map +1 -0
- package/dist/utils/command-local/open-helpers.d.ts.map +1 -0
- package/dist/{open-helpers.js → utils/command-local/open-helpers.js} +2 -2
- package/dist/utils/command-local/open-helpers.js.map +1 -0
- package/dist/{search-helpers.d.ts → utils/command-local/search-helpers.d.ts} +1 -1
- package/dist/utils/command-local/search-helpers.d.ts.map +1 -0
- package/dist/utils/command-local/search-helpers.js.map +1 -0
- package/dist/utils/command-local/watch-constants.d.ts.map +1 -0
- package/dist/utils/command-local/watch-constants.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +16 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/shared/date-filter.d.ts.map +1 -0
- package/dist/utils/shared/date-filter.js.map +1 -0
- package/dist/{ignore.d.ts → utils/shared/ignore.d.ts} +19 -1
- package/dist/utils/shared/ignore.d.ts.map +1 -0
- package/dist/utils/shared/ignore.js +234 -0
- package/dist/utils/shared/ignore.js.map +1 -0
- package/dist/utils/shared/resource-extensions.d.ts.map +1 -0
- package/dist/utils/shared/resource-extensions.js.map +1 -0
- package/dist/utils/shared/validation.d.ts +23 -0
- package/dist/utils/shared/validation.d.ts.map +1 -0
- package/dist/utils/shared/validation.js +43 -0
- package/dist/utils/shared/validation.js.map +1 -0
- package/dist/vendor/bpmnlint.cjs +25907 -0
- package/package.json +12 -14
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/command-framework.d.ts.map +0 -1
- package/dist/command-framework.js.map +0 -1
- package/dist/command-registry.d.ts.map +0 -1
- package/dist/command-registry.js.map +0 -1
- package/dist/command-validation.d.ts.map +0 -1
- package/dist/command-validation.js.map +0 -1
- package/dist/commands/resource-extensions.d.ts.map +0 -1
- package/dist/commands/resource-extensions.js.map +0 -1
- package/dist/completion.d.ts.map +0 -1
- package/dist/completion.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/date-filter.d.ts.map +0 -1
- package/dist/date-filter.js.map +0 -1
- package/dist/default-plugins/bpmn/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/bpmn/lint.js +0 -320
- package/dist/default-plugins/bpmn/lint.js.map +0 -1
- package/dist/default-plugins/element-template/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/element-template/commands/apply.js +0 -336
- package/dist/default-plugins/element-template/commands/apply.js.map +0 -1
- package/dist/default-plugins/element-template/commands/get-properties.js +0 -344
- package/dist/default-plugins/element-template/commands/get-properties.js.map +0 -1
- package/dist/default-plugins/element-template/commands/get.js +0 -107
- package/dist/default-plugins/element-template/commands/get.js.map +0 -1
- package/dist/default-plugins/element-template/commands/info.js +0 -189
- package/dist/default-plugins/element-template/commands/info.js.map +0 -1
- package/dist/default-plugins/element-template/commands/search.js +0 -102
- package/dist/default-plugins/element-template/commands/search.js.map +0 -1
- package/dist/default-plugins/element-template/commands/sync.js +0 -36
- package/dist/default-plugins/element-template/commands/sync.js.map +0 -1
- package/dist/default-plugins/element-template/helpers.js +0 -429
- package/dist/default-plugins/element-template/helpers.js.map +0 -1
- package/dist/default-plugins/element-template/marketplace.js +0 -586
- package/dist/default-plugins/element-template/marketplace.js.map +0 -1
- package/dist/default-plugins/element-template/template-ref.js +0 -232
- package/dist/default-plugins/element-template/template-ref.js.map +0 -1
- package/dist/default-plugins/feel/c8ctl-plugin.js.map +0 -1
- package/dist/default-plugins/hello-world/README.md +0 -161
- package/dist/default-plugins/hello-world/c8ctl-plugin.js +0 -69
- package/dist/default-plugins/hello-world/package.json +0 -8
- package/dist/deployments.d.ts +0 -42
- package/dist/deployments.d.ts.map +0 -1
- package/dist/deployments.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/help.d.ts.map +0 -1
- package/dist/help.js.map +0 -1
- package/dist/ignore.d.ts.map +0 -1
- package/dist/ignore.js +0 -101
- package/dist/ignore.js.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/mcp-proxy-helpers.d.ts.map +0 -1
- package/dist/mcp-proxy-helpers.js.map +0 -1
- package/dist/open-helpers.d.ts.map +0 -1
- package/dist/open-helpers.js.map +0 -1
- package/dist/plugin-loader.d.ts.map +0 -1
- package/dist/plugin-loader.js.map +0 -1
- package/dist/plugin-registry.d.ts.map +0 -1
- package/dist/plugin-registry.js.map +0 -1
- package/dist/plugin-version.d.ts.map +0 -1
- package/dist/plugin-version.js.map +0 -1
- package/dist/runtime.d.ts.map +0 -1
- package/dist/runtime.js.map +0 -1
- package/dist/search-helpers.d.ts.map +0 -1
- package/dist/search-helpers.js.map +0 -1
- package/dist/update-check.d.ts.map +0 -1
- package/dist/update-check.js.map +0 -1
- package/dist/watch-constants.d.ts.map +0 -1
- package/dist/watch-constants.js.map +0 -1
- /package/dist/{client.d.ts → core/client.d.ts} +0 -0
- /package/dist/{client.js → core/client.js} +0 -0
- /package/dist/{errors.d.ts → core/errors.d.ts} +0 -0
- /package/dist/{errors.js → core/errors.js} +0 -0
- /package/dist/{logger.d.ts → core/logger.d.ts} +0 -0
- /package/dist/{logger.js → core/logger.js} +0 -0
- /package/dist/{runtime.d.ts → core/runtime.d.ts} +0 -0
- /package/dist/{update-check.d.ts → core/update-check.d.ts} +0 -0
- /package/dist/{update-check.js → core/update-check.js} +0 -0
- /package/dist/{plugin-registry.d.ts → framework/plugins/plugin-registry.d.ts} +0 -0
- /package/dist/{plugin-version.d.ts → framework/plugins/plugin-version.d.ts} +0 -0
- /package/dist/{plugin-version.js → framework/plugins/plugin-version.js} +0 -0
- /package/dist/{help.d.ts → framework/ui/help.d.ts} +0 -0
- /package/dist/{open-helpers.d.ts → utils/command-local/open-helpers.d.ts} +0 -0
- /package/dist/{search-helpers.js → utils/command-local/search-helpers.js} +0 -0
- /package/dist/{watch-constants.d.ts → utils/command-local/watch-constants.d.ts} +0 -0
- /package/dist/{watch-constants.js → utils/command-local/watch-constants.js} +0 -0
- /package/dist/{date-filter.d.ts → utils/shared/date-filter.d.ts} +0 -0
- /package/dist/{date-filter.js → utils/shared/date-filter.js} +0 -0
- /package/dist/{commands → utils/shared}/resource-extensions.d.ts +0 -0
- /package/dist/{commands → utils/shared}/resource-extensions.js +0 -0
package/CONTEXT.md
CHANGED
|
@@ -38,6 +38,9 @@ c8ctl help # get structured JSON command reference
|
|
|
38
38
|
| `inc` | incident(s) |
|
|
39
39
|
| `msg` | message |
|
|
40
40
|
| `vars`| variable(s) |
|
|
41
|
+
| `var` | variable |
|
|
42
|
+
| `auth`| authorization(s) |
|
|
43
|
+
| `mr` | mapping-rule(s) |
|
|
41
44
|
|
|
42
45
|
## Agent Flags
|
|
43
46
|
|
|
@@ -59,21 +62,10 @@ Use this to reduce context window size when parsing output programmatically.
|
|
|
59
62
|
|
|
60
63
|
### `--dry-run`
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- All inputs are validated
|
|
67
|
-
- The target profile/client is resolved
|
|
68
|
-
- The equivalent API request is emitted as JSON to stdout:
|
|
69
|
-
`{ "dryRun": true, "command": "...", "method": "POST", "url": "...", "body": {...} }`
|
|
70
|
-
- The actual API call is **not** executed
|
|
71
|
-
- Exits 0
|
|
72
|
-
|
|
73
|
-
**Recommended workflow for mutating operations:**
|
|
74
|
-
1. Run the command with `--dry-run` and inspect the JSON output
|
|
75
|
-
2. Confirm the request with the user (or validate programmatically)
|
|
76
|
-
3. Re-run without `--dry-run` to execute
|
|
65
|
+
Preview the API request without executing it. Supported by most commands.
|
|
66
|
+
Emits a JSON object to stdout and exits 0:
|
|
67
|
+
|
|
68
|
+
`{ "dryRun": true, "command": "...", "method": "...", "url": "...", "body": ... }`
|
|
77
69
|
|
|
78
70
|
```sh
|
|
79
71
|
c8ctl create pi --id=my-process --dry-run
|
package/EXAMPLES.md
CHANGED
|
@@ -13,10 +13,16 @@ Comprehensive examples for all c8ctl operations.
|
|
|
13
13
|
- [Deployments](#deployments)
|
|
14
14
|
- [Forms](#forms)
|
|
15
15
|
- [Topology](#topology)
|
|
16
|
+
- [Variables](#variables)
|
|
17
|
+
- [Date Range Filtering](#date-range-filtering)
|
|
18
|
+
- [Identity Management](#identity-management)
|
|
19
|
+
- [Open Camunda Applications](#open-camunda-applications)
|
|
16
20
|
- [Profile Management](#profile-management)
|
|
17
21
|
- [Session Management](#session-management)
|
|
18
22
|
- [Plugin Management](#plugin-management)
|
|
19
23
|
- [Local Cluster](#local-cluster)
|
|
24
|
+
- [Which](#which)
|
|
25
|
+
- [Doctor](#doctor)
|
|
20
26
|
- [Agent / Programmatic Consumption](#agent--programmatic-consumption)
|
|
21
27
|
|
|
22
28
|
---
|
|
@@ -486,8 +492,11 @@ c8 publish msg order-placed --correlationKey=order-12345 --timeToLive=3600000
|
|
|
486
492
|
|
|
487
493
|
### Correlate Message
|
|
488
494
|
|
|
495
|
+
Correlate delivers a message to a specific waiting process instance. Unlike
|
|
496
|
+
`publish` (where `--correlationKey` is optional), `correlate` requires it.
|
|
497
|
+
|
|
489
498
|
```bash
|
|
490
|
-
# Correlate
|
|
499
|
+
# Correlate a message to a specific process instance
|
|
491
500
|
c8 correlate msg payment-received --correlationKey=order-12345 --variables='{"amount":250.00}'
|
|
492
501
|
```
|
|
493
502
|
|
|
@@ -660,6 +669,26 @@ c8 deploy
|
|
|
660
669
|
c8 watch
|
|
661
670
|
```
|
|
662
671
|
|
|
672
|
+
### Deploy Confirmation
|
|
673
|
+
|
|
674
|
+
When multiple profiles are configured, `c8 deploy` presents an interactive
|
|
675
|
+
profile picker to prevent deploying to the wrong cluster:
|
|
676
|
+
|
|
677
|
+
```bash
|
|
678
|
+
# Shows an interactive profile selection menu
|
|
679
|
+
c8 deploy ./process.bpmn
|
|
680
|
+
|
|
681
|
+
# Skip the prompt with --yes / -y (uses active profile)
|
|
682
|
+
c8 deploy ./process.bpmn --yes
|
|
683
|
+
c8 deploy ./process.bpmn -y
|
|
684
|
+
|
|
685
|
+
# Explicit --profile also skips the prompt (target is unambiguous)
|
|
686
|
+
c8 deploy ./process.bpmn --profile=staging
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
In non-interactive environments (CI, piped input), the deploy fails with
|
|
690
|
+
guidance to use `--profile` or `--yes` to make the target explicit.
|
|
691
|
+
|
|
663
692
|
### Run (Deploy + Start)
|
|
664
693
|
|
|
665
694
|
```bash
|
|
@@ -727,6 +756,229 @@ c8 get topology
|
|
|
727
756
|
|
|
728
757
|
---
|
|
729
758
|
|
|
759
|
+
## Variables
|
|
760
|
+
|
|
761
|
+
### Set Variables
|
|
762
|
+
|
|
763
|
+
Set variables on a process instance or flow element scope. Variables propagate to the outermost scope by default.
|
|
764
|
+
|
|
765
|
+
```bash
|
|
766
|
+
# Set variables on a process instance
|
|
767
|
+
c8 set variable 2251799813685249 --variables='{"status":"approved"}'
|
|
768
|
+
|
|
769
|
+
# Set variables in local scope only (no propagation)
|
|
770
|
+
c8 set variable 2251799813685249 --variables='{"x":1}' --local
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
---
|
|
774
|
+
|
|
775
|
+
## Date Range Filtering
|
|
776
|
+
|
|
777
|
+
Use `--between=<from>..<to>` to filter by date range (process instances, user tasks, incidents, jobs). Either side can be omitted for open-ended ranges.
|
|
778
|
+
|
|
779
|
+
```bash
|
|
780
|
+
# Process instances between specific dates
|
|
781
|
+
c8 search pi --between=2024-01-01..2024-12-31
|
|
782
|
+
|
|
783
|
+
# Open-ended: everything from a date onward
|
|
784
|
+
c8 search pi --between=2024-01-01..
|
|
785
|
+
|
|
786
|
+
# Open-ended: everything up to a date
|
|
787
|
+
c8 search pi --between=..2024-12-31
|
|
788
|
+
|
|
789
|
+
# Use --dateField to filter on a different field (not supported by incidents)
|
|
790
|
+
c8 search pi --between=2024-01-01..2024-12-31 --dateField=endDate
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
---
|
|
794
|
+
|
|
795
|
+
## Identity Management
|
|
796
|
+
|
|
797
|
+
c8ctl supports managing identity resources: users, roles, groups, tenants, authorizations, and mapping rules.
|
|
798
|
+
|
|
799
|
+
### Users
|
|
800
|
+
|
|
801
|
+
```bash
|
|
802
|
+
# List users
|
|
803
|
+
c8 list users
|
|
804
|
+
|
|
805
|
+
# Search users
|
|
806
|
+
c8 search users --username=john
|
|
807
|
+
c8 search users --name=John --email=john@example.com
|
|
808
|
+
|
|
809
|
+
# Get user by username
|
|
810
|
+
c8 get user john
|
|
811
|
+
|
|
812
|
+
# Create a user
|
|
813
|
+
c8 create user --username=john --name='John Doe' --email=john@example.com --password=secret
|
|
814
|
+
|
|
815
|
+
# Delete a user
|
|
816
|
+
c8 delete user john
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
### Roles
|
|
820
|
+
|
|
821
|
+
```bash
|
|
822
|
+
# List roles
|
|
823
|
+
c8 list roles
|
|
824
|
+
|
|
825
|
+
# Search roles
|
|
826
|
+
c8 search roles --name=admin
|
|
827
|
+
|
|
828
|
+
# Get role by ID
|
|
829
|
+
c8 get role admin
|
|
830
|
+
|
|
831
|
+
# Create a role
|
|
832
|
+
c8 create role --roleId=viewer --name=Viewer
|
|
833
|
+
|
|
834
|
+
# Delete a role
|
|
835
|
+
c8 delete role viewer
|
|
836
|
+
|
|
837
|
+
# Assign a role to a user
|
|
838
|
+
c8 assign role admin --to-user=john
|
|
839
|
+
|
|
840
|
+
# Unassign a role from a user
|
|
841
|
+
c8 unassign role admin --from-user=john
|
|
842
|
+
|
|
843
|
+
# Assign a role to a group
|
|
844
|
+
c8 assign role admin --to-group=engineering
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
### Groups
|
|
848
|
+
|
|
849
|
+
```bash
|
|
850
|
+
# List groups
|
|
851
|
+
c8 list groups
|
|
852
|
+
|
|
853
|
+
# Search groups
|
|
854
|
+
c8 search groups --name=engineering
|
|
855
|
+
|
|
856
|
+
# Get group by ID
|
|
857
|
+
c8 get group engineering
|
|
858
|
+
|
|
859
|
+
# Create a group
|
|
860
|
+
c8 create group --groupId=engineering --name=Engineering
|
|
861
|
+
|
|
862
|
+
# Delete a group
|
|
863
|
+
c8 delete group engineering
|
|
864
|
+
|
|
865
|
+
# Assign a user to a group
|
|
866
|
+
c8 assign user john --to-group=engineering
|
|
867
|
+
|
|
868
|
+
# Unassign a user from a group
|
|
869
|
+
c8 unassign user john --from-group=engineering
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
### Tenants
|
|
873
|
+
|
|
874
|
+
```bash
|
|
875
|
+
# List tenants
|
|
876
|
+
c8 list tenants
|
|
877
|
+
|
|
878
|
+
# Search tenants
|
|
879
|
+
c8 search tenants --name=production
|
|
880
|
+
|
|
881
|
+
# Get tenant by ID
|
|
882
|
+
c8 get tenant production
|
|
883
|
+
|
|
884
|
+
# Create a tenant
|
|
885
|
+
c8 create tenant --tenantId=production --name=Production
|
|
886
|
+
|
|
887
|
+
# Delete a tenant
|
|
888
|
+
c8 delete tenant production
|
|
889
|
+
|
|
890
|
+
# Assign a group to a tenant
|
|
891
|
+
c8 assign group engineering --to-tenant=production
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
### Authorizations
|
|
895
|
+
|
|
896
|
+
```bash
|
|
897
|
+
# List authorizations
|
|
898
|
+
c8 list auth
|
|
899
|
+
|
|
900
|
+
# Search authorizations
|
|
901
|
+
c8 search auth --ownerId=john --ownerType=USER
|
|
902
|
+
|
|
903
|
+
# Get authorization by key
|
|
904
|
+
c8 get auth 2251799813685249
|
|
905
|
+
|
|
906
|
+
# Create an authorization
|
|
907
|
+
c8 create auth --ownerId=john --ownerType=USER --resourceType=PROCESS_DEFINITION --resourceId=order-process --permissions=READ,UPDATE
|
|
908
|
+
|
|
909
|
+
# Delete an authorization
|
|
910
|
+
c8 delete auth 2251799813685249
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
### Mapping Rules
|
|
914
|
+
|
|
915
|
+
```bash
|
|
916
|
+
# List mapping rules
|
|
917
|
+
c8 list mapping-rules
|
|
918
|
+
|
|
919
|
+
# Search mapping rules
|
|
920
|
+
c8 search mapping-rules --claimName=groups --claimValue=admins
|
|
921
|
+
|
|
922
|
+
# Get mapping rule by ID
|
|
923
|
+
c8 get mapping-rule my-rule
|
|
924
|
+
|
|
925
|
+
# Create a mapping rule
|
|
926
|
+
c8 create mapping-rule --mappingRuleId=my-rule --name='Admin Mapping' --claimName=groups --claimValue=admins
|
|
927
|
+
|
|
928
|
+
# Delete a mapping rule
|
|
929
|
+
c8 delete mapping-rule my-rule
|
|
930
|
+
|
|
931
|
+
# Assign a mapping rule to a tenant
|
|
932
|
+
c8 assign mapping-rule my-rule --to-tenant=production
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
---
|
|
936
|
+
|
|
937
|
+
## Which
|
|
938
|
+
|
|
939
|
+
Show the currently active profile or output mode:
|
|
940
|
+
|
|
941
|
+
```bash
|
|
942
|
+
# Show active profile
|
|
943
|
+
c8 which profile
|
|
944
|
+
|
|
945
|
+
# Show current output mode
|
|
946
|
+
c8 which output
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
## Doctor
|
|
952
|
+
|
|
953
|
+
Surface plugin-loading collisions detected at startup:
|
|
954
|
+
|
|
955
|
+
```bash
|
|
956
|
+
# List loaded plugins and any collisions
|
|
957
|
+
c8 doctor plugin
|
|
958
|
+
|
|
959
|
+
# Machine-readable output
|
|
960
|
+
c8 doctor plugin --json
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
---
|
|
964
|
+
|
|
965
|
+
## Watch with Process Applications
|
|
966
|
+
|
|
967
|
+
Watch mode supports process application deployment with `--process-application` (or `--pa`):
|
|
968
|
+
|
|
969
|
+
```bash
|
|
970
|
+
# Watch and deploy the entire process application
|
|
971
|
+
c8 watch --process-application
|
|
972
|
+
|
|
973
|
+
# Short form
|
|
974
|
+
c8 watch --pa
|
|
975
|
+
|
|
976
|
+
# Watch a specific directory as a process application
|
|
977
|
+
c8 watch ./my-app --pa
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
---
|
|
981
|
+
|
|
730
982
|
## Profile Management
|
|
731
983
|
|
|
732
984
|
c8ctl supports two types of profiles:
|
package/PLUGIN-HELP.md
CHANGED
|
@@ -381,7 +381,7 @@ The plugin loader ([src/plugin-loader.ts](src/plugin-loader.ts)) provides:
|
|
|
381
381
|
|
|
382
382
|
### Help Command
|
|
383
383
|
|
|
384
|
-
The help command ([src/
|
|
384
|
+
The help command ([src/framework/ui/help.ts](src/framework/ui/help.ts)):
|
|
385
385
|
|
|
386
386
|
1. Calls `getPluginCommandsInfo()` to retrieve plugin information
|
|
387
387
|
2. Builds a "Plugin Commands" section if plugins are loaded
|
package/README.md
CHANGED
|
@@ -4,11 +4,13 @@ c8ctl (_pronounced: "cocktail"_) — a minimal-dependency CLI for Camunda 8 oper
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **Minimal Dependencies**: Only one runtime dependency (`@camunda8/orchestration-cluster-api`)
|
|
8
7
|
- **Multi-Tenant Support**: Full support for multi-tenancy across all operations
|
|
9
8
|
- **Profile Management**: Store and manage multiple cluster configurations
|
|
10
9
|
- **Camunda Modeler Integration**: Automatically import and use profiles from Camunda Modeler
|
|
10
|
+
- **Identity Management**: Manage users, roles, groups, tenants, authorizations, and mapping rules
|
|
11
11
|
- **Plugin System**: Extend c8ctl with custom commands via npm packages
|
|
12
|
+
- **Local Cluster**: Run a local Camunda 8 instance directly — no Docker required
|
|
13
|
+
- **MCP Proxy**: Bridge local MCP clients to remote Camunda 8 for AI agent integration
|
|
12
14
|
- **Building Block Deployment**: Automatic prioritization of `*_bb-*` folders during deployment, marked with 🧱 in results
|
|
13
15
|
- **Process Application Support**: Resources in folders with `.process-application` file marked with 📦 in results
|
|
14
16
|
- **Enhanced Deployment Results**: Table view showing file paths, visual indicators, resource details, and versions
|
|
@@ -17,6 +19,9 @@ c8ctl (_pronounced: "cocktail"_) — a minimal-dependency CLI for Camunda 8 oper
|
|
|
17
19
|
- **Open Applications**: Open Camunda web applications (Operate, Tasklist, Modeler, Optimize) in the browser directly from the CLI
|
|
18
20
|
- **Search**: Powerful search across process definitions, process instances, user tasks, incidents, jobs, and variables with filter, wildcard, and case-insensitive support
|
|
19
21
|
- **Flexible Output**: Switch between human-readable text and JSON output modes
|
|
22
|
+
- **Shell Completion**: Auto-install completions for bash, zsh, and fish with automatic refresh on upgrade
|
|
23
|
+
- **Agent Flags**: `--dry-run` to preview API requests and `--fields` to filter output columns for AI agents and scripts
|
|
24
|
+
- **Debug Mode**: Enable detailed logging to stderr with `DEBUG=1` or `C8CTL_DEBUG=true`
|
|
20
25
|
|
|
21
26
|
## Beware the 🤖
|
|
22
27
|
|
|
@@ -138,49 +143,27 @@ c8ctl completion install --shell zsh
|
|
|
138
143
|
|
|
139
144
|
This writes a completion script to the c8ctl data directory and wires it into your shell config (RC file for bash/zsh; completions directory for fish). Completions are **automatically refreshed** when c8ctl is upgraded — no manual re-install needed.
|
|
140
145
|
|
|
141
|
-
#### Manual
|
|
146
|
+
#### Manual setup
|
|
142
147
|
|
|
143
|
-
If you prefer to manage the completion script yourself
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
If you prefer to manage the completion script yourself, generate it with
|
|
149
|
+
`c8ctl completion <shell>` (where `<shell>` is `bash`, `zsh`, or `fish`),
|
|
150
|
+
then source or install it:
|
|
146
151
|
|
|
147
152
|
```bash
|
|
148
|
-
#
|
|
153
|
+
# Bash
|
|
149
154
|
c8ctl completion bash > ~/.c8ctl-completion.bash
|
|
150
155
|
echo 'source ~/.c8ctl-completion.bash' >> ~/.bashrc
|
|
151
|
-
source ~/.
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Or for immediate use in the current session:
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
source <(c8ctl completion bash)
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
#### Zsh
|
|
156
|
+
source ~/.c8ctl-completion.bash
|
|
161
157
|
|
|
162
|
-
|
|
163
|
-
# Generate and source completion script
|
|
158
|
+
# Zsh
|
|
164
159
|
c8ctl completion zsh > ~/.c8ctl-completion.zsh
|
|
165
160
|
echo 'source ~/.c8ctl-completion.zsh' >> ~/.zshrc
|
|
166
|
-
source ~/.
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Or for immediate use in the current session:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
source <(c8ctl completion zsh)
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
#### Fish
|
|
161
|
+
source ~/.c8ctl-completion.zsh
|
|
176
162
|
|
|
177
|
-
|
|
178
|
-
# Generate and install completion script
|
|
163
|
+
# Fish (auto-loaded on next start)
|
|
179
164
|
c8ctl completion fish > ~/.config/fish/completions/c8ctl.fish
|
|
180
165
|
```
|
|
181
166
|
|
|
182
|
-
Fish will automatically load the completion on next shell start.
|
|
183
|
-
|
|
184
167
|
### Credential Resolution
|
|
185
168
|
|
|
186
169
|
Credentials are resolved in the following order:
|
|
@@ -418,63 +401,9 @@ c8ctl help
|
|
|
418
401
|
- URL/git source: installs `<source>#<version>`
|
|
419
402
|
- file source (`file://`): version downgrade is not supported; use `load plugin --from` with the desired local plugin checkout
|
|
420
403
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
- Use `c8ctl init plugin <name>` to scaffold a new plugin with TypeScript template
|
|
424
|
-
- Convention over configuration: the directory is always prefixed with `c8ctl-plugin-`, and the plugin is registered by the suffix after the prefix (e.g., `c8ctl init plugin c8ctl-plugin-foo` creates directory `c8ctl-plugin-foo` and registers plugin name `foo`)
|
|
425
|
-
- Generated scaffold includes all necessary files, build configuration, and an `AGENTS.md` guide for autonomous plugin implementation
|
|
426
|
-
- Plugins have access to the c8ctl runtime via `globalThis.c8ctl`
|
|
427
|
-
- Plugins can create SDK clients via `globalThis.c8ctl.createClient(profile?, sdkConfig?)`
|
|
428
|
-
- Plugins can resolve tenant IDs via `globalThis.c8ctl.resolveTenantId(profile?)`
|
|
429
|
-
- Plugins can access c8ctl output-aware logging via `globalThis.c8ctl.getLogger()`
|
|
430
|
-
- See the bundled `hello-world` plugin in `default-plugins/` for a complete example
|
|
431
|
-
|
|
432
|
-
**Plugin Requirements:**
|
|
433
|
-
|
|
434
|
-
- Plugin packages must be regular Node.js modules
|
|
435
|
-
- They must include a `c8ctl-plugin.js` or `c8ctl-plugin.ts` file in the root directory
|
|
436
|
-
- The plugin file must export a `commands` object
|
|
437
|
-
- Optionally export a `metadata` object to provide help text
|
|
438
|
-
- Plugins are installed globally and work from any directory
|
|
439
|
-
- The runtime object `c8ctl` provides environment information to plugins
|
|
440
|
-
- The runtime object `c8ctl` exposes `createClient(profile?, sdkConfig?)` for creating Camunda SDK clients from plugins
|
|
441
|
-
- The runtime object `c8ctl` exposes `resolveTenantId(profile?)` using the same fallback logic as built-in commands
|
|
442
|
-
- The runtime object `c8ctl` exposes `getLogger()` returning the c8ctl logger instance (respects current output mode)
|
|
443
|
-
- **Important**: `c8ctl-plugin.js` must be JavaScript. Node.js doesn't support type stripping in `node_modules`. If writing in TypeScript, transpile to JS before publishing.
|
|
444
|
-
|
|
445
|
-
**TypeScript Plugin Autocomplete:**
|
|
446
|
-
|
|
447
|
-
```typescript
|
|
448
|
-
import type { C8ctlPluginRuntime } from '@camunda8/cli/runtime';
|
|
449
|
-
|
|
450
|
-
const c8ctl = globalThis.c8ctl as C8ctlPluginRuntime;
|
|
451
|
-
const tenantId = c8ctl.resolveTenantId();
|
|
452
|
-
const logger = c8ctl.getLogger();
|
|
453
|
-
logger.info(`Tenant: ${tenantId}`);
|
|
454
|
-
```
|
|
404
|
+
When plugins are loaded, their commands automatically appear in `c8ctl help` output.
|
|
455
405
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
```typescript
|
|
459
|
-
// c8ctl-plugin.ts
|
|
460
|
-
export const metadata = {
|
|
461
|
-
name: 'my-plugin',
|
|
462
|
-
description: 'My custom c8ctl plugin',
|
|
463
|
-
commands: {
|
|
464
|
-
analyze: {
|
|
465
|
-
description: 'Analyze BPMN processes'
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
export const commands = {
|
|
471
|
-
analyze: async (args: string[]) => {
|
|
472
|
-
console.log('Analyzing...', args);
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
When plugins are loaded, their commands automatically appear in `c8ctl help` output. See [PLUGIN-HELP.md](PLUGIN-HELP.md) for detailed documentation on plugin help integration.
|
|
406
|
+
For plugin development (scaffolding, runtime API, flags, TypeScript support), see [PLUGIN-HELP.md](PLUGIN-HELP.md).
|
|
478
407
|
|
|
479
408
|
---
|
|
480
409
|
|
|
@@ -617,122 +546,60 @@ Run `c8ctl help cluster` for full details. See [EXAMPLES.md](EXAMPLES.md#local-c
|
|
|
617
546
|
|
|
618
547
|
---
|
|
619
548
|
|
|
620
|
-
### Core Components
|
|
621
|
-
|
|
622
|
-
- **Logger** (`src/logger.ts`): Handles output in text or JSON mode
|
|
623
|
-
- **Config** (`src/config.ts`): Manages profiles, session state, and credential resolution
|
|
624
|
-
- **Client** (`src/client.ts`): Factory for creating Camunda 8 SDK clients
|
|
625
|
-
- **Commands** (`src/commands/`): Domain-specific command handlers
|
|
626
|
-
|
|
627
549
|
### Command Structure
|
|
628
550
|
|
|
629
551
|
```shell
|
|
630
552
|
c8ctl <verb> <resource> [arguments] [flags]
|
|
631
553
|
```
|
|
632
554
|
|
|
555
|
+
<!-- verb-resource-list:start -->
|
|
556
|
+
<!-- Auto-generated from COMMAND_REGISTRY. Do not edit manually.
|
|
557
|
+
Run: node --experimental-strip-types scripts/sync-readme-commands.ts -->
|
|
558
|
+
|
|
633
559
|
**Verbs**:
|
|
634
560
|
|
|
635
|
-
- `list` - List resources
|
|
561
|
+
- `list` - List resources (process, identity)
|
|
636
562
|
- `search` - Search resources with filters
|
|
637
563
|
- `get` - Get resource by key
|
|
638
564
|
- `create` - Create resource
|
|
565
|
+
- `delete` - Delete resource
|
|
639
566
|
- `cancel` - Cancel resource
|
|
567
|
+
- `await` - Create and await completion (alias for create --awaitCompletion)
|
|
640
568
|
- `complete` - Complete resource
|
|
641
569
|
- `fail` - Fail a job
|
|
642
|
-
- `activate` - Activate jobs
|
|
570
|
+
- `activate` - Activate jobs by type
|
|
643
571
|
- `resolve` - Resolve incident
|
|
644
572
|
- `publish` - Publish message
|
|
645
573
|
- `correlate` - Correlate message
|
|
574
|
+
- `set` - Set variables on an element instance
|
|
646
575
|
- `deploy` - Deploy resources
|
|
647
576
|
- `run` - Deploy and start process
|
|
648
|
-
- `
|
|
577
|
+
- `assign` - Assign resource to target
|
|
578
|
+
- `unassign` - Unassign resource from target
|
|
579
|
+
- `watch` (alias: `w`) - Watch files for changes and auto-deploy
|
|
580
|
+
- `open` - Open Camunda web application in browser
|
|
649
581
|
- `add` - Add a profile
|
|
650
582
|
- `remove` (alias: `rm`) - Remove a profile
|
|
651
|
-
- `load` - Load a plugin
|
|
652
|
-
- `unload` - Unload a plugin
|
|
583
|
+
- `load` - Load a c8ctl plugin
|
|
584
|
+
- `unload` (alias: `rm`) - Unload a c8ctl plugin
|
|
585
|
+
- `upgrade` - Upgrade a plugin
|
|
586
|
+
- `downgrade` - Downgrade a plugin to a specific version
|
|
653
587
|
- `sync` - Synchronize plugins
|
|
588
|
+
- `init` - Create a new plugin from TypeScript template
|
|
589
|
+
- `doctor` - Diagnose plugin loading state and collisions
|
|
654
590
|
- `use` - Set active profile or tenant
|
|
655
591
|
- `output` - Show or set output format
|
|
656
|
-
- `cluster` - Manage local Camunda 8 cluster (start, stop, status, logs, install, delete, list, list-remote)
|
|
657
592
|
- `completion` - Generate shell completion script
|
|
593
|
+
- `mcp-proxy` - Start a STDIO to remote HTTP MCP proxy server
|
|
658
594
|
- `feedback` - Open the feedback page to report issues or request features
|
|
595
|
+
- `help` (alias: `menu`) - Show help
|
|
596
|
+
- `which` - Show active profile or output mode
|
|
659
597
|
|
|
660
|
-
**Resources**:
|
|
598
|
+
**Resources**: authorization (auth), form, group, incident (inc), job, jobs, mapping-rule (mr), message (msg), plugin, process-definition (pd), process-instance (pi), profile, role, tenant, topology, user, user-task (ut), variable (var, vars)
|
|
599
|
+
<!-- verb-resource-list:end -->
|
|
661
600
|
|
|
662
601
|
**Tip**: Run `c8ctl help <command>` to see detailed help for specific commands with all available flags.
|
|
663
602
|
|
|
664
|
-
## Testing
|
|
665
|
-
|
|
666
|
-
### Run All Tests
|
|
667
|
-
|
|
668
|
-
```bash
|
|
669
|
-
npm test
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
### Run Unit Tests Only
|
|
673
|
-
|
|
674
|
-
```bash
|
|
675
|
-
npm run test:unit
|
|
676
|
-
```
|
|
677
|
-
|
|
678
|
-
### Run Integration Tests
|
|
679
|
-
|
|
680
|
-
Integration tests require a running Camunda 8 instance at `http://localhost:8080`.
|
|
681
|
-
|
|
682
|
-
1. Start a local Camunda 8 instance (e.g., using `c8ctl cluster start`)
|
|
683
|
-
2. Run: `npm run test:integration`
|
|
684
|
-
|
|
685
|
-
## Development
|
|
686
|
-
|
|
687
|
-
- **Native TypeScript**: Runs directly with Node.js 22.18+ (no compilation needed)
|
|
688
|
-
|
|
689
|
-
### Project Structure
|
|
690
|
-
|
|
691
|
-
```shell
|
|
692
|
-
c8ctl/
|
|
693
|
-
├── src/
|
|
694
|
-
│ ├── index.ts # CLI entry point
|
|
695
|
-
│ ├── logger.ts # Output handling
|
|
696
|
-
│ ├── config.ts # Configuration management
|
|
697
|
-
│ ├── client.ts # SDK client factory
|
|
698
|
-
│ └── commands/ # Command handlers
|
|
699
|
-
│ └── ...
|
|
700
|
-
├── tests/
|
|
701
|
-
│ ├── unit/ # Unit tests
|
|
702
|
-
│ ├── integration/ # Integration tests
|
|
703
|
-
│ └── fixtures/ # Test fixtures
|
|
704
|
-
├── package.json
|
|
705
|
-
├── tsconfig.json
|
|
706
|
-
└── README.md
|
|
707
|
-
```
|
|
708
|
-
|
|
709
|
-
### Running the CLI
|
|
710
|
-
|
|
711
|
-
```bash
|
|
712
|
-
# If installed globally
|
|
713
|
-
c8ctl <command>
|
|
714
|
-
# Or using the alias
|
|
715
|
-
c8 <command>
|
|
716
|
-
|
|
717
|
-
# For local development with Node.js 22.18+ (native TypeScript)
|
|
718
|
-
node src/index.ts <command>
|
|
719
|
-
|
|
720
|
-
# Testing with npm link (requires build first)
|
|
721
|
-
npm run build
|
|
722
|
-
npm link
|
|
723
|
-
c8ctl <command>
|
|
724
|
-
```
|
|
725
|
-
|
|
726
|
-
**Note**: The build step is only required for publishing or using `npm link`. Development uses native TypeScript execution via `node src/index.ts`.
|
|
727
|
-
|
|
728
|
-
### Adding New Commands
|
|
729
|
-
|
|
730
|
-
1. Create command handler in `src/commands/`
|
|
731
|
-
2. Wire into `src/index.ts` command routing
|
|
732
|
-
3. Add tests in `tests/unit/` and `tests/integration/`
|
|
733
|
-
4. Update help text in `src/commands/help.ts`
|
|
734
|
-
5. Document in `EXAMPLES.md`
|
|
735
|
-
|
|
736
603
|
## Environment Variables
|
|
737
604
|
|
|
738
605
|
- `CAMUNDA_BASE_URL`: Cluster base URL
|
|
@@ -796,6 +663,7 @@ These flags are accepted by every command.
|
|
|
796
663
|
| `--verbose` | boolean | | Show verbose output |
|
|
797
664
|
| `--fields` | string | | Comma-separated list of fields to display |
|
|
798
665
|
| `--json` | boolean | | Force JSON output for this invocation (does not persist; overrides session state and C8CTL_OUTPUT_MODE) |
|
|
666
|
+
| `--yes` / `-y` | boolean | | Skip confirmation prompts |
|
|
799
667
|
|
|
800
668
|
### Resource Aliases
|
|
801
669
|
|
|
@@ -821,7 +689,7 @@ These flags are available on `list` and `search` commands.
|
|
|
821
689
|
| `--asc` | boolean | | Sort ascending |
|
|
822
690
|
| `--desc` | boolean | | Sort descending |
|
|
823
691
|
| `--limit` | string | | Maximum number of results |
|
|
824
|
-
| `--between` | string | | Date range filter (e.g.
|
|
692
|
+
| `--between` | string | | Date range filter (e.g. 2024-01-01..2024-12-31, ..2024-12-31, 2024-01-01..) |
|
|
825
693
|
| `--dateField` | string | | Date field for --between filter |
|
|
826
694
|
|
|
827
695
|
### Commands
|
|
@@ -1501,7 +1369,7 @@ c8ctl set variable 2251799813685249 --variables='{"x":1}' --local # Set variabl
|
|
|
1501
1369
|
|
|
1502
1370
|
#### `deploy`
|
|
1503
1371
|
|
|
1504
|
-
Deploy files to Camunda (auto-discovers deployable files in directories)
|
|
1372
|
+
Deploy files to Camunda (auto-discovers deployable files in directories). When deploying a directory that is inside a process application (a parent directory contains a .process-application marker), the entire application root is deployed. Explicit file paths are not expanded.
|
|
1505
1373
|
|
|
1506
1374
|
**Usage:** `c8ctl deploy [path...]`
|
|
1507
1375
|
|
|
@@ -1517,6 +1385,7 @@ Deploy files to Camunda (auto-discovers deployable files in directories)
|
|
|
1517
1385
|
|
|
1518
1386
|
```bash
|
|
1519
1387
|
c8ctl deploy ./my-process.bpmn # Deploy a BPMN file
|
|
1388
|
+
c8ctl deploy # Deploy from current directory (detects process application root)
|
|
1520
1389
|
```
|
|
1521
1390
|
|
|
1522
1391
|
---
|
|
@@ -1621,6 +1490,8 @@ Watch files for changes and auto-deploy
|
|
|
1621
1490
|
| `--force` | boolean | | Continue watching after all deployment errors |
|
|
1622
1491
|
| `--extensions` | string | | Comma-separated list of additional file extensions to watch (merged with defaults, e.g. .md,.txt) |
|
|
1623
1492
|
| `--all-extensions` | boolean | | Watch all server-supported file extensions |
|
|
1493
|
+
| `--process-application` | boolean | | Watch and deploy the entire process application (requires .process-application marker) |
|
|
1494
|
+
| `--pa` | boolean | | Alias for --process-application |
|
|
1624
1495
|
|
|
1625
1496
|
**Examples:**
|
|
1626
1497
|
|
|
@@ -1683,12 +1554,11 @@ Remove a profile (alias: rm)
|
|
|
1683
1554
|
|
|
1684
1555
|
**Aliases:** `rm`
|
|
1685
1556
|
|
|
1686
|
-
**Resources:** profile
|
|
1557
|
+
**Resources:** profile
|
|
1687
1558
|
|
|
1688
1559
|
**Positional arguments:**
|
|
1689
1560
|
|
|
1690
|
-
- **profile:** `<name>` (
|
|
1691
|
-
- **plugin:** `<package>` (required)
|
|
1561
|
+
- **profile:** `<name>` (optional)
|
|
1692
1562
|
|
|
1693
1563
|
**Flags:**
|
|
1694
1564
|
|
|
@@ -1947,4 +1817,4 @@ Apache 2.0 - see LICENSE.md
|
|
|
1947
1817
|
|
|
1948
1818
|
## Contributing
|
|
1949
1819
|
|
|
1950
|
-
See
|
|
1820
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, project structure, and how to add new commands. See [AGENTS.md](AGENTS.md) for commit conventions and coding standards.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This replaces the ~1800-line if/else dispatch chain that previously
|
|
8
8
|
* lived in index.ts.
|
|
9
9
|
*/
|
|
10
|
-
import type { AnyCommandHandler } from "./
|
|
10
|
+
import type { AnyCommandHandler } from "./framework/index.ts";
|
|
11
11
|
/**
|
|
12
12
|
* Dispatch map keyed by "verb:resource".
|
|
13
13
|
* For resourceless verbs the key is "verb:" (empty resource).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-dispatch.d.ts","sourceRoot":"","sources":["../src/command-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"command-dispatch.d.ts","sourceRoot":"","sources":["../src/command-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiHH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAyIlE,CAAC"}
|