Skip to content

vnext: Proposal - Scaffolding end to end templates from GitHub repos#5026

Open
manvkaur wants to merge 8 commits into
docsfrom
manvkaur/doc/phoenixtemplates
Open

vnext: Proposal - Scaffolding end to end templates from GitHub repos#5026
manvkaur wants to merge 8 commits into
docsfrom
manvkaur/doc/phoenixtemplates

Conversation

@manvkaur

@manvkaur manvkaur commented May 18, 2026

Copy link
Copy Markdown
Contributor

vnext: Proposal - Scaffolding end to end apps from GitHub repos

Design: func quickstart for vNext

Adds a design proposal for func quickstart — a new command that scaffolds complete function apps from GitHub-hosted templates discovered via a CDN manifest.

Design doc: proposed/templates-e2e.md

Note: The command verb is still under discussion. Development is proceeding with quickstart as the working name.

What's proposed

  • func quickstart, func quickstart list, func quickstart info <id> — scaffolds a complete function app from a curated GitHub repo
  • CDN manifest with ETag caching (24h TTL), bundled fallback, and staging CDN support (FUNC_TEMPLATE_MANIFEST_URL)
  • gitRef required per manifest entry — templates pinned to immutable tags/SHAs, no default-branch resolution
  • Release/compliance model: manifest lives in azure-functions-templates repo, requires PR + approval, staging → production promotion
  • Template download via --fetch git|http (git default, graceful fallback to HTTP when git not on PATH)
  • Git process safety: IGitRunner abstraction, timeout, cancellation, non-interactive, argument-array invocation
  • Interactive Spectre prompts (runtime → language → trigger) with full CI/non-TTY fallback (--language, --template, --yes)
  • Runtime-to-language mapping: user-facing labels (.NET, Node, Python, Java, Powershell) with sub-prompts for .NET (C#/F#) and Node (JS/TS)
  • Path traversal prevention, trusted-org validation, HTTPS-only scheme enforcement
  • --path for target directory control (must be empty or absent)
  • Standardised error messaging table covering 15+ failure modes
  • Cache and file layout scoped under ~/.azure-functions/<verb>/

Explicitly deferred

  • --force / file conflict handling (tracked as follow-up)

Open questions for reviewers

  • Command verb naming (quickstart, sample, bootstrap, or on func new)
  • Default language strategy when --language is omitted interactively
  • Whether bare func new should redirect to this flow when no workloads are installed

Template Manifest Updates

Azure/azure-functions-templates#1787

@manvkaur manvkaur changed the title Phoenix Initiative: Proposal - Scaffolding end to end templates from GitHub repos vnext: Proposal - Scaffolding end to end templates from GitHub repos May 18, 2026
Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated

Today's function app templates are scattered across multiple sources — the CLI binary, extension bundle, VS Code extension, and Maven repository — each shipping on its own cadence. Getting a template in front of a developer requires a coordinated release across several of these channels, with a minimum turnaround of 6–8 weeks from merge to broad availability. Templates are also bundled inside the CLI binary itself, meaning every addition or update requires a full CLI release.

This design introduces `func new templates`: a command that downloads **complete, immediately runnable function app templates** directly from GitHub. Templates are discovered via a live manifest hosted on the Azure Functions CDN. Adding a new template is as simple as publishing a GitHub repo and adding an entry to the manifest — no CLI release required. The manifest is versioned independently; the CLI picks up new templates automatically on the next manifest refresh.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't provide templating behaviour so I am reluctant for us to call these templates. There's no parameterization, no conditional inclusion, no post-actions. It clones a GitHub repo into a folder. We have a separate templates workload in flight that will provide real templating (engine + manifest + unified sources), and naming this templates will collide with it both conceptually and in the CLI surface. Let's pick a name that reflects what it actually is: bootstrapping a project from a curated sample repo

For this new experience, I recommend:

  • func new sample
  • func new bootstrap
  • func quickstart
  • func clone

I think func new sample (with func new sample list / func new sample info ) makes the most sense as it's the most accurate, and doesn't overload "template. I also like func quickstart

Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added this to the top of the doc, keeping this comment unresolved for discussion with other reviewers. @vrdmr , @fabiocav

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reasoning of using the word templates is mainly following what vercel, bolt.new, AI Template Gallery, and AZD Templates call it.

image image image image image

Lambda folks use "blueprints" but I don't want to use the same word as AWS Lambda.

For this new experience, I recommend:

  • func new sample
  • func new bootstrap
  • func quickstart
  • func clone

I think func new sample (with func new sample list / func new sample info ) makes the most sense as it's the most accurate, and doesn't overload "template. I also like func quickstart

suggestions are good but limiting the feature to "quickstart" would be incorrect and leaving options for advanced samples.

We are calling it Template Gallery in VSCode as well - as it is a template gallery
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no parameterization, no conditional inclusion, no post-actions

I don't think core tools today does all the features mentioned for all the templates X languages matrix - i think it is only done in few cases, and we can explore how to add support for it.

Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
@manvkaur manvkaur marked this pull request as ready for review May 18, 2026 22:45
@manvkaur manvkaur requested review from fabiocav, paulyuk and vrdmr May 18, 2026 23:00
Comment thread proposed/templates-e2e.md Outdated
| --- | --- | --- | --- | --- |
| **`templates`** (proposed) | `func new templates` | `list`, `info` | Familiar term; matches industry use for e2e prod ready apps | Collides with templates workload; |
| **`sample`** | `func new sample` | `list`, `info` | These are sample repos; no overloading of "template" | Might imply "not production-ready" |
| **`quickstart`** | `func quickstart` | `list`, `info` | Clear intent; aligns with Azure Samples naming (`*-quickstart-*-azd`) | Longer to type; top-level only (not under `func new`) |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top-level only (not under func new`)
Doesn't have to be, could also live on func new if folks prefer that

Comment thread proposed/templates-e2e.md Outdated
| **`templates`** (proposed) | `func new templates` | `list`, `info` | Familiar term; matches industry use for e2e prod ready apps | Collides with templates workload; |
| **`sample`** | `func new sample` | `list`, `info` | These are sample repos; no overloading of "template" | Might imply "not production-ready" |
| **`quickstart`** | `func quickstart` | `list`, `info` | Clear intent; aligns with Azure Samples naming (`*-quickstart-*-azd`) | Longer to type; top-level only (not under `func new`) |
| **`bootstrap`** | `func new bootstrap` | `list`, `info` | Accurate for "set up a project from scratch" | Less discoverable; not a common Azure CLI verb |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love to understand why this would be less discoverable than say func new templates templates on new doesn't exist today either so I think the discoverability journey is exactly the same. When customers run func --help or func new --help they will be able to see all of the subcommands/commands available to them so I don't think naming has anything to do with discoverability

Comment thread proposed/templates-e2e.md Outdated
| **`bootstrap`** | `func new bootstrap` | `list`, `info` | Accurate for "set up a project from scratch" | Less discoverable; not a common Azure CLI verb |
| **`clone`** | `func new clone` | `list`, `info` | Technically accurate (it clones a repo) | Implies git; doesn't convey curation or discovery |

**Recommendation:** `templates` — this is the industry used term for scaffolding a new project, including production-ready starting points. We will need resolve conflict with the in-flight templates workload and establish distinction.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My recommendation is we go with quickstart or bootstrap (whether on func root or func new).


The claim that templates is the industry term for this doesn't match either CLI conventions or Azure's own vocabulary.

CLI verbs: Across the most-used scaffolding tools (create-react-app, npm create *, ng new, rails new, nest new, dotnet new, cargo new, yo, hugo new, nuxi init, cookiecutter, degit), the primary verbs are create, new, and init. "Template" almost always appears as a noun or flag (--template, dotnet new ), not the command itself.

Microsoft/Azure usage: Azure docs already draw clean distinctions:

Quickstart → "Ready-to-run, minimal-fuss starting point for a project."
Sample → "End-to-end application/code repos demonstrating real scenarios. Often production-shaped."
Template → "A parameterized, declarative IaC definition. ARM/Bicep templates have a parameters section that is rendered against user input."

When Azure uses "template", the artifact is parameterized and rendered. So by Azure's own established vocabulary it is a sample or quickstart, not a template. "Bootstrap" and "quickstart" are at least as defensible as "templates" here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provided my comments above.

Repasting it

The reasoning of using the word templates is mainly following what vercel, bolt.new, AI Template Gallery, and AZD Templates call it.

image image image image image

Lambda folks use "blueprints" but I don't want to use the same word as AWS Lambda.

For this new experience, I recommend:

  • func new sample
  • func new bootstrap
  • func quickstart
  • func clone

I think func new sample (with func new sample list / func new sample info ) makes the most sense as it's the most accurate, and doesn't overload "template. I also like func quickstart

suggestions are good but limiting the feature to "quickstart" would be incorrect and leaving options for advanced samples.

We are calling it Template Gallery in VSCode as well - as it is a template gallery
image

Comment thread proposed/templates-e2e.md Outdated
| **`bootstrap`** | `func new bootstrap` | `list`, `info` | Accurate for "set up a project from scratch" | Less discoverable; not a common Azure CLI verb |
| **`clone`** | `func new clone` | `list`, `info` | Technically accurate (it clones a repo) | Implies git; doesn't convey curation or discovery |

**Recommendation:** `templates` — this is the industry used term for scaffolding a new project, including production-ready starting points. We will need resolve conflict with the in-flight templates workload and establish distinction.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the concerns brought up about the conflict and confusion with the existing experience, this scaffolding is not providing templating behavior, the command shape func new templates reads unnaturally to me. In a new <noun> pattern, the noun after new is usually the thing being created, so this reads like “create a new template” not “create a new app from a template.” Since the template/sample is the source rather than the target artifact, I’d avoid this shape. func quickstart, func new --sample <id>, or another source-oriented name would be clearer.

Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
Comment thread proposed/templates-e2e.md Outdated
manvkaur and others added 2 commits May 25, 2026 18:48
- Rename user-facing .NET label (drop 'isolated worker model')
- Simplify --language flag: dotnet (not dotnet-isolated)
- Remove --env section (out of scope, belongs in func start)
- Add gitRef as required manifest field (no default-branch assumption)
- Add Release & Compliance Model section (staging CDN, PR approval, FUNC_TEMPLATE_MANIFEST_URL override)
- Add --fetch git|http flag with graceful fallback
- Add Git Process Requirements (IGitRunner, timeout, cancellation, non-interactive, argument-array)
- Align home directory with cli-profiles spec (~/.azure-functions/<verb>/)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@manvkaur manvkaur force-pushed the manvkaur/doc/phoenixtemplates branch 2 times, most recently from 50a729a to c520343 Compare May 26, 2026 01:58
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@manvkaur manvkaur force-pushed the manvkaur/doc/phoenixtemplates branch from c520343 to 6bc9379 Compare May 26, 2026 02:01
manvkaur and others added 2 commits May 26, 2026 00:46
No other CLI command has a --yes flag. Non-interactive use is covered by
--template (skips all prompts) and non-TTY detection (errors if --language
not supplied).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename templates-e2e.md to quickstarts-e2e.md
- Resolve terminology: 'template' is the noun, 'quickstart' is the
  transitional command verb converging into func templates
- Document existing func templates surface (templating engine,
  tokenization, snippets) and convergence intent
- Update IInteractionService section from 'Prompt Gap' to 'Prompt
  Support' reflecting PR 4 additions (PromptForSelectionAsync,
  EnableSearch)
- Align service names, file layout, env vars, and error messages
  with current implementation on quickstart-handler branch
- Update --force from deferred to implemented

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@liliankasem liliankasem removed the vnext label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants