@camunda8/cli 3.2.0-alpha.1 → 3.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CONTEXT.md +7 -15
  2. package/EXAMPLES.md +233 -1
  3. package/README.md +44 -178
  4. package/dist/command-registry.d.ts +19 -7
  5. package/dist/command-registry.d.ts.map +1 -1
  6. package/dist/command-registry.js +47 -7
  7. package/dist/command-registry.js.map +1 -1
  8. package/dist/default-plugins/bpmn/README.md +12 -3
  9. package/dist/default-plugins/bpmn/c8ctl-plugin.js +38 -7
  10. package/dist/default-plugins/bpmn/c8ctl-plugin.js.map +1 -1
  11. package/dist/default-plugins/bpmn/format.js +64 -0
  12. package/dist/default-plugins/bpmn/format.js.map +1 -0
  13. package/dist/default-plugins/bpmn/lint.js +9 -6
  14. package/dist/default-plugins/bpmn/lint.js.map +1 -1
  15. package/dist/default-plugins/element-template/README.md +6 -3
  16. package/dist/default-plugins/element-template/c8ctl-plugin.js +25 -5
  17. package/dist/default-plugins/element-template/c8ctl-plugin.js.map +1 -1
  18. package/dist/default-plugins/element-template/commands/apply.js +3 -2
  19. package/dist/default-plugins/element-template/commands/apply.js.map +1 -1
  20. package/dist/default-plugins/element-template/commands/get-properties.js +10 -4
  21. package/dist/default-plugins/element-template/commands/get-properties.js.map +1 -1
  22. package/dist/default-plugins/element-template/commands/info.js +10 -3
  23. package/dist/default-plugins/element-template/commands/info.js.map +1 -1
  24. package/dist/default-plugins/element-template/commands/search.js +10 -6
  25. package/dist/default-plugins/element-template/commands/search.js.map +1 -1
  26. package/dist/default-plugins/element-template/helpers.js +90 -4
  27. package/dist/default-plugins/element-template/helpers.js.map +1 -1
  28. package/dist/default-plugins/element-template/marketplace.js +13 -2
  29. package/dist/default-plugins/element-template/marketplace.js.map +1 -1
  30. package/dist/default-plugins/element-template/template-ref.js +14 -3
  31. package/dist/default-plugins/element-template/template-ref.js.map +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +16 -9
  34. package/dist/index.js.map +1 -1
  35. package/package.json +1 -1
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
- Applies to all **mutating** commands: `create`, `cancel`, `deploy`,
63
- `complete`, `fail`, `activate`, `resolve`, `publish`, `correlate`.
64
-
65
- In dry-run mode:
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 is an alias for publish
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
 
@@ -727,6 +736,229 @@ c8 get topology
727
736
 
728
737
  ---
729
738
 
739
+ ## Variables
740
+
741
+ ### Set Variables
742
+
743
+ Set variables on a process instance or flow element scope. Variables propagate to the outermost scope by default.
744
+
745
+ ```bash
746
+ # Set variables on a process instance
747
+ c8 set variable 2251799813685249 --variables='{"status":"approved"}'
748
+
749
+ # Set variables in local scope only (no propagation)
750
+ c8 set variable 2251799813685249 --variables='{"x":1}' --local
751
+ ```
752
+
753
+ ---
754
+
755
+ ## Date Range Filtering
756
+
757
+ Use `--between=<from>..<to>` to filter by date range (process instances, user tasks, incidents, jobs). Either side can be omitted for open-ended ranges.
758
+
759
+ ```bash
760
+ # Process instances between specific dates
761
+ c8 search pi --between=2024-01-01..2024-12-31
762
+
763
+ # Open-ended: everything from a date onward
764
+ c8 search pi --between=2024-01-01..
765
+
766
+ # Open-ended: everything up to a date
767
+ c8 search pi --between=..2024-12-31
768
+
769
+ # Use --dateField to filter on a different field (not supported by incidents)
770
+ c8 search pi --between=2024-01-01..2024-12-31 --dateField=endDate
771
+ ```
772
+
773
+ ---
774
+
775
+ ## Identity Management
776
+
777
+ c8ctl supports managing identity resources: users, roles, groups, tenants, authorizations, and mapping rules.
778
+
779
+ ### Users
780
+
781
+ ```bash
782
+ # List users
783
+ c8 list users
784
+
785
+ # Search users
786
+ c8 search users --username=john
787
+ c8 search users --name=John --email=john@example.com
788
+
789
+ # Get user by username
790
+ c8 get user john
791
+
792
+ # Create a user
793
+ c8 create user --username=john --name='John Doe' --email=john@example.com --password=secret
794
+
795
+ # Delete a user
796
+ c8 delete user john
797
+ ```
798
+
799
+ ### Roles
800
+
801
+ ```bash
802
+ # List roles
803
+ c8 list roles
804
+
805
+ # Search roles
806
+ c8 search roles --name=admin
807
+
808
+ # Get role by ID
809
+ c8 get role admin
810
+
811
+ # Create a role
812
+ c8 create role --roleId=viewer --name=Viewer
813
+
814
+ # Delete a role
815
+ c8 delete role viewer
816
+
817
+ # Assign a role to a user
818
+ c8 assign role admin --to-user=john
819
+
820
+ # Unassign a role from a user
821
+ c8 unassign role admin --from-user=john
822
+
823
+ # Assign a role to a group
824
+ c8 assign role admin --to-group=engineering
825
+ ```
826
+
827
+ ### Groups
828
+
829
+ ```bash
830
+ # List groups
831
+ c8 list groups
832
+
833
+ # Search groups
834
+ c8 search groups --name=engineering
835
+
836
+ # Get group by ID
837
+ c8 get group engineering
838
+
839
+ # Create a group
840
+ c8 create group --groupId=engineering --name=Engineering
841
+
842
+ # Delete a group
843
+ c8 delete group engineering
844
+
845
+ # Assign a user to a group
846
+ c8 assign user john --to-group=engineering
847
+
848
+ # Unassign a user from a group
849
+ c8 unassign user john --from-group=engineering
850
+ ```
851
+
852
+ ### Tenants
853
+
854
+ ```bash
855
+ # List tenants
856
+ c8 list tenants
857
+
858
+ # Search tenants
859
+ c8 search tenants --name=production
860
+
861
+ # Get tenant by ID
862
+ c8 get tenant production
863
+
864
+ # Create a tenant
865
+ c8 create tenant --tenantId=production --name=Production
866
+
867
+ # Delete a tenant
868
+ c8 delete tenant production
869
+
870
+ # Assign a group to a tenant
871
+ c8 assign group engineering --to-tenant=production
872
+ ```
873
+
874
+ ### Authorizations
875
+
876
+ ```bash
877
+ # List authorizations
878
+ c8 list auth
879
+
880
+ # Search authorizations
881
+ c8 search auth --ownerId=john --ownerType=USER
882
+
883
+ # Get authorization by key
884
+ c8 get auth 2251799813685249
885
+
886
+ # Create an authorization
887
+ c8 create auth --ownerId=john --ownerType=USER --resourceType=PROCESS_DEFINITION --resourceId=order-process --permissions=READ,UPDATE
888
+
889
+ # Delete an authorization
890
+ c8 delete auth 2251799813685249
891
+ ```
892
+
893
+ ### Mapping Rules
894
+
895
+ ```bash
896
+ # List mapping rules
897
+ c8 list mapping-rules
898
+
899
+ # Search mapping rules
900
+ c8 search mapping-rules --claimName=groups --claimValue=admins
901
+
902
+ # Get mapping rule by ID
903
+ c8 get mapping-rule my-rule
904
+
905
+ # Create a mapping rule
906
+ c8 create mapping-rule --mappingRuleId=my-rule --name='Admin Mapping' --claimName=groups --claimValue=admins
907
+
908
+ # Delete a mapping rule
909
+ c8 delete mapping-rule my-rule
910
+
911
+ # Assign a mapping rule to a tenant
912
+ c8 assign mapping-rule my-rule --to-tenant=production
913
+ ```
914
+
915
+ ---
916
+
917
+ ## Which
918
+
919
+ Show the currently active profile or output mode:
920
+
921
+ ```bash
922
+ # Show active profile
923
+ c8 which profile
924
+
925
+ # Show current output mode
926
+ c8 which output
927
+ ```
928
+
929
+ ---
930
+
931
+ ## Doctor
932
+
933
+ Surface plugin-loading collisions detected at startup:
934
+
935
+ ```bash
936
+ # List loaded plugins and any collisions
937
+ c8 doctor plugin
938
+
939
+ # Machine-readable output
940
+ c8 doctor plugin --json
941
+ ```
942
+
943
+ ---
944
+
945
+ ## Watch with Process Applications
946
+
947
+ Watch mode supports process application deployment with `--process-application` (or `--pa`):
948
+
949
+ ```bash
950
+ # Watch and deploy the entire process application
951
+ c8 watch --process-application
952
+
953
+ # Short form
954
+ c8 watch --pa
955
+
956
+ # Watch a specific directory as a process application
957
+ c8 watch ./my-app --pa
958
+ ```
959
+
960
+ ---
961
+
730
962
  ## Profile Management
731
963
 
732
964
  c8ctl supports two types of profiles:
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 Setup
146
+ #### Manual setup
142
147
 
143
- If you prefer to manage the completion script yourself:
144
-
145
- #### Bash
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
- # Generate and source completion script
153
+ # Bash
149
154
  c8ctl completion bash > ~/.c8ctl-completion.bash
150
155
  echo 'source ~/.c8ctl-completion.bash' >> ~/.bashrc
151
- source ~/.bashrc
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
- ```bash
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 ~/.zshrc
167
- ```
168
-
169
- Or for immediate use in the current session:
170
-
171
- ```bash
172
- source <(c8ctl completion zsh)
173
- ```
161
+ source ~/.c8ctl-completion.zsh
174
162
 
175
- #### Fish
176
-
177
- ```bash
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
- **Plugin Development:**
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
- **Example Plugin Structure:**
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
- - `watch` (alias: `w`) - Watch for changes and auto-deploy
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**: process-instance (pi), process-definition (pd), user-task (ut), incident (inc), job, jobs, variables (vars), message (msg), topology, profile, tenant, plugin
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
@@ -821,7 +688,7 @@ These flags are available on `list` and `search` commands.
821
688
  | `--asc` | boolean | | Sort ascending |
822
689
  | `--desc` | boolean | | Sort descending |
823
690
  | `--limit` | string | | Maximum number of results |
824
- | `--between` | string | | Date range filter (e.g. 7d, 30d, 2024-01-01..2024-12-31) |
691
+ | `--between` | string | | Date range filter (e.g. 2024-01-01..2024-12-31, ..2024-12-31, 2024-01-01..) |
825
692
  | `--dateField` | string | | Date field for --between filter |
826
693
 
827
694
  ### Commands
@@ -1686,12 +1553,11 @@ Remove a profile (alias: rm)
1686
1553
 
1687
1554
  **Aliases:** `rm`
1688
1555
 
1689
- **Resources:** profile, plugin
1556
+ **Resources:** profile
1690
1557
 
1691
1558
  **Positional arguments:**
1692
1559
 
1693
1560
  - **profile:** `<name>` (required)
1694
- - **plugin:** `<package>` (required)
1695
1561
 
1696
1562
  **Flags:**
1697
1563
 
@@ -1950,4 +1816,4 @@ Apache 2.0 - see LICENSE.md
1950
1816
 
1951
1817
  ## Contributing
1952
1818
 
1953
- See `AGENTS.md` for commit message conventions.
1819
+ 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.
@@ -199,7 +199,7 @@ export declare const SEARCH_FLAGS: {
199
199
  };
200
200
  readonly between: {
201
201
  readonly type: "string";
202
- readonly description: "Date range filter (e.g. 7d, 30d, 2024-01-01..2024-12-31)";
202
+ readonly description: "Date range filter (e.g. 2024-01-01..2024-12-31, ..2024-12-31, 2024-01-01..)";
203
203
  };
204
204
  readonly dateField: {
205
205
  readonly type: "string";
@@ -249,7 +249,7 @@ export declare const COMMAND_REGISTRY: {
249
249
  };
250
250
  between: {
251
251
  readonly type: "string";
252
- readonly description: "Date range filter (e.g. 7d, 30d, 2024-01-01..2024-12-31)";
252
+ readonly description: "Date range filter (e.g. 2024-01-01..2024-12-31, ..2024-12-31, 2024-01-01..)";
253
253
  };
254
254
  dateField: {
255
255
  readonly type: "string";
@@ -541,7 +541,7 @@ export declare const COMMAND_REGISTRY: {
541
541
  };
542
542
  between: {
543
543
  readonly type: "string";
544
- readonly description: "Date range filter (e.g. 7d, 30d, 2024-01-01..2024-12-31)";
544
+ readonly description: "Date range filter (e.g. 2024-01-01..2024-12-31, ..2024-12-31, 2024-01-01..)";
545
545
  };
546
546
  dateField: {
547
547
  readonly type: "string";
@@ -1612,10 +1612,6 @@ export declare const COMMAND_REGISTRY: {
1612
1612
  readonly name: "name";
1613
1613
  readonly required: true;
1614
1614
  }];
1615
- plugin: readonly [{
1616
- readonly name: "package";
1617
- readonly required: true;
1618
- }];
1619
1615
  };
1620
1616
  };
1621
1617
  load: {
@@ -1861,6 +1857,22 @@ export declare function resolveAlias(resource: string): string;
1861
1857
  * returns the first match. Use VERB_ALIASES directly for multi-target aliases.
1862
1858
  */
1863
1859
  export declare function getCommandDef(verb: string): CommandDef | undefined;
1860
+ /**
1861
+ * Resolve a verb alias to its canonical verb name.
1862
+ * Returns the input unchanged if it is already canonical (i.e. a direct
1863
+ * registry key) or if no alias mapping exists.
1864
+ *
1865
+ * For multi-target aliases (e.g. "rm" → ["remove", "unload"]),
1866
+ * disambiguates using the resource argument: picks the canonical verb
1867
+ * whose `resources` list includes `resource`. Falls back to the first
1868
+ * target when no resource is given or no match is found.
1869
+ *
1870
+ * Multi-target aliases should be unambiguous at declaration time: each
1871
+ * target verb should own a disjoint set of resources. If two targets
1872
+ * both declare the same resource, the first match wins — fix the
1873
+ * registry to remove the overlap rather than adding runtime tiebreakers.
1874
+ */
1875
+ export declare function resolveVerbAlias(verb: string, resource?: string): string;
1864
1876
  /**
1865
1877
  * Get all flags accepted for a given verb, including global flags and any
1866
1878
  * resource-scoped flags declared under `resourceFlags`.