Skip to content

Commit b7423a6

Browse files
committed
scriptable init + templates & release notes
1 parent 06d9aa1 commit b7423a6

10 files changed

Lines changed: 179 additions & 72 deletions

File tree

public/changelog.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@
398398
}
399399
},
400400
"data": [
401+
{
402+
"category": "release",
403+
"date": "2026-03-26",
404+
"description": "CRE CLI version 1.8.0 is now available. This release adds a tenant context cache (`~/.cre/context.yaml`) after login, scriptable `cre init` for CI pipelines, and `cre templates list --json` for machine-readable template listings.\n\nUpdate your CLI by running `cre update` when prompted, or follow the [CLI Installation guide](https://docs.chain.link/cre/getting-started/cli-installation) for fresh installations.\n\n[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.7.0...v1.8.0)",
405+
"title": "CRE CLI v1.8.0 — Tenant Context and Scriptable Init",
406+
"topic": "CRE"
407+
},
401408
{
402409
"category": "release",
403410
"date": "2026-03-26",

src/content/cre/getting-started/part-1-project-setup-go.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "getting-started-part-1"
77
metadata:
88
description: "Getting started Part 1 (Go): set up your first CRE project, explore the structure, and run a successful workflow simulation."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-01-14"
10+
lastModified: "2026-03-26"
1111
---
1212

1313
import { Aside, CopyText, CodeHighlightBlock } from "@components"
@@ -89,6 +89,11 @@ The CRE CLI provides an `init` command to scaffold a new project. It's an intera
8989

9090
The CLI will then create a new `onchain-calculator` directory and initialize your first workflow within it.
9191

92+
{/* prettier-ignore */}
93+
<Aside type="note" title="Scriptable init">
94+
Prefer a **non-interactive** or **CI** flow? The CLI supports **`cre init --non-interactive`** and related flags—see [Project setup commands](/cre/reference/cli/project-setup).
95+
</Aside>
96+
9297
## Step 3: Explore the generated files
9398

9499
The `init` command creates a directory with a standard structure and generates your first workflow code. Let's explore what was created.

src/content/cre/getting-started/part-1-project-setup-ts.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "getting-started-part-1"
77
metadata:
88
description: "Getting started Part 1 (TypeScript): set up your first CRE project, explore the structure, and run a successful workflow simulation."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-01-20"
10+
lastModified: "2026-03-26"
1111
---
1212

1313
import { Aside, CopyText, CodeHighlightBlock } from "@components"
@@ -89,6 +89,11 @@ The CRE CLI provides an `init` command to scaffold a new project. It's an intera
8989

9090
The CLI will then create a new `onchain-calculator` directory and initialize your first workflow within it.
9191

92+
{/* prettier-ignore */}
93+
<Aside type="note" title="Scriptable init">
94+
Prefer a **non-interactive** or **CI** flow? The CLI supports **`cre init --non-interactive`** and related flags—see [Project setup commands](/cre/reference/cli/project-setup).
95+
</Aside>
96+
9297
## Step 3: Explore the generated files
9398

9499
The `init` command creates a directory with a standard structure and generates your first workflow code. Let's explore what was created.

src/content/cre/llms-full-go.txt

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,25 @@ To help us assist you faster, please include:
448448

449449
# Release Notes
450450
Source: https://docs.chain.link/cre/release-notes
451-
Last Updated: 2026-03-23
451+
Last Updated: 2026-03-26
452452

453453
This page provides detailed release notes for CRE. It includes information on new features, significant changes, and known limitations.
454454

455+
## CLI v1.8.0 - March 26, 2026
456+
457+
**<a href="https://github.com/smartcontractkit/cre-cli/releases/tag/v1.8.0" target="_blank">CRE CLI version 1.8.0</a> is now available.**
458+
459+
- **Tenant context cache**: The [**Authentication**](/cre/reference/cli/authentication#tenant-context-cache) reference documents **`~/.cre/context.yaml`**, which the CLI updates after login so your local session reflects the platform’s registry manifest.
460+
- **Scriptable `cre init`**: [**Project setup**](/cre/reference/cli/project-setup) covers **`cre init --non-interactive`** and related flags for CI and automation without prompts.
461+
- **`cre templates list --json`**: Use [**Template sources**](/cre/reference/cli/templates) for **`--json`** output when you need machine-readable template listings in scripts.
462+
463+
**How to update:**
464+
465+
- **Automatic update**: When you run any CRE command, the CLI will automatically detect if a newer version is available and prompt you to update. Simply run `cre update` to install the latest version.
466+
- **Fresh installation**: If you're installing the CLI for the first time, follow the [CLI Installation guide](/cre/getting-started/cli-installation).
467+
468+
[See all changes on GitHub](https://github.com/smartcontractkit/cre-cli/compare/v1.7.0...v1.8.0)
469+
455470
## CLI v1.7.0 - March 23, 2026
456471

457472
**<a href="https://github.com/smartcontractkit/cre-cli/releases/tag/v1.7.0" target="_blank">CRE CLI version 1.7.0</a> is now available.**
@@ -8072,7 +8087,7 @@ Manage your authentication and account credentials.
80728087

80738088
Initialize projects and generate contract bindings (Go only).
80748089

8075-
- **`cre init`** — Initialize a new CRE project with an interactive setup guide
8090+
- [**`cre init`**](/cre/reference/cli/project-setup) — Initialize a new CRE project (interactive wizard or **`--non-interactive`** with flags for CI/CD)
80768091
- **`cre generate-bindings`** (Go only) — Generate Go bindings from contract ABI files for type-safe contract interactions
80778092

80788093
[View project setup commands →](/cre/reference/cli/project-setup)
@@ -8126,7 +8141,7 @@ Manage secrets stored in the Vault DON for use in your workflows.
81268141

81278142
Manage the GitHub repositories that `cre init` uses to discover templates.
81288143

8129-
- **`cre templates list`** — List all templates available from configured sources
8144+
- **`cre templates list`** — List templates (human output includes required networks; **`--json`** for scripts)
81308145
- **`cre templates add`** — Add a custom or third-party template repository
81318146
- **`cre templates remove`** — Remove a template repository source
81328147

@@ -9227,7 +9242,7 @@ For details, see [Using Multi-sig Wallets](/cre/guides/operations/using-multisig
92279242

92289243
# Template Sources
92299244
Source: https://docs.chain.link/cre/reference/cli/templates
9230-
Last Updated: 2026-02-26
9245+
Last Updated: 2026-03-26
92319246

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

@@ -9250,11 +9265,12 @@ cre templates list [flags]
92509265

92519266
**Flags:**
92529267

9253-
| Flag | Description |
9254-
| ----------- | ------------------------------------------------------- |
9255-
| `--refresh` | Bypass the local cache and fetch fresh data from GitHub |
9268+
| Flag | Description |
9269+
| ----------- | --------------------------------------------------------- |
9270+
| `--json` | Print the template list as **JSON** (for scripts and CI). |
9271+
| `--refresh` | Bypass the local cache and fetch fresh data from GitHub |
92569272

9257-
Each entry shows the template title, ID, language, and a short description. Use the ID with `cre init --template=<id>` to scaffold a project from that template.
9273+
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.
92589274

92599275
For the current list of available templates, run `cre templates list` or visit [docs.chain.link/cre-templates](https://docs.chain.link/cre-templates).
92609276

@@ -9911,7 +9927,7 @@ I want to build: [describe your use case]
99119927

99129928
# Part 1: Project Setup & Simulation
99139929
Source: https://docs.chain.link/cre/getting-started/part-1-project-setup-go
9914-
Last Updated: 2026-01-14
9930+
Last Updated: 2026-03-26
99159931

99169932
<Aside type="note" title="SDK Language: Go">
99179933
You're viewing the **Go** version of this guide. If you prefer TypeScript, use the language selector in the left
@@ -9989,6 +10005,11 @@ The CRE CLI provides an `init` command to scaffold a new project. It's an intera
998910005

999010006
The CLI will then create a new `onchain-calculator` directory and initialize your first workflow within it.
999110007

10008+
10009+
<Aside type="note" title="Scriptable init">
10010+
Prefer a **non-interactive** or **CI** flow? The CLI supports **`cre init --non-interactive`** and related flags—see [Project setup commands](/cre/reference/cli/project-setup).
10011+
</Aside>
10012+
999210013
## Step 3: Explore the generated files
999310014

999410015
The `init` command creates a directory with a standard structure and generates your first workflow code. Let's explore what was created.
@@ -15329,7 +15350,7 @@ Or explore the SDK reference for detailed API documentation:
1532915350

1533015351
# Project Setup Commands
1533115352
Source: https://docs.chain.link/cre/reference/cli/project-setup-go
15332-
Last Updated: 2026-03-17
15353+
Last Updated: 2026-03-26
1533315354

1533415355
The project setup commands include `cre init` to initialize new CRE projects or add workflows, and `cre generate-bindings` to generate contract bindings for type-safe contract interactions.
1533515356

@@ -15359,11 +15380,16 @@ cre init [flags]
1535915380

1536015381
**Flags:**
1536115382

15362-
| Flag | Description |
15363-
| --------------------- | ---------------------------------- |
15364-
| `-p, --project-name` | Name for the new project |
15365-
| `-t, --template-id` | ID of the workflow template to use |
15366-
| `-w, --workflow-name` | Name for the new workflow |
15383+
| Flag | Description |
15384+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
15385+
| `--non-interactive` | Fail instead of prompting; supply all inputs via flags (for **CI/CD** and non-TTY environments). |
15386+
| `-p, --project-name` | Name for the new project (required for a new project when using `--non-interactive`). |
15387+
| `-t, --template` | Template name to use (for example `hello-world-go`). Run `cre templates list` to see IDs and required networks. |
15388+
| `-w, --workflow-name` | Name for the new workflow. |
15389+
| `--refresh` | Bypass the template cache and fetch fresh data from GitHub. |
15390+
| `--rpc-url` | RPC endpoint for a chain, repeatable. Format: `chain-name=url`. Often **required** with `--non-interactive` when the template needs RPCs. |
15391+
15392+
Inherited [global flags](/cre/reference/cli#global-flags) include **`-R, --project-root`**, which `cre init` uses as the directory where the project is created when you pass it explicitly.
1536715393

1536815394
**Interactive mode (recommended):**
1536915395

@@ -15386,19 +15412,22 @@ Running `cre init` without flags starts an interactive setup that guides you thr
1538615412
cre init
1538715413
```
1538815414

15389-
**Non-interactive mode:**
15415+
**Non-interactive mode (scripting / CI):**
15416+
15417+
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.
1539015418

1539115419
```bash
15392-
# Create a new project with initial workflow
1539315420
cre init \
15421+
--non-interactive \
1539415422
--project-name my-cre-project \
1539515423
--workflow-name my-workflow \
15396-
--template-id 1
15424+
--template hello-world-go \
15425+
--rpc-url sepolia=https://sepolia.infura.io/v3/YOUR_KEY
1539715426
```
1539815427

15428+
1539915429
<Aside type="note" title="Interactive vs. non-interactive">
15400-
For most users, running `cre init` without flags (interactive mode) is the easiest way to set up a project. The CLI
15401-
will guide you through the setup process with clear prompts.
15430+
For most users, `cre init` without flags is easiest. With **`--non-interactive`**, the CLI does not prompt; if RPC URLs are required and there is no TTY, you get a clear error—pass the needed **`--rpc-url`** flags up front.
1540215431
</Aside>
1540315432

1540415433
For a detailed walkthrough, see [Part 1 of the Getting Started guide](/cre/getting-started/part-1-project-setup).

0 commit comments

Comments
 (0)