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:

FlagDescription
-p, --project-nameName for the new project
-t, --template-idID of the workflow template to use
-w, --workflow-nameName for the new workflow

Interactive mode (recommended):

Running cre init without flags starts an interactive setup that guides you through the process:

  1. Project name (only if creating a new project)
  2. Language (Go or TypeScript)
  3. Workflow template (example templates for the chosen language)
  4. 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:

  1. cre init — Create a new project or add a workflow (interactive or with flags)
  2. Navigate to workflow directory — cd your-project/your-workflow
  3. Install dependencies — Run bun install to install the CRE SDK and dependencies
  4. Start development — Write your workflow code

Learn more

Get the latest Chainlink content straight to your inbox.