Installation
Requires Node.js 18 or later. Run directly withnpx:
Authentication
The fastest way to authenticate isgetlark login:
~/.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. Run getlark logout to remove the stored credentials.
The CLI resolves the API key in this order:
--api-keyflagGETLARK_API_KEYenvironment variable~/.getlark/config.json- error
--api-url / GETLARK_API_URL. CI usage is unchanged — keep using the env var.
The CLI also supports a .env file in the current directory.
Create and manage API keys in the dashboard. Copy the key when you create it — you only see the full value once.
Global options
Workflows
Create, update, list, archive, and invoke workflows. See the dedicated sections below for executions, repairs, and generations.Create a workflow
Get workflow details
Update a workflow
At least one option is required.
Archive a workflow
Unarchive a workflow
List workflows
Invoke workflows
Run one or more workflows and optionally wait for them to finish. One of--workflow-ids, --all, --group-id, or --group-name is required.
Exit codes
List workflow events
Lists all events (generations, executions, repairs) for a workflow.
Executions
Inspect, follow, and cancel individual runs of a workflow.Get execution details
Get execution logs
Cancel a running execution
Repairs
Trigger and inspect AI repair attempts on a workflow after a failed execution.Trigger a workflow repair
List workflow repairs
Get repair details
Cancel a running repair
Get repair logs
Generations
Manage in-progress workflow generations (the background process that produces a workflow’s executable artifact when it’s created or substantially edited).Cancel a running generation
Workflow groups
Group related workflows together for organization and bulk filtering.Create a workflow group
List workflow groups
Get a workflow group
Update a workflow group
Delete a workflow group
Jobs
Asynchronous bulk operations on workflows (currentlyworkflow_import). Submit a job, then poll getlark jobs get until it reaches a terminal state (completed, failed, or cancelled).
Create a job from an inline JSON input file
workflow_import input file schema
The input file is a single JSON object. The same file is accepted by jobs create, jobs upload, and jobs validate.
Top-level object:
Each entry under
workflows:
No additional properties are accepted at the top level or per workflow.
Example
workflows.json:
List jobs
Get a job
Cancel a job
Upload a job from a file
Sends the file as
multipart/form-data to /jobs/upload. The job stores the original filename so you can retrieve it later from getlark jobs get.
Validate an input file without creating a job
Prints the validation report and exits non-zero if
valid: false.
Secret contexts
Manage credentials that workflows reference at runtime. Values are encrypted at rest and never returned by the API.List secret contexts
Get a secret context
Create or replace a secret context
Update a key in a secret context
If the key already exists its value is replaced; if it does not exist it is added.
Delete a secret context
Delete a key from a secret context
Examples
CI pipeline usage
The--wait flag makes the CLI well-suited for CI pipelines. The command blocks until every workflow finishes and exits with a non-zero code on failure.
For full CI setup instructions, see CI integration.