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.
Generating Types
Section titled “Generating Types”npx requence-task generate-typesThis 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.
requence-task generate-typesThis creates type stubs in a typings/requence/task/ directory. Point your editor or type checker at this directory to get type hints for Task(), result, and get_node_data().
Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--access-token | — | Access token (falls back to env / config file) |
--outfile | requence-env.d.ts | Name of the generated type file |
--outdir | . | Directory to write the type file to |
| Option | Default | Description |
|---|---|---|
--access-token | — | Access token (falls back to env / config file) |
--outdir | typings | Directory to write the type stubs to |
Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
REQUENCE_TASK_ACCESS_TOKEN | Access token for authentication |
REQUENCE_ACCESS_TOKEN | Fallback access token |