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 |
|---|---|
--non-interactive | Fail instead of prompting; supply all inputs via flags (for CI/CD and non-TTY environments). |
-p, --project-name | Name for the new project (required for a new project when using --non-interactive). |
-t, --template | Template name to use (for example hello-world-ts). Run cre templates list to see IDs and required networks. |
-w, --workflow-name | Name for the new workflow. |
--deployment-registry | Registry ID to write into the generated workflow.yaml (e.g. private or onchain:ethereum-mainnet). Run cre registry list to see available IDs. In --non-interactive mode, omitting this flag prints a warning and defaults to on-chain. |
--refresh | Bypass the template cache and fetch fresh data from GitHub. |
--rpc-url | RPC endpoint for a chain, repeatable. Format: chain-name=url. Often required with --non-interactive when the template needs RPCs. |
Inherited global flags include -R, --project-root, which cre init uses as the directory where the project is created when you pass it explicitly.
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 (fetched dynamically from configured template sources)
- Workflow name
- Deployment registry — select which registry the generated
workflow.yamltargets. Private (off-chain) registries appear first with the cursor defaulted to them. If your organization has no registries configured, this step is skipped and the field is omitted fromworkflow.yaml.
Example:
# Interactive setup
cre init
Non-interactive mode (scripting / CI):
Pass --non-interactive plus the flags your template needs. Use cre templates list (or cre templates list --json) to see required networks and choose --rpc-url values.
cre init \
--non-interactive \
--project-name my-cre-project \
--workflow-name my-workflow \
--template hello-world-ts \
--deployment-registry private \
--rpc-url sepolia=https://sepolia.infura.io/v3/YOUR_KEY
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