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 9a3210824..cc8ca651c 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 @@ -42,6 +42,42 @@ When a `.sln` or `.slnx` is present, the C# option creates a **project-based App In all cases, the AppHost language does not limit what you can orchestrate — C#, JavaScript, Python, Go, Rust, Java, containers, and more can all be modeled in the same application model. +### Channel persistence in aspire.config.json + +When `aspire init` runs with an explicit, non-stable channel (such as `daily` or `staging`), it writes a top-level `channel` key into the generated `aspire.config.json`. This ensures that subsequent commands — `aspire add`, `aspire update`, and others — resolve packages and templates against the same channel the project was initialized with, rather than falling back to the implicit stable default. + +For example, running a daily CLI build produces: + +```json title="aspire.config.json" {5} +{ + "appHost": { + "path": "apphost.cs" + }, + "channel": "daily", + "profiles": { + "https": { + "applicationUrl": "https://localhost:17055;http://localhost:15013", + "environmentVariables": { + "ASPIRE_DASHBOARD_OTLP_GRPC_ENDPOINT_URL": "https://localhost:16168", + "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22043" + } + }, + "http": { + "applicationUrl": "http://localhost:15013", + "environmentVariables": { + "ASPIRE_DASHBOARD_OTLP_GRPC_ENDPOINT_URL": "http://localhost:19147", + "ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20216", + "ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true" + } + } + } +} +``` + +If `aspire.config.json` already contains a `channel` value (for example, because you edited it manually or migrated from an older project), the value is preserved and not overwritten. + +Only channels that are registered as _explicit_ in the packaging service are persisted, with one exception: the `stable` channel is treated as the portable default and is intentionally not pinned. + ### The aspireify skill After the skeleton is dropped, `aspire init` has an option to install the `aspireify` skill into your AI agent's skill directory (the same directory used by `aspire agent init`). The skill is a Markdown file with instructions that guide your AI coding agent through completing the Aspire wiring for your specific codebase. 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 9bde62a00..93a0f2dc7 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 @@ -50,6 +50,8 @@ The following options are available: Channel to update to (`stable`, `staging`, `daily`). + When you switch to a persistable channel, such as `daily`, `aspire update` also rewrites the top-level `channel` key in `aspire.config.json` when the file already exists. Only channels registered as _explicit_ channels are persisted, with one exception: the `stable` channel is treated as the portable default and is intentionally not pinned. The persisted channel keeps subsequent `aspire add` and `aspire update` runs resolving packages against the channel you just switched to. + - **`-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.