Skip to content
Thyme Docs

SDK and CLI Migration

This reference covers SDK 0.8.0 and CLI 0.10.0. Upgrade both dependencies in your task project and retain your package manager's lockfile:

npm install @thyme-labs/sdk@0.8.0
npm install --save-dev @thyme-labs/cli@0.10.0
npx thyme --version

If you also use a globally installed CLI, update it separately or use the project-local executable through npx thyme / bunx thyme.

SinceChangeAction for older projects
SDK 0.4.1Runtime argument validation and transforms.Correct inputs that previously bypassed validation; use z.coerce.bigint() with decimal strings.
SDK 0.5.0 / CLI 0.5.0Four lifecycle callbacks.Replace custom outcome polling where callbacks are suitable; exercise success, failure, and timeout paths.
SDK 0.6.0Runtime and schema-extractor subpaths.Import the shared contracts in integrations instead of maintaining divergent copies.
SDK 0.7.0 / CLI 0.8.0ctx.account.Set SIMULATE_ACCOUNT for every local run; update manually constructed contexts with an account.
CLI 0.6.0Immutable release tags.Pass a new --tag for changed code; switching existing executables is explicit.
CLI 0.7.0Workspace management commands.Obtain management credentials for API automation.
CLI 0.9.0CI flags, inert scaffold, strict local JSON parsing, deterministic upload ZIPs.Supply prompt values explicitly in automation; fix malformed local JSON.
SDK 0.8.0 / CLI 0.10.0Optional permission manifests.Add a declaration when needed and upload it with a new version tag.

Validate the task

npx tsc --noEmit
npx thyme run my-task --ci

For tasks returning calls, also exercise the callbacks you define:

npx thyme run my-task --callback onSuccess
npx thyme run my-task --callback onFail:timeout

Local simulation does not establish cloud compatibility or submit anything. Review current local-run limitations, especially when using a manifest.

Publish and switch deliberately

npx thyme upload my-task --ci \
  --workspace WORKSPACE_ID --project PROJECT_ID --tag v2

Existing executables remain pinned to the previous function. Pause an executable, update its function and any changed args, wait for the version switch to complete, and resume it. See management commands and function versions.