Skip to content

CLI

Both the TypeScript and Python SDKs ship with a CLI that generates type definitions for your task templates. Types are derived from the task template schemas you defined in the Requence UI — input and named results — giving you full type safety when calling createTask / Task.

Terminal window
npx requence-task generate-types

This creates a requence-env.d.ts file in your project root. TypeScript picks it up automatically — your createTask() calls, result, and getNodeData() will be fully typed.

OptionDefaultDescription
--access-tokenAccess token (falls back to env / config file)
--outfilerequence-env.d.tsName of the generated type file
--outdir.Directory to write the type file to
VariableDescription
REQUENCE_TASK_ACCESS_TOKENAccess token for authentication
REQUENCE_ACCESS_TOKENFallback access token