thyme init
Scaffold a new Thyme Flow project. init creates a directory with the SDK and CLI wired up, a strict TypeScript config, and an empty functions/ folder ready for your first task.
Usage
thyme init [name]If you omit name, the CLI prompts for it interactively. Without a terminal the name
is required as an argument — see CI & Non-Interactive Use. Either way the name
must match ^[a-z0-9-]+$.
Arguments
| Argument | Required | Description |
|---|---|---|
name | No | Project directory name. Must match ^[a-z0-9-]+$ (lowercase letters, digits, hyphens). Prompted if omitted. |
What it creates
init writes the project files; install dependencies before running a task:
my-project/
├── functions/ # your tasks live here (empty to start)
├── package.json # type: module; scripts.dev = "thyme run"
├── tsconfig.json # ES2022 / ESNext, bundler resolution, strict
├── .env.example # template for project-level env vars
├── .gitignore
└── README.md
The generated package.json:
- sets
"type": "module", - adds a
devscript that runsthyme run, - declares dependencies
@thyme-labs/sdk,viem, andzod, - declares devDependencies
@thyme-labs/cliandtypescript.
The tsconfig.json targets ES2022/ESNext with bundler module resolution and strict enabled. Dependency versions come from the installed CLI package: CLI 0.10.0 scaffolds SDK ^0.8.0, CLI 0.10.0, viem 2.46.3, and Zod ^3.24.1. It does not run the package manager or create the first task.
Examples
Scaffold with a name:
thyme init my-project
cd my-project
npm install
thyme new monitorScaffold interactively (the CLI prompts for the name):
thyme initBehavior notes
- The directory created by
initsatisfies the project gate (it has afunctions/dir and@thyme-labs/sdkinpackage.json), so commands likenew,run,list, anduploadwork inside it. - After scaffolding, install dependencies with your package manager, then create your first task with
thyme new.
Next steps
thyme new— create a task in the project.- Installation — prerequisites including Deno.
- Quickstart — the full path from scaffold to scheduled executable.