From 613b3f34978a37fffcf280e65972dbc3e7eeb966 Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 06:29:11 +0000 Subject: [PATCH] Document Git configuration sources for Aspire CLI --- .../reference/cli/commands/aspire-init.mdx | 4 +++ .../reference/cli/commands/aspire-new.mdx | 4 +++ .../reference/cli/commands/aspire-update.mdx | 25 +++++++++++++++++++ 3 files changed, 33 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..0a9ecc427a 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 @@ -124,6 +124,10 @@ The following options are available: Comma-separated list of skills to install. Use `all` to install all available skills or `none` to skip skill installation. When not specified, the command prompts interactively. Useful for non-interactive mode in scripts and CI environments. For the list of available skills, see the [`aspire agent init` command reference](../aspire-agent-init/#options). +- **`--use-config-source `** + + Accept or decline the proposed Git configuration source for this project. Pass `true` to accept it without prompting, which is required for non-interactive use, or `false` to decline. The proposed source comes from the `ASPIRE_INIT_SOURCE_URL`, `ASPIRE_INIT_SOURCE_PATH`, and `ASPIRE_INIT_SOURCE_REF` environment variables. See [Git configuration sources](/reference/cli/commands/aspire-update/#git-configuration-sources). + - - 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..a911ab6dd9 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 @@ -136,6 +136,10 @@ The following options are available: Comma-separated list of skills to install. Use `all` to install all available skills or `none` to skip skill installation. When not specified, the command prompts interactively. Useful for non-interactive mode in scripts and CI environments. For the list of available skills, see the [`aspire agent init` command reference](../aspire-agent-init/#options). +- **`--use-config-source `** + + Accept or decline the proposed Git configuration source for this project. Pass `true` to accept it without prompting, which is required for non-interactive use, or `false` to decline. The proposed source comes from the `ASPIRE_INIT_SOURCE_URL`, `ASPIRE_INIT_SOURCE_PATH`, and `ASPIRE_INIT_SOURCE_REF` environment variables. See [Git configuration sources](/reference/cli/commands/aspire-update/#git-configuration-sources). + - - diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-update.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-update.mdx index 9073747930..6f6b9e709e 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-update.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-update.mdx @@ -58,6 +58,27 @@ Updates preserve unrelated manifest entries and npm version-specifier forms: exa Updating repository CLI references changes only the manifests; this step does not install the updated CLI, replace the running executable, or refresh lockfiles. Guest AppHost dependency installation can still change lockfiles during a project update. Follow the printed restore or install instructions afterward: run `dotnet tool restore` with the selected channel's NuGet feed available, or your package manager's install command, such as `npm install`. +### Git configuration sources + +An organization can share approved defaults through a Git repository. When you run `aspire new` or `aspire init`, the CLI proposes a source from environment variables and asks for your consent before fetching it. Accepting copies only the `docs.llmsTxtUrl` and `docs.api.sitemapUrl` settings into the application's `aspire.config.json` and saves a `configSource` binding. Declining, or passing `--use-config-source false`, skips the source. + +| Environment variable | Description | +| --- | --- | +| `ASPIRE_INIT_SOURCE_URL` | The Git repository URL of the proposed source. | +| `ASPIRE_INIT_SOURCE_PATH` | Optional repository-relative path of the settings file. | +| `ASPIRE_INIT_SOURCE_REF` | Optional branch or full commit SHA. | + +```bash title="Aspire CLI" +export ASPIRE_INIT_SOURCE_URL='https://git.acme.example/aspire-init' +aspire init --use-config-source true --non-interactive +``` + +Later commands use the saved binding rather than these environment variables. Bindings apply only to the configuration file that declares them; child projects don't inherit a parent's binding. Normal commands keep using the saved settings. For source-bound projects, the CLI checks for source changes in the background at most once every 24 hours and reports available updates without applying them. + +The CLI uses your normal Git authentication. Interactive fetches can prompt through your credential helper, and unattended fetches disable Git terminal prompts. A fetch times out after two minutes. + +To fetch the source and apply its settings on demand, run `aspire update --config-source`. This replaces local edits to the supplied settings and doesn't update packages or the CLI. + ### Updating guest AppHost projects When updating a guest AppHost project, such as a TypeScript AppHost, `aspire update` checks the selected Aspire SDK version before modifying files. If the selected SDK is newer than the running Aspire CLI: @@ -114,6 +135,10 @@ The following options are available: The `staging` channel can only be resolved from a `stable` or `staging` Aspire CLI build. Daily, local, and per-PR CLI builds don't have a deterministic staging feed, so requesting `--channel staging` from one of them fails with an error naming the running CLI's identity and pointing at the recovery options: install a staging or stable Aspire CLI, or set the `overrideStagingFeed` configuration value (for example, `aspire config set -g overrideStagingFeed `) to point at the staging feed you want to use. See [`overrideStagingFeed`](/reference/cli/configuration/#settings-surfaced-by-aspire-config) in the CLI configuration reference. +- **`--config-source`** + + Apply allowed settings from the project's saved Git configuration source, replacing local edits to the supplied settings, without updating packages or the CLI. See [Git configuration sources](#git-configuration-sources). + - **`-y, --yes`** Automatically confirm all prompts without user input. Use this option in CI/CD pipelines or other non-interactive environments to skip confirmation dialogs.