You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EXAMPLES.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,9 @@ c8 create pi --id=order-process --variables='{"orderId":"12345","amount":100}'
63
63
# Create and wait for completion
64
64
c8 create pi --id=order-process --awaitCompletion
65
65
66
+
# Create and wait with custom timeout (30 seconds)
67
+
c8 create pi --id=order-process --awaitCompletion --requestTimeout=30000
68
+
66
69
# Note: --fetchVariables is reserved for future API support
67
70
# All variables are currently returned by default
68
71
```
@@ -71,6 +74,8 @@ c8 create pi --id=order-process --awaitCompletion
71
74
72
75
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.
73
76
77
+
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.
Copy file name to clipboardExpand all lines: PLUGIN-HELP.md
+81-5Lines changed: 81 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,46 @@ This document describes how c8ctl plugins can provide help text that gets integr
6
6
7
7
When users load plugins, their commands automatically appear in the help text. Plugins can optionally provide descriptions for their commands to make the help more informative.
8
8
9
+
## Global Plugin System
10
+
11
+
c8ctl uses a global plugin system where plugins are installed to a user-specific directory. This means:
12
+
13
+
-**No local package.json required**: Plugins work from any directory
14
+
-**Global installation**: Plugins are installed to OS-specific directories:
1.**Automatic Discovery**: When `c8ctl help` is invoked, it scans all loaded plugins
48
+
1.**Automatic Discovery**: When `c8ctl help` is invoked, it scans all loaded plugins from the global plugins directory
12
49
2.**Plugin Section**: If plugins are loaded, a "Plugin Commands" section appears at the bottom of the help text
13
50
3.**Command Listing**: Each plugin command is listed with its optional description
14
51
@@ -83,6 +120,7 @@ export const commands = {
83
120
## Help Output Example
84
121
85
122
Without plugins loaded:
123
+
86
124
```
87
125
c8ctl - Camunda 8 CLI v2.0.0
88
126
@@ -95,6 +133,7 @@ Commands:
95
133
```
96
134
97
135
With plugins loaded:
136
+
98
137
```
99
138
c8ctl - Camunda 8 CLI v2.0.0
100
139
@@ -121,6 +160,7 @@ The plugin loader ([src/plugin-loader.ts](src/plugin-loader.ts)) provides:
121
160
-`getPluginCommandNames()`: Returns array of command names
122
161
-`getPluginCommandsInfo()`: Returns detailed info including descriptions
123
162
- Automatic metadata extraction during plugin loading
163
+
- Scans the [global plugins directory](#global-plugin-system) for installed plugins
124
164
125
165
### Help Command
126
166
@@ -150,25 +190,59 @@ interface PluginMetadata {
150
190
2.**Keep descriptions concise**: Aim for one line (< 60 characters)
151
191
3.**Use imperative verbs**: Start with action words (Analyze, Deploy, Check, etc.)
152
192
4.**Match command names**: Ensure metadata command names match exported functions
153
-
5.**TypeScript plugins**: The `c8ctl-plugin.js` entry point must be JavaScript. Node.js doesn't support type stripping in `node_modules`. Transpile TypeScript to JavaScript before publishing your plugin.
6.**TypeScript plugins**: The `c8ctl-plugin.js` entry point must be JavaScript. Node.js doesn't support type stripping in `node_modules`. Transpile TypeScript to JavaScript before publishing your plugin.
Copy file name to clipboardExpand all lines: README.md
+49-10Lines changed: 49 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# c8ctl - Camunda 8 CLI
1
+
# Cocktail (c8ctl) - Camunda 8 CLI
2
2
3
-
A minimal-dependency CLI for Camunda 8 operations built on top of `@camunda8/orchestration-cluster-api`.
3
+
c8ctl (_pronounced: "cocktail"_) — a minimal-dependency CLI for Camunda 8 operations built on top of [`@camunda8/orchestration-cluster-api`](https://www.npmjs.com/package/@camunda8/orchestration-cluster-api).
# Create process instance with custom timeout (30 seconds)
113
+
c8ctl create pi --id=myProcess --awaitCompletion --requestTimeout=30000
114
+
112
115
# Await process instance completion (alias for create with --awaitCompletion)
113
116
c8ctl await pi --id=myProcess
114
117
c8ctl await process-instance --id=myProcess
115
118
119
+
# Await with custom timeout
120
+
c8ctl await pi --id=myProcess --requestTimeout=60000
121
+
116
122
# Cancel process instance
117
123
c8ctl cancel pi 123456
118
124
@@ -306,9 +312,24 @@ Debug output is written to stderr with timestamps and won't interfere with norma
306
312
307
313
### Plugin Management
308
314
309
-
c8ctl supports a plugin system that allows extending the CLI with custom commands via npm packages. Plugins are tracked in a registry file (`~/.config/c8ctl/plugins.json` on Linux, similar locations on other platforms) for persistence across npm operations.
315
+
c8ctl supports a global plugin system that allows extending the CLI with custom commands via npm packages. Plugins are installed globally to a user-specific directory and tracked in a registry file.
-`✓ Installed` - Plugin is in registry and installed
341
-
-`⚠ Not installed` - Plugin is in registry but not in node_modules (run `sync`)
342
-
-`⚠ Not in registry` - Plugin is in package.json but not tracked in registry
374
+
-`⚠ Not installed` - Plugin is in registry but not in global directory (run `sync`)
375
+
-`⚠ Not in registry` - Plugin is installed but not tracked in registry
343
376
-`c8ctl sync plugins` synchronizes plugins from the registry, rebuilding or reinstalling as needed
344
377
378
+
**Plugin Development:**
379
+
- Use `c8ctl init plugin <name>` to scaffold a new plugin with TypeScript template
380
+
- Generated scaffold includes all necessary files and build configuration
381
+
- Plugins have access to the c8ctl runtime via `globalThis.c8ctl`
382
+
- See the bundled `hello-world` plugin in `default-plugins/` for a complete example
383
+
345
384
**Plugin Requirements:**
346
385
- Plugin packages must be regular Node.js modules
347
386
- They must include a `c8ctl-plugin.js` or `c8ctl-plugin.ts` file in the root directory
348
387
- The plugin file must export a `commands` object
349
388
- Optionally export a `metadata` object to provide help text
350
-
- Plugins are installed in `node_modules` like regular npm packages
389
+
- Plugins are installed globally and work from any directory
351
390
- The runtime object `c8ctl` provides environment information to plugins
352
391
-**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.
0 commit comments