From 23bcc31de7b4af6f011ae85c7e4082e5ef3776e0 Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 00:21:09 +0000 Subject: [PATCH] Document --use-config-source and inherited template sources --- .../reference/cli/commands/aspire-init.mdx | 4 +++ .../reference/cli/commands/aspire-new.mdx | 31 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx index 29f7ac64be..d8b2a55e68 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx @@ -116,6 +116,10 @@ The following options are available: Create `apphost.cs` in the current directory, skipping .NET solution discovery. Requires C#: fails with an error if another language is selected explicitly, via configuration, or at the language prompt. +- **`--use-config-source [true|false]`** + + Consent to using the proposed init configuration source. A bare `--use-config-source` means `true`; `true` and `false` are also accepted. When you omit the option, the consent is unspecified and the command prompts when a configuration source is available. + - **`--skill-locations `** Comma-separated list of skill locations to configure. Use `all` to configure all supported locations or `none` to skip skill location configuration. When not specified, the command prompts interactively. Useful for non-interactive mode in scripts and CI environments. For the list of available locations, see the [`aspire agent init` command reference](../aspire-agent-init/#options). diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx index c557f4dcb0..db62cd70c0 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-new.mdx @@ -90,6 +90,33 @@ aspire certs trust Choosing **No** (the default) configures services with standard `http://localhost:` addresses. This option requires no certificate setup and works in all browsers and tools without additional configuration. +### Template sources from init configuration + +When the `ASPIRE_INIT_SOURCE_URL` environment variable is explicitly set, the **Search for more templates** flow in interactive `aspire new` combines the `templateSources` from that init-config repository with your global template sources. For example: + +```json title="Init repository configuration" +{ + "templateSources": { + "enterprise": { + "repository": "https://git.acme.example/platform/templates", + "ref": "template-preview", + "path": "templates" + } + } +} +``` + +- The explicit environment variable authorizes fetching the template configuration for template search without another consent prompt. Employee detection alone doesn't enable this inheritance. +- Global sources win over inherited sources with the same alias (compared case-insensitively). A global source replaces the inherited definition entirely, including its repository, ref, and path. +- Inherited sources are used at runtime only. They're never written to user or project configuration, and project-level template sources remain ignored. +- Use `aspire template source list` to see the combined list. In interactive mode it prompts for consent to include the inherited sources. Pass `--use-config-source` to accept without prompting, or `--use-config-source false` to list only global sources. With `--format json`, the command never prompts and lists only global sources unless you pass `--use-config-source`. + +```bash title="Aspire CLI" +export ASPIRE_INIT_SOURCE_URL=https://git.acme.example/platform/aspire-init +aspire template source list --format json --use-config-source +aspire new aspire-starter --use-config-source +``` + ## Options The following options are available: @@ -124,6 +151,10 @@ The following options are available: The programming language for the AppHost, such as `csharp`, `typescript`, or `go`. When you don't pass a template, `aspire new` offers only the templates that support the language. +- **`--use-config-source [true|false]`** + + Consent to using the proposed init configuration source. A bare `--use-config-source` means `true`; `true` and `false` are also accepted. When you omit the option, the consent is unspecified and the command prompts when a configuration source is available. + - **`--suppress-agent-init`** Suppress the prompt to initialize MCP server configuration for agent environments after project creation.