For AI agents: use llms.txt as the documentation index. Retrieve the smallest relevant .md page first.

Template Sources

The cre templates commands manage the GitHub repository sources that cre init uses to discover workflow templates.

The CLI always includes two built-in Hello World templates (hello-world-go, hello-world-ts) that are embedded in the binary and available without an internet connection. All other templates are fetched dynamically from GitHub. The Chainlink official template repository (smartcontractkit/cre-templates) is configured as the default source — you only need these commands if you want to add custom or third-party template sources.

cre templates list

Fetches and displays all templates available from your configured repository sources. Results are cached locally; use --refresh to fetch the latest data from GitHub.

Usage:

cre templates list [flags]

Flags:

FlagDescription
--jsonPrint the template list as JSON (for scripts and CI).
--refreshBypass the local cache and fetch fresh data from GitHub

Each entry shows the template title, ID, language, a short description, and required networks (chains you must supply RPCs for when using cre init, especially with --non-interactive). Use the template name with cre init --template=<name> to scaffold a project.

For the current list of available templates, run cre templates list or visit docs.chain.link/cre-templates.


cre templates add

Adds one or more GitHub repositories as template sources. Sources are saved to ~/.cre/template.yaml and made available in cre init.

Usage:

cre templates add <owner/repo[@ref]>... [flags]

The @ref portion is optional and specifies a branch, tag, or commit. If omitted, the repository's default branch is used.

Examples:

# Add a single repository (uses default branch)
cre templates add myorg/my-templates

# Add at a specific branch
cre templates add myorg/my-templates@main

# Add multiple repositories at once
cre templates add myorg/my-templates anotherorg/more-templates

Example output:

âś“ Added myorg/my-templates@main

Configured repositories:
  - smartcontractkit/cre-templates@main
  - myorg/my-templates@main

cre templates remove

Removes one or more template repository sources from ~/.cre/template.yaml. The @ref portion of a repo string is optional and ignored during matching — only the owner/repo is used to identify the source to remove.

Usage:

cre templates remove <owner/repo>... [flags]

Examples:

# Remove a single repository
cre templates remove myorg/my-templates

# Remove multiple repositories at once
cre templates remove myorg/my-templates anotherorg/more-templates

Example output:

âś“ Removed myorg/my-templates@main

Remaining repositories:
  - smartcontractkit/cre-templates@main

Learn more

Get the latest Chainlink content straight to your inbox.