@getlark/cli 0.4.0 → 0.4.2
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/README.md +109 -87
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -2
- package/dist/api/client.js.map +1 -1
- package/dist/commands/archive-workflow.js +3 -3
- package/dist/commands/archive-workflow.js.map +1 -1
- package/dist/commands/config.js +2 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/create-workflow.js +2 -2
- package/dist/commands/create-workflow.js.map +1 -1
- package/dist/commands/events.js +2 -2
- package/dist/commands/events.js.map +1 -1
- package/dist/commands/execution.js +4 -4
- package/dist/commands/execution.js.map +1 -1
- package/dist/commands/generations.js +2 -2
- package/dist/commands/generations.js.map +1 -1
- package/dist/commands/get-workflow.js +2 -2
- package/dist/commands/get-workflow.js.map +1 -1
- package/dist/commands/invoke.js +6 -6
- package/dist/commands/invoke.js.map +1 -1
- package/dist/commands/list-workflows.js +2 -2
- package/dist/commands/list-workflows.js.map +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.js +1 -1
- package/dist/commands/logout.js.map +1 -1
- package/dist/commands/repairs.js +6 -6
- package/dist/commands/repairs.js.map +1 -1
- package/dist/commands/secret-contexts.js +7 -7
- package/dist/commands/secret-contexts.js.map +1 -1
- package/dist/commands/update-workflow.js +2 -2
- package/dist/commands/update-workflow.js.map +1 -1
- package/dist/commands/workflow-groups.js +6 -6
- package/dist/commands/workflow-groups.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +40 -13
- package/dist/config.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/profile.js +1 -1
- package/dist/profile.js.map +1 -1
- package/package.json +14 -9
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# getlark CLI
|
|
2
2
|
|
|
3
|
-
Command-line interface for creating, invoking, and managing [
|
|
3
|
+
Command-line interface for creating, invoking, and managing [getlark](https://getlark.ai) testing workflows.
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
7
7
|
- [Quickstart](#quickstart)
|
|
8
8
|
- [Configuration](#configuration)
|
|
9
|
+
- [Use with AI coding agents](#use-with-ai-coding-agents)
|
|
9
10
|
- [CI Pipeline Usage](#ci-pipeline-usage)
|
|
10
11
|
- [Usage](#usage)
|
|
11
12
|
- [workflows](#commands) — create, get, update, list, archive, invoke
|
|
@@ -24,86 +25,107 @@ Command-line interface for creating, invoking, and managing [LarkCI](https://get
|
|
|
24
25
|
Requires Node.js >= 18.
|
|
25
26
|
|
|
26
27
|
```bash
|
|
27
|
-
npx -y
|
|
28
|
+
npx -y @getlark/cli@latest workflows invoke --all --wait
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
Or install globally:
|
|
31
32
|
|
|
32
33
|
```bash
|
|
33
|
-
npm install -g
|
|
34
|
+
npm install -g @getlark/cli@latest
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
getlark workflows invoke --all --wait
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
## Configuration
|
|
39
40
|
|
|
40
|
-
The fastest way to authenticate is `
|
|
41
|
+
The fastest way to authenticate is `getlark login`:
|
|
41
42
|
|
|
42
43
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
getlark login # prompts for your API key
|
|
45
|
+
getlark login --api-key your-api-key # non-interactive
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
This stores your credentials at `~/.getlark/config.json` (mode `0600`) so subsequent commands work in any new shell — no need to reload your shell or re-export an env var.
|
|
48
49
|
|
|
49
|
-
The CLI resolves the API key in this order: `--api-key` flag → `
|
|
50
|
+
The CLI resolves the API key in this order: `--api-key` flag → `GETLARK_API_KEY` env var → `~/.getlark/config.json` → error. The same precedence applies to `--api-url` / `GETLARK_API_URL`. CI usage is unchanged — keep using the env var.
|
|
50
51
|
|
|
51
52
|
### Profiles
|
|
52
53
|
|
|
53
|
-
If you work across multiple
|
|
54
|
+
If you work across multiple getlark accounts, use named profiles:
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
getlark --profile staging login # save a second profile
|
|
58
|
+
getlark config list # show all profiles (* = active)
|
|
59
|
+
getlark config use staging # switch the active profile
|
|
60
|
+
getlark --profile staging workflows list # one-shot override
|
|
61
|
+
getlark --profile staging logout # remove the profile
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
The CLI also supports a `.env` file in the current directory.
|
|
64
65
|
|
|
66
|
+
## Use with AI coding agents
|
|
67
|
+
|
|
68
|
+
Lark ships [Agent Skills](https://docs.getlark.ai/agents) that teach Claude Code, Cursor, and other agents how to author, invoke, and manage workflows through the `getlark` CLI — no per-session priming required.
|
|
69
|
+
|
|
70
|
+
**Claude Code plugin** (skills + `/getlark:*` slash commands + optional branch-validation hook):
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
/plugin marketplace add getlark/skills
|
|
74
|
+
/plugin install getlark
|
|
75
|
+
/reload-plugins
|
|
76
|
+
/getlark:setup
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Any other agent** (Cursor, Codex, OpenCode, Windsurf, Gemini CLI, Copilot, …) via the [Vercel Skills CLI](https://github.com/vercel-labs/skills):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npx skills add getlark/skills
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Then ask the agent to run the `setup` skill. See the [Agents docs](https://docs.getlark.ai/agents) for the full skill catalog and the opt-in `PostToolUse` hook that validates your branch after every `git commit` or `git push`.
|
|
86
|
+
|
|
65
87
|
## CI Pipeline Usage
|
|
66
88
|
|
|
67
89
|
The `--wait` flag makes it easy to use in CI pipelines. The command will block until the workflow completes and exit with a non-zero code on failure.
|
|
68
90
|
|
|
69
91
|
### GitHub Actions Example
|
|
70
92
|
|
|
71
|
-
Set the `
|
|
93
|
+
Set the `GETLARK_API_KEY` environment variable in GitHub Actions secrets.
|
|
72
94
|
|
|
73
95
|
```yaml
|
|
74
|
-
- name: Run
|
|
75
|
-
run: npx -y
|
|
96
|
+
- name: Run getlark Tests
|
|
97
|
+
run: npx -y @getlark/cli@latest workflows invoke --all --wait
|
|
76
98
|
env:
|
|
77
|
-
|
|
99
|
+
GETLARK_API_KEY: ${{ secrets.GETLARK_API_KEY }}
|
|
78
100
|
```
|
|
79
101
|
|
|
80
102
|
### CircleCI Example
|
|
81
103
|
|
|
82
|
-
Set the `
|
|
104
|
+
Set the `GETLARK_API_KEY` environment variable in CircleCI.
|
|
83
105
|
|
|
84
106
|
```yaml
|
|
85
|
-
|
|
107
|
+
getlark_tests:
|
|
86
108
|
docker:
|
|
87
109
|
- image: cimg/node:lts
|
|
88
110
|
resource_class: small
|
|
89
111
|
steps:
|
|
90
112
|
- run:
|
|
91
|
-
name: Run
|
|
113
|
+
name: Run getlark Tests
|
|
92
114
|
command: |
|
|
93
|
-
npx -y
|
|
115
|
+
npx -y @getlark/cli@latest workflows invoke --all --wait
|
|
94
116
|
```
|
|
95
117
|
|
|
96
118
|
## Usage
|
|
97
119
|
|
|
98
120
|
```bash
|
|
99
|
-
|
|
121
|
+
getlark [options] <command>
|
|
100
122
|
```
|
|
101
123
|
|
|
102
124
|
### Global Options
|
|
103
125
|
|
|
104
126
|
| Flag | Description |
|
|
105
127
|
| ------------------ | ------------------------------------------------------------ |
|
|
106
|
-
| `--api-key <key>` | API key (overrides `
|
|
128
|
+
| `--api-key <key>` | API key (overrides `GETLARK_API_KEY` env var and stored config) |
|
|
107
129
|
| `--profile <name>` | Profile to read from `~/.getlark/config.json` |
|
|
108
130
|
| `-V, --version` | Display the current version |
|
|
109
131
|
| `-h, --help` | Display help |
|
|
@@ -113,7 +135,7 @@ larkci [options] <command>
|
|
|
113
135
|
#### `workflows create` — Create a workflow
|
|
114
136
|
|
|
115
137
|
```bash
|
|
116
|
-
|
|
138
|
+
getlark workflows create --name "login-flow" --description "Test the login process end-to-end"
|
|
117
139
|
```
|
|
118
140
|
|
|
119
141
|
| Flag | Required | Description | Default |
|
|
@@ -126,7 +148,7 @@ larkci workflows create --name "login-flow" --description "Test the login proces
|
|
|
126
148
|
|
|
127
149
|
```bash
|
|
128
150
|
# Create a deterministic workflow with secret contexts
|
|
129
|
-
|
|
151
|
+
getlark workflows create \
|
|
130
152
|
--name "checkout-flow" \
|
|
131
153
|
--description "Test the full checkout process" \
|
|
132
154
|
--mode deterministic \
|
|
@@ -136,7 +158,7 @@ larkci workflows create \
|
|
|
136
158
|
#### `workflows get` — Get workflow details
|
|
137
159
|
|
|
138
160
|
```bash
|
|
139
|
-
|
|
161
|
+
getlark workflows get <workflow_id>
|
|
140
162
|
```
|
|
141
163
|
|
|
142
164
|
Returns the full workflow resource including status, mode, schedule, and last execution/generation/repair info.
|
|
@@ -144,7 +166,7 @@ Returns the full workflow resource including status, mode, schedule, and last ex
|
|
|
144
166
|
#### `workflows update` — Update a workflow
|
|
145
167
|
|
|
146
168
|
```bash
|
|
147
|
-
|
|
169
|
+
getlark workflows update <workflow_id> --name "new-name" --description "updated description"
|
|
148
170
|
```
|
|
149
171
|
|
|
150
172
|
| Flag | Description |
|
|
@@ -160,7 +182,7 @@ At least one option is required.
|
|
|
160
182
|
#### `workflows archive` — Archive a workflow
|
|
161
183
|
|
|
162
184
|
```bash
|
|
163
|
-
|
|
185
|
+
getlark workflows archive <workflow_id>
|
|
164
186
|
```
|
|
165
187
|
|
|
166
188
|
Archived workflows are hidden from the default list and cannot be invoked until unarchived.
|
|
@@ -168,7 +190,7 @@ Archived workflows are hidden from the default list and cannot be invoked until
|
|
|
168
190
|
#### `workflows unarchive` — Unarchive a workflow
|
|
169
191
|
|
|
170
192
|
```bash
|
|
171
|
-
|
|
193
|
+
getlark workflows unarchive <workflow_id>
|
|
172
194
|
```
|
|
173
195
|
|
|
174
196
|
Restores an archived workflow so it appears in the list and can be invoked again.
|
|
@@ -176,7 +198,7 @@ Restores an archived workflow so it appears in the list and can be invoked again
|
|
|
176
198
|
#### `workflows list` — List workflows
|
|
177
199
|
|
|
178
200
|
```bash
|
|
179
|
-
|
|
201
|
+
getlark workflows list
|
|
180
202
|
```
|
|
181
203
|
|
|
182
204
|
| Flag | Description | Default |
|
|
@@ -189,16 +211,16 @@ larkci workflows list
|
|
|
189
211
|
|
|
190
212
|
```bash
|
|
191
213
|
# Invoke all workflows and wait (up to 5 minutes) for completion
|
|
192
|
-
|
|
214
|
+
getlark workflows invoke --all --wait --timeout 300
|
|
193
215
|
|
|
194
216
|
# Invoke specific workflows and wait
|
|
195
|
-
|
|
217
|
+
getlark workflows invoke --workflow-ids wf_abc123 wf_def456 --wait --timeout 300
|
|
196
218
|
|
|
197
219
|
# Invoke all workflows in a group by ID
|
|
198
|
-
|
|
220
|
+
getlark workflows invoke --group-id wfl_grp_abc123 --wait
|
|
199
221
|
|
|
200
222
|
# Invoke all workflows in a group by name
|
|
201
|
-
|
|
223
|
+
getlark workflows invoke --group-name "Checkout Flow" --wait
|
|
202
224
|
```
|
|
203
225
|
|
|
204
226
|
| Flag | Description |
|
|
@@ -218,25 +240,25 @@ Exit codes: `0` = success, `1` = workflow failure, `2` = timeout, `3` = unexpect
|
|
|
218
240
|
#### `workflows executions get` — Get execution details
|
|
219
241
|
|
|
220
242
|
```bash
|
|
221
|
-
|
|
243
|
+
getlark workflows executions get <workflow_id> <execution_id>
|
|
222
244
|
```
|
|
223
245
|
|
|
224
246
|
#### `workflows executions logs` — Get execution logs
|
|
225
247
|
|
|
226
248
|
```bash
|
|
227
|
-
|
|
249
|
+
getlark workflows executions logs <workflow_id> <execution_id>
|
|
228
250
|
```
|
|
229
251
|
|
|
230
252
|
#### `workflows executions cancel` — Cancel a running execution
|
|
231
253
|
|
|
232
254
|
```bash
|
|
233
|
-
|
|
255
|
+
getlark workflows executions cancel <workflow_id> <execution_id>
|
|
234
256
|
```
|
|
235
257
|
|
|
236
258
|
#### `workflows repairs trigger` — Trigger a workflow repair
|
|
237
259
|
|
|
238
260
|
```bash
|
|
239
|
-
|
|
261
|
+
getlark workflows repairs trigger <workflow_id>
|
|
240
262
|
```
|
|
241
263
|
|
|
242
264
|
Triggers a repair for a workflow. Returns the repair resource.
|
|
@@ -244,7 +266,7 @@ Triggers a repair for a workflow. Returns the repair resource.
|
|
|
244
266
|
#### `workflows repairs list` — List workflow repairs
|
|
245
267
|
|
|
246
268
|
```bash
|
|
247
|
-
|
|
269
|
+
getlark workflows repairs list <workflow_id>
|
|
248
270
|
```
|
|
249
271
|
|
|
250
272
|
| Flag | Description | Default |
|
|
@@ -255,31 +277,31 @@ larkci workflows repairs list <workflow_id>
|
|
|
255
277
|
#### `workflows repairs get` — Get repair details
|
|
256
278
|
|
|
257
279
|
```bash
|
|
258
|
-
|
|
280
|
+
getlark workflows repairs get <workflow_id> <repair_id>
|
|
259
281
|
```
|
|
260
282
|
|
|
261
283
|
#### `workflows repairs cancel` — Cancel a running repair
|
|
262
284
|
|
|
263
285
|
```bash
|
|
264
|
-
|
|
286
|
+
getlark workflows repairs cancel <workflow_id> <repair_id>
|
|
265
287
|
```
|
|
266
288
|
|
|
267
289
|
#### `workflows repairs logs` — Get repair logs
|
|
268
290
|
|
|
269
291
|
```bash
|
|
270
|
-
|
|
292
|
+
getlark workflows repairs logs <workflow_id> <repair_id>
|
|
271
293
|
```
|
|
272
294
|
|
|
273
295
|
#### `workflows generations cancel` — Cancel a running generation
|
|
274
296
|
|
|
275
297
|
```bash
|
|
276
|
-
|
|
298
|
+
getlark workflows generations cancel <workflow_id> <generation_id>
|
|
277
299
|
```
|
|
278
300
|
|
|
279
301
|
#### `workflows events list` — List workflow events
|
|
280
302
|
|
|
281
303
|
```bash
|
|
282
|
-
|
|
304
|
+
getlark workflows events list <workflow_id>
|
|
283
305
|
```
|
|
284
306
|
|
|
285
307
|
| Flag | Description | Default |
|
|
@@ -292,7 +314,7 @@ Lists all events (generations, executions, repairs) for a workflow.
|
|
|
292
314
|
#### `workflow-groups create` — Create a workflow group
|
|
293
315
|
|
|
294
316
|
```bash
|
|
295
|
-
|
|
317
|
+
getlark workflow-groups create --name "Checkout Flow"
|
|
296
318
|
```
|
|
297
319
|
|
|
298
320
|
| Flag | Required | Description |
|
|
@@ -302,7 +324,7 @@ larkci workflow-groups create --name "Checkout Flow"
|
|
|
302
324
|
#### `workflow-groups list` — List workflow groups
|
|
303
325
|
|
|
304
326
|
```bash
|
|
305
|
-
|
|
327
|
+
getlark workflow-groups list
|
|
306
328
|
```
|
|
307
329
|
|
|
308
330
|
| Flag | Description | Default |
|
|
@@ -313,13 +335,13 @@ larkci workflow-groups list
|
|
|
313
335
|
#### `workflow-groups get` — Get a workflow group
|
|
314
336
|
|
|
315
337
|
```bash
|
|
316
|
-
|
|
338
|
+
getlark workflow-groups get <group_id>
|
|
317
339
|
```
|
|
318
340
|
|
|
319
341
|
#### `workflow-groups update` — Update a workflow group
|
|
320
342
|
|
|
321
343
|
```bash
|
|
322
|
-
|
|
344
|
+
getlark workflow-groups update <group_id> --name "Updated Name"
|
|
323
345
|
```
|
|
324
346
|
|
|
325
347
|
| Flag | Description |
|
|
@@ -329,7 +351,7 @@ larkci workflow-groups update <group_id> --name "Updated Name"
|
|
|
329
351
|
#### `workflow-groups delete` — Delete a workflow group
|
|
330
352
|
|
|
331
353
|
```bash
|
|
332
|
-
|
|
354
|
+
getlark workflow-groups delete <group_id>
|
|
333
355
|
```
|
|
334
356
|
|
|
335
357
|
Workflows in the group become ungrouped.
|
|
@@ -337,7 +359,7 @@ Workflows in the group become ungrouped.
|
|
|
337
359
|
#### `secret-contexts list` — List secret contexts
|
|
338
360
|
|
|
339
361
|
```bash
|
|
340
|
-
|
|
362
|
+
getlark secret-contexts list
|
|
341
363
|
```
|
|
342
364
|
|
|
343
365
|
Returns all secret context names and metadata for your account. Does not return secret values.
|
|
@@ -345,7 +367,7 @@ Returns all secret context names and metadata for your account. Does not return
|
|
|
345
367
|
#### `secret-contexts get` — Get a secret context
|
|
346
368
|
|
|
347
369
|
```bash
|
|
348
|
-
|
|
370
|
+
getlark secret-contexts get <context>
|
|
349
371
|
```
|
|
350
372
|
|
|
351
373
|
Returns the context name and the list of key names stored in it. Does not return secret values.
|
|
@@ -353,7 +375,7 @@ Returns the context name and the list of key names stored in it. Does not return
|
|
|
353
375
|
#### `secret-contexts create` — Create or replace a secret context
|
|
354
376
|
|
|
355
377
|
```bash
|
|
356
|
-
|
|
378
|
+
getlark secret-contexts create --context production --secret username=admin --secret password=s3cret
|
|
357
379
|
```
|
|
358
380
|
|
|
359
381
|
| Flag | Required | Description |
|
|
@@ -363,7 +385,7 @@ larkci secret-contexts create --context production --secret username=admin --sec
|
|
|
363
385
|
|
|
364
386
|
```bash
|
|
365
387
|
# Create a secret context with multiple credentials
|
|
366
|
-
|
|
388
|
+
getlark secret-contexts create \
|
|
367
389
|
--context staging \
|
|
368
390
|
--secret api_key=sk_test_abc123 \
|
|
369
391
|
--secret username=testuser \
|
|
@@ -373,7 +395,7 @@ larkci secret-contexts create \
|
|
|
373
395
|
#### `secret-contexts update` — Update a key in a secret context
|
|
374
396
|
|
|
375
397
|
```bash
|
|
376
|
-
|
|
398
|
+
getlark secret-contexts update <context> --key <key> --value <value>
|
|
377
399
|
```
|
|
378
400
|
|
|
379
401
|
| Flag | Required | Description |
|
|
@@ -386,7 +408,7 @@ If the key already exists its value is replaced; if it does not exist it is adde
|
|
|
386
408
|
#### `secret-contexts delete` — Delete a secret context
|
|
387
409
|
|
|
388
410
|
```bash
|
|
389
|
-
|
|
411
|
+
getlark secret-contexts delete <context>
|
|
390
412
|
```
|
|
391
413
|
|
|
392
414
|
Permanently deletes a secret context. Workflows referencing it will no longer have access.
|
|
@@ -394,7 +416,7 @@ Permanently deletes a secret context. Workflows referencing it will no longer ha
|
|
|
394
416
|
#### `secret-contexts delete-key` — Delete a key from a secret context
|
|
395
417
|
|
|
396
418
|
```bash
|
|
397
|
-
|
|
419
|
+
getlark secret-contexts delete-key <context> <key>
|
|
398
420
|
```
|
|
399
421
|
|
|
400
422
|
Removes a single key-value pair from an existing secret context.
|
|
@@ -403,91 +425,91 @@ Removes a single key-value pair from an existing secret context.
|
|
|
403
425
|
|
|
404
426
|
```bash
|
|
405
427
|
# Create a workflow
|
|
406
|
-
|
|
428
|
+
getlark workflows create --name "signup-flow" --description "Test user signup"
|
|
407
429
|
|
|
408
430
|
# Get workflow details
|
|
409
|
-
|
|
431
|
+
getlark workflows get wf_abc123
|
|
410
432
|
|
|
411
433
|
# Update a workflow
|
|
412
|
-
|
|
434
|
+
getlark workflows update wf_abc123 --name "updated-signup-flow" --schedule "0 9 * * *"
|
|
413
435
|
|
|
414
436
|
# List your workflows
|
|
415
|
-
|
|
437
|
+
getlark workflows list --limit 20
|
|
416
438
|
|
|
417
439
|
# List workflows in a group
|
|
418
|
-
|
|
440
|
+
getlark workflows list --group-id grp_abc123
|
|
419
441
|
|
|
420
442
|
# Archive a workflow
|
|
421
|
-
|
|
443
|
+
getlark workflows archive wf_abc123
|
|
422
444
|
|
|
423
445
|
# Unarchive a workflow
|
|
424
|
-
|
|
446
|
+
getlark workflows unarchive wf_abc123
|
|
425
447
|
|
|
426
448
|
# Invoke a workflow but don't wait for completion
|
|
427
|
-
|
|
449
|
+
getlark workflows invoke --workflow-ids wf_abc123
|
|
428
450
|
|
|
429
451
|
# Invoke and wait for completion (10 min default timeout)
|
|
430
|
-
|
|
452
|
+
getlark workflows invoke --workflow-ids wf_abc123 --wait
|
|
431
453
|
|
|
432
454
|
# Invoke and wait (up to 5 minutes) with verbose logs
|
|
433
|
-
|
|
455
|
+
getlark workflows invoke --workflow-ids wf_abc123 --wait --timeout 300 --verbose
|
|
434
456
|
|
|
435
457
|
# Invoke all workflows in a group by ID
|
|
436
|
-
|
|
458
|
+
getlark workflows invoke --group-id wfl_grp_abc123 --wait
|
|
437
459
|
|
|
438
460
|
# Invoke all workflows in a group by name
|
|
439
|
-
|
|
461
|
+
getlark workflows invoke --group-name "Checkout Flow" --wait
|
|
440
462
|
|
|
441
463
|
# Check execution status
|
|
442
|
-
|
|
464
|
+
getlark workflows executions get wf_abc123 exec_xyz789
|
|
443
465
|
|
|
444
466
|
# Fetch execution logs
|
|
445
|
-
|
|
467
|
+
getlark workflows executions logs wf_abc123 exec_xyz789
|
|
446
468
|
|
|
447
469
|
# Cancel a running execution
|
|
448
|
-
|
|
470
|
+
getlark workflows executions cancel wf_abc123 exec_xyz789
|
|
449
471
|
|
|
450
472
|
# Trigger a repair
|
|
451
|
-
|
|
473
|
+
getlark workflows repairs trigger wf_abc123
|
|
452
474
|
|
|
453
475
|
# List repairs
|
|
454
|
-
|
|
476
|
+
getlark workflows repairs list wf_abc123
|
|
455
477
|
|
|
456
478
|
# Cancel a generation
|
|
457
|
-
|
|
479
|
+
getlark workflows generations cancel wf_abc123 gen_xyz789
|
|
458
480
|
|
|
459
481
|
# List events
|
|
460
|
-
|
|
482
|
+
getlark workflows events list wf_abc123
|
|
461
483
|
|
|
462
484
|
# Create a workflow group
|
|
463
|
-
|
|
485
|
+
getlark workflow-groups create --name "Checkout Flow"
|
|
464
486
|
|
|
465
487
|
# List workflow groups
|
|
466
|
-
|
|
488
|
+
getlark workflow-groups list
|
|
467
489
|
|
|
468
490
|
# Delete a workflow group
|
|
469
|
-
|
|
491
|
+
getlark workflow-groups delete grp_abc123
|
|
470
492
|
|
|
471
493
|
# Override API key inline
|
|
472
|
-
|
|
494
|
+
getlark --api-key sk-test-key workflows invoke --workflow-ids wf_abc123
|
|
473
495
|
|
|
474
496
|
# Store credentials for a secret context
|
|
475
|
-
|
|
497
|
+
getlark secret-contexts create --context production --secret username=admin --secret password=s3cret
|
|
476
498
|
|
|
477
499
|
# Update a single key in a secret context
|
|
478
|
-
|
|
500
|
+
getlark secret-contexts update production --key password --value new-s3cret
|
|
479
501
|
|
|
480
502
|
# List all secret contexts
|
|
481
|
-
|
|
503
|
+
getlark secret-contexts list
|
|
482
504
|
|
|
483
505
|
# View the keys stored in a secret context
|
|
484
|
-
|
|
506
|
+
getlark secret-contexts get production
|
|
485
507
|
|
|
486
508
|
# Delete a key from a secret context
|
|
487
|
-
|
|
509
|
+
getlark secret-contexts delete-key production password
|
|
488
510
|
|
|
489
511
|
# Delete a secret context
|
|
490
|
-
|
|
512
|
+
getlark secret-contexts delete production
|
|
491
513
|
```
|
|
492
514
|
|
|
493
515
|
## Contributing
|
package/dist/api/client.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface PollOptions {
|
|
|
8
8
|
pollIntervalMs: number;
|
|
9
9
|
onPoll?: (execution: WorkflowExecutionResource, elapsedMs: number) => void | Promise<void>;
|
|
10
10
|
}
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class GetLarkClient {
|
|
12
12
|
private baseUrl;
|
|
13
13
|
private apiKey;
|
|
14
14
|
constructor(config: Config);
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,qBAAa,YAAa,SAAQ,KAAK;gBACzB,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,CACP,SAAS,EAAE,yBAAyB,EACpC,SAAS,EAAE,MAAM,KACd,IAAI,GAAG,OAAO,CAAC,IAAI,CAA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,OAAO,CAAC,0BAA0B,CAAC;IAQjC,gBAAgB,CACpB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,CAAC;IAO3B,mBAAmB,CACvB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GACzB,OAAO,CAAC,qBAAqB,CAAC;IAQ3B,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASnD,qBAAqB,CACzB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,yBAAyB,CAAC;CA+BtC"}
|
package/dist/api/client.js
CHANGED
|
@@ -4,7 +4,7 @@ export class TimeoutError extends Error {
|
|
|
4
4
|
this.name = "TimeoutError";
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export class
|
|
7
|
+
export class GetLarkClient {
|
|
8
8
|
baseUrl;
|
|
9
9
|
apiKey;
|
|
10
10
|
constructor(config) {
|
|
@@ -27,7 +27,7 @@ export class LarkCIClient {
|
|
|
27
27
|
}
|
|
28
28
|
catch (err) {
|
|
29
29
|
const cause = err instanceof Error ? err.message : String(err);
|
|
30
|
-
throw new Error(`Could not connect to ${this.baseUrl} (${cause}). Is the API running? Check your
|
|
30
|
+
throw new Error(`Could not connect to ${this.baseUrl} (${cause}). Is the API running? Check your GETLARK_API_URL setting.`);
|
|
31
31
|
}
|
|
32
32
|
if (!response.ok) {
|
|
33
33
|
let message = `HTTP ${response.status} ${response.statusText}`;
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;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M,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,CAC3B,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAE1D,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;QAEtE,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAC/C,UAAU,EACV,WAAW,CACZ,CAAC;YACF,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAEzC,MAAM,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YAErC,IAAI,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC3C,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;gBAC3B,MAAM,IAAI,YAAY,CACpB,mBAAmB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,2BAA2B,WAAW,8BAA8B,SAAS,CAAC,MAAM,GAAG,CACvI,CAAC;YACJ,CAAC;YAED,MAAM,KAAK,CAAC,cAAc,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetLarkClient } from "../api/client.js";
|
|
2
2
|
import { getConfig } from "../config.js";
|
|
3
3
|
export function registerArchiveWorkflowCommands(workflows, program) {
|
|
4
4
|
workflows
|
|
@@ -12,7 +12,7 @@ export function registerArchiveWorkflowCommands(workflows, program) {
|
|
|
12
12
|
apiUrl: opts.apiUrl,
|
|
13
13
|
profile: opts.profile,
|
|
14
14
|
});
|
|
15
|
-
const client = new
|
|
15
|
+
const client = new GetLarkClient(config);
|
|
16
16
|
try {
|
|
17
17
|
const workflow = await client.archiveWorkflow(workflowId);
|
|
18
18
|
console.log(JSON.stringify(workflow, null, 2));
|
|
@@ -34,7 +34,7 @@ export function registerArchiveWorkflowCommands(workflows, program) {
|
|
|
34
34
|
apiUrl: opts.apiUrl,
|
|
35
35
|
profile: opts.profile,
|
|
36
36
|
});
|
|
37
|
-
const client = new
|
|
37
|
+
const client = new GetLarkClient(config);
|
|
38
38
|
try {
|
|
39
39
|
const workflow = await client.unarchiveWorkflow(workflowId);
|
|
40
40
|
console.log(JSON.stringify(workflow, null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-workflow.js","sourceRoot":"","sources":["../../src/commands/archive-workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"archive-workflow.js","sourceRoot":"","sources":["../../src/commands/archive-workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,UAAU,+BAA+B,CAC7C,SAAkB,EAClB,OAAgB;IAEhB,SAAS;SACN,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,oBAAoB,CAAC;SACjC,QAAQ,CAAC,eAAe,EAAE,mCAAmC,CAAC;SAC9D,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,EAAE;QACnC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,MAAM,GAAG,SAAS,CAAC;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QAEzC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,U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C,CAAC;YACzD,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;YACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/commands/config.js
CHANGED
|
@@ -9,7 +9,7 @@ export function registerConfigCommand(program) {
|
|
|
9
9
|
.action(() => {
|
|
10
10
|
const file = readConfigFile();
|
|
11
11
|
if (!file || Object.keys(file.profiles).length === 0) {
|
|
12
|
-
console.log(`No profiles configured. Run \`
|
|
12
|
+
console.log(`No profiles configured. Run \`getlark login\` to add one.`);
|
|
13
13
|
console.log(`Config file: ${CONFIG_PATH}`);
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
@@ -32,7 +32,7 @@ export function registerConfigCommand(program) {
|
|
|
32
32
|
.action((profile) => {
|
|
33
33
|
const ok = setCurrentProfile(profile);
|
|
34
34
|
if (!ok) {
|
|
35
|
-
console.error(`Error: Profile "${profile}" not found. Run \`
|
|
35
|
+
console.error(`Error: Profile "${profile}" not found. Run \`getlark config list\` to see available profiles.`);
|
|
36
36
|
process.exit(1);
|
|
37
37
|
}
|
|
38
38
|
console.log(`Active profile is now "${profile}".`);
|