Project Setup Commands
The project setup command cre init initializes new CRE projects or adds workflows to existing projects.
cre init
Initializes a new CRE project or adds a workflow to an existing project. The behavior depends on your current directory:
- In a directory without a project: Creates a new project with the first workflow
- In an existing project directory: Adds a new workflow to the existing project
Usage:
cre init [flags]
Flags:
| Flag | Description |
|---|---|
-p, --project-name | Name for the new project |
-t, --template-id | ID of the workflow template to use |
-w, --workflow-name | Name for the new workflow |
Interactive mode (recommended):
Running cre init without flags starts an interactive setup that guides you through the process:
- Project name (only if creating a new project)
- Language (Go or TypeScript)
- Workflow template (example templates for the chosen language)
- Workflow name
Example:
# Interactive setup
cre init
Non-interactive mode:
# Create a new project with initial workflow
cre init \
--project-name my-cre-project \
--workflow-name my-workflow \
--template-id 1
For a detailed walkthrough, see Part 1 of the Getting Started guide.
Project initialization workflow
The typical project setup flow for TypeScript workflows:
cre init— Create a new project or add a workflow (interactive or with flags)- Navigate to workflow directory —
cd your-project/your-workflow - Install dependencies — Run
bun installto install the CRE SDK and dependencies - Start development — Write your workflow code
Learn more
- Part 1: Project Setup — Step-by-step tutorial for initializing projects
- Project Configuration — Understanding
project.yamlandworkflow.yaml