{"_id":"@getlark/cli","_rev":"4-edac19295f4e64d3741d1babaa1c0455","name":"@getlark/cli","dist-tags":{"latest":"0.5.0"},"versions":{"0.3.0":{"name":"@getlark/cli","version":"0.3.0","keywords":["larkci","cli","testing","ci","e2e-testing","sanity-testing","qa"],"author":"","license":"ISC","_id":"@getlark/cli@0.3.0","maintainers":[{"name":"vijitlark","email":"vijit@uselark.io"},{"name":"getlark-founders","email":"founders@getlark.ai"}],"bin":{"getlark":"dist/index.js"},"dist":{"shasum":"43eefe78965500dec78ae2c829da6d33f757d8d9","tarball":"https://registry.npmjs.org/@getlark/cli/-/cli-0.3.0.tgz","fileCount":66,"integrity":"sha512-KoMHDMJx1V8ADQcFz74f0ehJwEO1fLkmIJfOmizHN5OUIpN/oe3+/jh4GW5ohkoP78VtYJVtlIDABbe18uaPRA==","signatures":[{"sig":"MEQCIAUH/1FlGhKigzeXDW0F1Y9MqRXGattVRmCrC0Y7LXWeAiBpJEWGcm+lVNIZQjmlsQ5QFqp8ylS0kgOe5ZiCUZWAWw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":132322},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"66368b01ff5147e32858675185e86f76bc8b3e3b","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","publish:all":"npm run publish:larkci && npm run publish:scoped","prepublishOnly":"npm run build","publish:larkci":"npm pkg set name=larkci bin.larkci=./dist/index.js && npm pkg delete bin.getlark && npm publish","publish:scoped":"npm pkg set name=@getlark/cli bin.getlark=./dist/index.js && npm pkg delete bin.larkci && npm publish; code=$?; npm pkg set name=larkci bin.larkci=./dist/index.js && npm pkg delete bin.getlark; exit $code"},"_npmUser":{"name":"getlark-founders","email":"founders@getlark.ai"},"_npmVersion":"11.6.2","description":"LarkCI CLI - Invoke testing workflows and manage test executions","directories":{},"_nodeVersion":"24.11.1","dependencies":{"dotenv":"^16.4.5","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.3.0_1776725564146_0.532896794336954","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@getlark/cli","version":"0.4.0","keywords":["larkci","cli","testing","ci","e2e-testing","sanity-testing","qa"],"author":"","license":"ISC","_id":"@getlark/cli@0.4.0","maintainers":[{"name":"vijitlark","email":"vijit@uselark.io"},{"name":"getlark-founders","email":"founders@getlark.ai"}],"bin":{"getlark":"dist/index.js"},"dist":{"shasum":"e6fad62818edca4ac7979ef52dfb99968b7d9c8b","tarball":"https://registry.npmjs.org/@getlark/cli/-/cli-0.4.0.tgz","fileCount":86,"integrity":"sha512-l8tAYVcxpIWHnGsXzgFDRUqpo2cqLGeuBFliWBxBLMB893KefvHcNukdcP1L3zMkdykH8xlCPEvsZeuKoQ5qoA==","signatures":[{"sig":"MEUCIQDoxK+50VXyYD3LbxTR+iVxa2gA6shD88LGDq/XxGVKmgIgTJgGG3mKE0r+D1xIXb33gAQDitVMyd0XjQ7fx0eWE1Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":163005},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"63f08b797e97e41c0063ae54ff354a13c4d581af","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","publish:all":"npm run publish:larkci && npm run publish:scoped","prepublishOnly":"npm run build","publish:larkci":"npm pkg set name=larkci bin.larkci=./dist/index.js && npm pkg delete bin.getlark && npm publish","publish:scoped":"npm pkg set name=@getlark/cli bin.getlark=./dist/index.js && npm pkg delete bin.larkci && npm publish; code=$?; npm pkg set name=larkci bin.larkci=./dist/index.js && npm pkg delete bin.getlark; exit $code"},"_npmUser":{"name":"getlark-founders","email":"founders@getlark.ai"},"_npmVersion":"11.6.2","description":"LarkCI CLI - Invoke testing workflows and manage test executions","directories":{},"_nodeVersion":"24.11.1","dependencies":{"dotenv":"^16.4.5","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.4.0_1778711666769_0.831373629242651","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"@getlark/cli","version":"0.4.2","keywords":["getlark","cli","testing","ci","e2e-testing","sanity-testing","qa"],"author":{"name":"getlark"},"license":"MIT","_id":"@getlark/cli@0.4.2","maintainers":[{"name":"vijitlark","email":"vijit@uselark.io"},{"name":"getlark-founders","email":"founders@getlark.ai"}],"homepage":"https://getlark.ai","bugs":{"url":"https://github.com/getlark/cli/issues"},"bin":{"getlark":"dist/index.js"},"dist":{"shasum":"149ea85a7b2c2b7f11c3dc43241bf6708800bcb2","tarball":"https://registry.npmjs.org/@getlark/cli/-/cli-0.4.2.tgz","fileCount":86,"integrity":"sha512-IRUfuaoStHL6Wj9UM0+iYOWUnkHw6u6eMLvq4gk9o9rfZ2inTPWP8UfCQDoFRLTqLJPMWCfOccsRhEr6489wAw==","signatures":[{"sig":"MEUCIHMBGYcrpDF0HTQGNWkuEqGiUY740HxfSDDSEDatINJjAiEAtbzBH499TZETCoETUN2nr5cDDwZUb0WiJEKvnfs+iX0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@getlark%2fcli@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":165728},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"aa0cc98aab7c1d766d086eabc33d6e31c71d5255","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"getlark-founders","email":"founders@getlark.ai"},"repository":{"url":"git+https://github.com/getlark/cli.git","type":"git"},"_npmVersion":"10.9.7","description":"getlark CLI - Invoke testing workflows and manage test executions","directories":{},"_nodeVersion":"22.22.2","dependencies":{"dotenv":"^16.4.5","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.4.2_1778714601838_0.5548287945032291","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@getlark/cli","version":"0.5.0","description":"getlark CLI - Invoke testing workflows and manage test executions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/getlark/cli.git"},"bugs":{"url":"https://github.com/getlark/cli/issues"},"homepage":"https://getlark.ai","author":{"name":"getlark"},"type":"module","main":"dist/index.js","bin":{"getlark":"dist/index.js"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"keywords":["getlark","cli","testing","ci","e2e-testing","sanity-testing","qa"],"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"dependencies":{"commander":"^13.1.0","dotenv":"^16.4.5"},"devDependencies":{"@types/node":"^22.10.0","tsx":"^4.19.0","typescript":"^5.7.0"},"_id":"@getlark/cli@0.5.0","gitHead":"0ade7cf46e4e1fdbe0a9f043c6bfdc7d12dd3db7","types":"./dist/index.d.ts","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-iYYujXxAwzZNuPpxqPxucrf8Qfxw91q2EEsxFgjSYCLFOpX0v/byWl412r1bHx/RdVOf8ee+m1a6Ry3tnC9gKQ==","shasum":"406c7b1bc8366b7a226a1a66af039338107ffdb1","tarball":"https://registry.npmjs.org/@getlark/cli/-/cli-0.5.0.tgz","fileCount":90,"unpackedSize":197025,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@getlark%2fcli@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD5gIkoSYfeyYX1NKlwlmalQR3foI7NdITRy3dfI7jkFgIgS8iMrG1GQyGu5HQH9ziDAx5elPa2PoCLntJELW05m9M="}]},"_npmUser":{"name":"getlark-founders","email":"founders@getlark.ai"},"directories":{},"maintainers":[{"name":"vijitlark","email":"vijit@uselark.io"},{"name":"getlark-founders","email":"founders@getlark.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.5.0_1779080267780_0.31640822865847307"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-20T22:52:44.032Z","modified":"2026-05-18T04:57:48.293Z","0.3.0":"2026-04-20T22:52:44.408Z","0.4.0":"2026-05-13T22:34:26.953Z","0.4.2":"2026-05-13T23:23:21.997Z","0.5.0":"2026-05-18T04:57:47.966Z"},"bugs":{"url":"https://github.com/getlark/cli/issues"},"author":{"name":"getlark"},"license":"MIT","homepage":"https://getlark.ai","keywords":["getlark","cli","testing","ci","e2e-testing","sanity-testing","qa"],"repository":{"type":"git","url":"git+https://github.com/getlark/cli.git"},"description":"getlark CLI - Invoke testing workflows and manage test executions","maintainers":[{"name":"vijitlark","email":"vijit@uselark.io"},{"name":"getlark-founders","email":"founders@getlark.ai"}],"readme":"# getlark CLI\n\nCommand-line interface for creating, invoking, and managing [getlark](https://getlark.ai) testing workflows.\n\n## Table of Contents\n\n- [Quickstart](#quickstart)\n- [Configuration](#configuration)\n- [Use with AI coding agents](#use-with-ai-coding-agents)\n- [CI Pipeline Usage](#ci-pipeline-usage)\n- [Usage](#usage)\n  - [workflows](#commands) — create, get, update, list, archive, invoke\n  - [workflows executions](#workflows-executions-get--get-execution-details) — get, logs, cancel\n  - [workflows repairs](#workflows-repairs-trigger--trigger-a-workflow-repair) — trigger, list, get, cancel, logs\n  - [workflows generations](#workflows-generations-cancel--cancel-a-running-generation) — cancel\n  - [workflows events](#workflows-events-list--list-workflow-events) — list\n  - [workflow-groups](#workflow-groups-create--create-a-workflow-group) — create, list, get, update, delete\n  - [jobs](#jobs-create--create-a-job-from-an-inline-json-input-file) — create, list, get, cancel, upload, validate\n  - [secret-contexts](#secret-contexts-list--list-secret-contexts) — list, get, create, update, delete, delete-key\n  - [Examples](#examples)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Quickstart\n\nRequires Node.js >= 18.\n\n```bash\nnpx -y @getlark/cli@latest workflows invoke --all --wait\n```\n\nOr install globally:\n\n```bash\nnpm install -g @getlark/cli@latest\n\ngetlark workflows invoke --all --wait\n```\n\n## Configuration\n\nThe fastest way to authenticate is `getlark login`:\n\n```bash\ngetlark login                          # prompts for your API key\ngetlark login --api-key your-api-key   # non-interactive\n```\n\nThis 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.\n\nThe 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.\n\n### Profiles\n\nIf you work across multiple getlark accounts, use named profiles:\n\n```bash\ngetlark --profile staging login        # save a second profile\ngetlark config list                    # show all profiles (* = active)\ngetlark config use staging             # switch the active profile\ngetlark --profile staging workflows list   # one-shot override\ngetlark --profile staging logout       # remove the profile\n```\n\nThe CLI also supports a `.env` file in the current directory.\n\n## Use with AI coding agents\n\nLark 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.\n\n**Claude Code plugin** (skills + `/getlark:*` slash commands + optional branch-validation hook):\n\n```\n/plugin marketplace add getlark/skills\n/plugin install getlark\n/reload-plugins\n/getlark:setup\n```\n\n**Any other agent** (Cursor, Codex, OpenCode, Windsurf, Gemini CLI, Copilot, …) via the [Vercel Skills CLI](https://github.com/vercel-labs/skills):\n\n```bash\nnpx skills add getlark/skills\n```\n\nThen 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`.\n\n## CI Pipeline Usage\n\nThe `--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.\n\n### GitHub Actions Example\n\nSet the `GETLARK_API_KEY` environment variable in GitHub Actions secrets.\n\n```yaml\n- name: Run getlark Tests\n  run: npx -y @getlark/cli@latest workflows invoke --all --wait\n  env:\n    GETLARK_API_KEY: ${{ secrets.GETLARK_API_KEY }}\n```\n\n### CircleCI Example\n\nSet the `GETLARK_API_KEY` environment variable in CircleCI.\n\n```yaml\ngetlark_tests:\n  docker:\n    - image: cimg/node:lts\n  resource_class: small\n  steps:\n    - run:\n        name: Run getlark Tests\n        command: |\n          npx -y @getlark/cli@latest workflows invoke --all --wait\n```\n\n## Usage\n\n```bash\ngetlark [options] <command>\n```\n\n### Global Options\n\n| Flag               | Description                                                  |\n| ------------------ | ------------------------------------------------------------ |\n| `--api-key <key>`  | API key (overrides `GETLARK_API_KEY` env var and stored config) |\n| `--profile <name>` | Profile to read from `~/.getlark/config.json`                |\n| `-V, --version`    | Display the current version                                  |\n| `-h, --help`       | Display help                                                 |\n\n### Commands\n\n#### `workflows create` — Create a workflow\n\n```bash\ngetlark workflows create --name \"login-flow\" --description \"Test the login process end-to-end\"\n```\n\n| Flag                              | Required | Description                                    | Default     |\n| --------------------------------- | -------- | ---------------------------------------------- | ----------- |\n| `--name <name>`                   | Yes      | Workflow name                                  |             |\n| `--description <description>`     | Yes      | Workflow description                           |             |\n| `--mode <mode>`                   | No       | Execution mode: `ai_driven` or `deterministic` | `ai_driven` |\n| `--secret-contexts <contexts...>` | No       | Secret contexts to attach to the workflow      |             |\n| `--group-id <groupId>`            | No       | Workflow group ID to assign this workflow to   |             |\n\n```bash\n# Create a deterministic workflow with secret contexts\ngetlark workflows create \\\n  --name \"checkout-flow\" \\\n  --description \"Test the full checkout process\" \\\n  --mode deterministic \\\n  --secret-contexts production staging\n```\n\n#### `workflows get` — Get workflow details\n\n```bash\ngetlark workflows get <workflow_id>\n```\n\nReturns the full workflow resource including status, mode, schedule, and last execution/generation/repair info.\n\n#### `workflows update` — Update a workflow\n\n```bash\ngetlark workflows update <workflow_id> --name \"new-name\" --description \"updated description\"\n```\n\n| Flag                              | Description                               |\n| --------------------------------- | ----------------------------------------- |\n| `--name <name>`                   | New name for the workflow                 |\n| `--description <description>`     | New description for the workflow          |\n| `--secret-contexts <contexts...>` | Secret contexts to attach                 |\n| `--schedule <cron>`               | Cron schedule for the workflow            |\n| `--group-id <groupId>`            | Workflow group ID (use `null` to ungroup) |\n\nAt least one option is required.\n\n#### `workflows archive` — Archive a workflow\n\n```bash\ngetlark workflows archive <workflow_id>\n```\n\nArchived workflows are hidden from the default list and cannot be invoked until unarchived.\n\n#### `workflows unarchive` — Unarchive a workflow\n\n```bash\ngetlark workflows unarchive <workflow_id>\n```\n\nRestores an archived workflow so it appears in the list and can be invoked again.\n\n#### `workflows list` — List workflows\n\n```bash\ngetlark workflows list\n```\n\n| Flag                   | Description                     | Default |\n| ---------------------- | ------------------------------- | ------- |\n| `--limit <number>`     | Max workflows to return (1–100) | `10`    |\n| `--offset <number>`    | Number of workflows to skip     | `0`     |\n| `--group-id <groupId>` | Filter workflows by group ID    |         |\n\n#### `workflows invoke` — Invoke workflows\n\n```bash\n# Invoke all workflows and wait (up to 5 minutes) for completion\ngetlark workflows invoke --all --wait --timeout 300\n\n# Invoke specific workflows and wait\ngetlark workflows invoke --workflow-ids wf_abc123 wf_def456 --wait --timeout 300\n\n# Invoke all workflows in a group by ID\ngetlark workflows invoke --group-id wfl_grp_abc123 --wait\n\n# Invoke all workflows in a group by name\ngetlark workflows invoke --group-name \"Checkout Flow\" --wait\n```\n\n| Flag                       | Description                                                                      |\n| -------------------------- | -------------------------------------------------------------------------------- |\n| `--workflow-ids <id...>`   | The IDs of the workflows to invoke                                               |\n| `--all`                    | Invoke all workflows                                                             |\n| `--group-id <groupId>`     | Invoke all workflows in a group (by group ID)                                    |\n| `--group-name <groupName>` | Invoke all workflows in a group (by group name)                                  |\n| `--wait`                   | Wait for the execution to finish (successfully or unsuccessfully) before exiting |\n| `--timeout <seconds>`      | Maximum time to wait in seconds (default: 600, requires `--wait`)                |\n| `--verbose`                | Print verbose output (includes logs)                                             |\n\nOne of `--workflow-ids`, `--all`, `--group-id`, or `--group-name` is required.\n\nExit codes: `0` = success, `1` = workflow failure, `2` = timeout, `3` = unexpected error.\n\n#### `workflows executions get` — Get execution details\n\n```bash\ngetlark workflows executions get <workflow_id> <execution_id>\n```\n\n#### `workflows executions logs` — Get execution logs\n\n```bash\ngetlark workflows executions logs <workflow_id> <execution_id>\n```\n\n#### `workflows executions cancel` — Cancel a running execution\n\n```bash\ngetlark workflows executions cancel <workflow_id> <execution_id>\n```\n\n#### `workflows repairs trigger` — Trigger a workflow repair\n\n```bash\ngetlark workflows repairs trigger <workflow_id>\n```\n\nTriggers a repair for a workflow. Returns the repair resource.\n\n#### `workflows repairs list` — List workflow repairs\n\n```bash\ngetlark workflows repairs list <workflow_id>\n```\n\n| Flag                | Description                   | Default |\n| ------------------- | ----------------------------- | ------- |\n| `--limit <number>`  | Max repairs to return (1–100) | `10`    |\n| `--offset <number>` | Number of repairs to skip     | `0`     |\n\n#### `workflows repairs get` — Get repair details\n\n```bash\ngetlark workflows repairs get <workflow_id> <repair_id>\n```\n\n#### `workflows repairs cancel` — Cancel a running repair\n\n```bash\ngetlark workflows repairs cancel <workflow_id> <repair_id>\n```\n\n#### `workflows repairs logs` — Get repair logs\n\n```bash\ngetlark workflows repairs logs <workflow_id> <repair_id>\n```\n\n#### `workflows generations cancel` — Cancel a running generation\n\n```bash\ngetlark workflows generations cancel <workflow_id> <generation_id>\n```\n\n#### `workflows events list` — List workflow events\n\n```bash\ngetlark workflows events list <workflow_id>\n```\n\n| Flag                | Description                  | Default |\n| ------------------- | ---------------------------- | ------- |\n| `--limit <number>`  | Max events to return (1–100) | `10`    |\n| `--offset <number>` | Number of events to skip     | `0`     |\n\nLists all events (generations, executions, repairs) for a workflow.\n\n#### `workflow-groups create` — Create a workflow group\n\n```bash\ngetlark workflow-groups create --name \"Checkout Flow\"\n```\n\n| Flag            | Required | Description                |\n| --------------- | -------- | -------------------------- |\n| `--name <name>` | Yes      | Name of the workflow group |\n\n#### `workflow-groups list` — List workflow groups\n\n```bash\ngetlark workflow-groups list\n```\n\n| Flag                | Description                  | Default |\n| ------------------- | ---------------------------- | ------- |\n| `--limit <number>`  | Max groups to return (1–100) | `10`    |\n| `--offset <number>` | Number of groups to skip     | `0`     |\n\n#### `workflow-groups get` — Get a workflow group\n\n```bash\ngetlark workflow-groups get <group_id>\n```\n\n#### `workflow-groups update` — Update a workflow group\n\n```bash\ngetlark workflow-groups update <group_id> --name \"Updated Name\"\n```\n\n| Flag            | Description                     |\n| --------------- | ------------------------------- |\n| `--name <name>` | New name for the workflow group |\n\n#### `workflow-groups delete` — Delete a workflow group\n\n```bash\ngetlark workflow-groups delete <group_id>\n```\n\nWorkflows in the group become ungrouped.\n\n#### `jobs create` — Create a job from an inline JSON input file\n\n```bash\nlarkci jobs create --name \"Import workflows\" --input-file ./workflows.json\n```\n\n| Flag                   | Required | Description                                                            | Default            |\n| ---------------------- | -------- | ---------------------------------------------------------------------- | ------------------ |\n| `--name <name>`        | Yes      | Human-readable name for the job                                        |                    |\n| `--input-file <path>`  | Yes      | Path to a JSON file with the job input (see schema below)              |                    |\n| `--type <type>`        | No       | Job type. Currently only `workflow_import` is supported.               | `workflow_import`  |\n\n##### `workflow_import` input file schema\n\nThe input file is a single JSON object. The same file is accepted by `jobs create`, `jobs upload`, and `jobs validate`.\n\nTop-level object:\n\n| Field         | Type                       | Required | Description                                                          |\n| ------------- | -------------------------- | -------- | -------------------------------------------------------------------- |\n| `workflows`   | array of workflow entries  | Yes      | One or more workflows to import. Must contain at least one entry.    |\n\nEach entry under `workflows`:\n\n| Field              | Type                                  | Required | Description                                                                                          |\n| ------------------ | ------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------- |\n| `name`             | string (non-empty)                    | Yes      | Workflow name.                                                                                       |\n| `description`      | string (non-empty)                    | Yes      | Workflow description; the AI agent reads this at runtime to perform the test.                        |\n| `mode`             | `\"ai_driven\"` \\| `\"deterministic\"`    | Yes      | Execution mode for the workflow.                                                                     |\n| `secret_contexts`  | array of unique strings \\| `null`     | No       | Secret context names the workflow may use. Omit or set `null` for no secret contexts.                |\n| `group_id`         | string \\| `null`                      | No       | ID of the workflow group to assign the workflow to. Omit or set `null` to leave it ungrouped.        |\n\nNo additional properties are accepted at the top level or per workflow.\n\nExample `workflows.json`:\n\n```json\n{\n  \"workflows\": [\n    {\n      \"name\": \"Checkout smoke\",\n      \"description\": \"Verify checkout works end-to-end with a test card.\",\n      \"mode\": \"ai_driven\",\n      \"secret_contexts\": [\"staging\"],\n      \"group_id\": \"wgrp_01h...\"\n    },\n    {\n      \"name\": \"Login regression\",\n      \"description\": \"Log in with seeded credentials and confirm the dashboard loads.\",\n      \"mode\": \"deterministic\"\n    }\n  ]\n}\n```\n\nTip: run `larkci jobs validate --file ./workflows.json` before submitting to catch schema errors without creating a job.\n\n#### `jobs list` — List jobs\n\n```bash\nlarkci jobs list --status pending --status running\n```\n\n| Flag                  | Description                                                                                | Default |\n| --------------------- | ------------------------------------------------------------------------------------------ | ------- |\n| `--limit <number>`    | Max jobs to return (1–100)                                                                 | `20`    |\n| `--offset <number>`   | Number of jobs to skip                                                                     | `0`     |\n| `--status <status>`   | Filter by status (`pending`, `running`, `completed`, `failed`, `cancelled`); repeatable    |         |\n\n#### `jobs get` — Get a job\n\n```bash\nlarkci jobs get <job_id>\n```\n\n#### `jobs cancel` — Cancel a job\n\n```bash\nlarkci jobs cancel <job_id>\n```\n\nCancels a pending or running job.\n\n#### `jobs upload` — Create a job by uploading an input file\n\n```bash\nlarkci jobs upload --name \"Import workflows\" --file ./workflows.json\n```\n\n| Flag             | Required | Description                                                                            | Default            |\n| ---------------- | -------- | -------------------------------------------------------------------------------------- | ------------------ |\n| `--name <name>`  | Yes      | Human-readable name for the job                                                        |                    |\n| `--file <path>`  | Yes      | Path to the input file (same schema as [`jobs create`](#workflow_import-input-file-schema)) |                    |\n| `--type <type>`  | No       | Job type. Currently only `workflow_import` is supported.                               | `workflow_import`  |\n\nSends the file as `multipart/form-data` to `/jobs/upload`. The job stores the original filename so you can retrieve it later from `larkci jobs get`.\n\n#### `jobs validate` — Validate an input file without creating a job\n\n```bash\nlarkci jobs validate --file ./workflows.json\n```\n\n| Flag             | Required | Description                                                                            | Default            |\n| ---------------- | -------- | -------------------------------------------------------------------------------------- | ------------------ |\n| `--file <path>`  | Yes      | Path to the input file (same schema as [`jobs create`](#workflow_import-input-file-schema)) |                    |\n| `--type <type>`  | No       | Job type. Currently only `workflow_import` is supported.                               | `workflow_import`  |\n\nPrints the validation report and exits non-zero if `valid: false`.\n\n#### `secret-contexts list` — List secret contexts\n\n```bash\ngetlark secret-contexts list\n```\n\nReturns all secret context names and metadata for your account. Does not return secret values.\n\n#### `secret-contexts get` — Get a secret context\n\n```bash\ngetlark secret-contexts get <context>\n```\n\nReturns the context name and the list of key names stored in it. Does not return secret values.\n\n#### `secret-contexts create` — Create or replace a secret context\n\n```bash\ngetlark secret-contexts create --context production --secret username=admin --secret password=s3cret\n```\n\n| Flag                   | Required | Description                                        |\n| ---------------------- | -------- | -------------------------------------------------- |\n| `--context <name>`     | Yes      | Name of the secret context                         |\n| `--secret <key=value>` | Yes      | Secret key-value pair (repeat for multiple values) |\n\n```bash\n# Create a secret context with multiple credentials\ngetlark secret-contexts create \\\n  --context staging \\\n  --secret api_key=sk_test_abc123 \\\n  --secret username=testuser \\\n  --secret password=testpass\n```\n\n#### `secret-contexts update` — Update a key in a secret context\n\n```bash\ngetlark secret-contexts update <context> --key <key> --value <value>\n```\n\n| Flag              | Required | Description                 |\n| ----------------- | -------- | --------------------------- |\n| `--key <key>`     | Yes      | The key to create or update |\n| `--value <value>` | Yes      | The new value for the key   |\n\nIf the key already exists its value is replaced; if it does not exist it is added.\n\n#### `secret-contexts delete` — Delete a secret context\n\n```bash\ngetlark secret-contexts delete <context>\n```\n\nPermanently deletes a secret context. Workflows referencing it will no longer have access.\n\n#### `secret-contexts delete-key` — Delete a key from a secret context\n\n```bash\ngetlark secret-contexts delete-key <context> <key>\n```\n\nRemoves a single key-value pair from an existing secret context.\n\n### Examples\n\n```bash\n# Create a workflow\ngetlark workflows create --name \"signup-flow\" --description \"Test user signup\"\n\n# Get workflow details\ngetlark workflows get wf_abc123\n\n# Update a workflow\ngetlark workflows update wf_abc123 --name \"updated-signup-flow\" --schedule \"0 9 * * *\"\n\n# List your workflows\ngetlark workflows list --limit 20\n\n# List workflows in a group\ngetlark workflows list --group-id grp_abc123\n\n# Archive a workflow\ngetlark workflows archive wf_abc123\n\n# Unarchive a workflow\ngetlark workflows unarchive wf_abc123\n\n# Invoke a workflow but don't wait for completion\ngetlark workflows invoke --workflow-ids wf_abc123\n\n# Invoke and wait for completion (10 min default timeout)\ngetlark workflows invoke --workflow-ids wf_abc123 --wait\n\n# Invoke and wait (up to 5 minutes) with verbose logs\ngetlark workflows invoke --workflow-ids wf_abc123 --wait --timeout 300 --verbose\n\n# Invoke all workflows in a group by ID\ngetlark workflows invoke --group-id wfl_grp_abc123 --wait\n\n# Invoke all workflows in a group by name\ngetlark workflows invoke --group-name \"Checkout Flow\" --wait\n\n# Check execution status\ngetlark workflows executions get wf_abc123 exec_xyz789\n\n# Fetch execution logs\ngetlark workflows executions logs wf_abc123 exec_xyz789\n\n# Cancel a running execution\ngetlark workflows executions cancel wf_abc123 exec_xyz789\n\n# Trigger a repair\ngetlark workflows repairs trigger wf_abc123\n\n# List repairs\ngetlark workflows repairs list wf_abc123\n\n# Cancel a generation\ngetlark workflows generations cancel wf_abc123 gen_xyz789\n\n# List events\ngetlark workflows events list wf_abc123\n\n# Create a workflow group\ngetlark workflow-groups create --name \"Checkout Flow\"\n\n# List workflow groups\ngetlark workflow-groups list\n\n# Delete a workflow group\ngetlark workflow-groups delete grp_abc123\n\n# Override API key inline\ngetlark --api-key sk-test-key workflows invoke --workflow-ids wf_abc123\n\n# Store credentials for a secret context\ngetlark secret-contexts create --context production --secret username=admin --secret password=s3cret\n\n# Update a single key in a secret context\ngetlark secret-contexts update production --key password --value new-s3cret\n\n# List all secret contexts\ngetlark secret-contexts list\n\n# View the keys stored in a secret context\ngetlark secret-contexts get production\n\n# Delete a key from a secret context\ngetlark secret-contexts delete-key production password\n\n# Delete a secret context\ngetlark secret-contexts delete production\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nISC\n","readmeFilename":"README.md"}