diff --git a/src/frontend/config/sidebar/reference.topics.ts b/src/frontend/config/sidebar/reference.topics.ts
index e93e30c950..f3b2e169a4 100644
--- a/src/frontend/config/sidebar/reference.topics.ts
+++ b/src/frontend/config/sidebar/reference.topics.ts
@@ -580,6 +580,32 @@ export const referenceTopics: StarlightSidebarTopicsUserConfig[number] = {
slug: 'reference/cli/commands/aspire-start',
},
{ label: 'aspire stop', slug: 'reference/cli/commands/aspire-stop' },
+ {
+ label: 'aspire template',
+ collapsed: true,
+ items: [
+ {
+ label: 'aspire template',
+ slug: 'reference/cli/commands/aspire-template',
+ },
+ {
+ label: 'aspire template source',
+ slug: 'reference/cli/commands/aspire-template-source',
+ },
+ {
+ label: 'aspire template source add',
+ slug: 'reference/cli/commands/aspire-template-source-add',
+ },
+ {
+ label: 'aspire template source list',
+ slug: 'reference/cli/commands/aspire-template-source-list',
+ },
+ {
+ label: 'aspire template source remove',
+ slug: 'reference/cli/commands/aspire-template-source-remove',
+ },
+ ],
+ },
{
label: 'aspire terminal',
collapsed: true,
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..221590ab0c 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
@@ -48,6 +48,33 @@ The `--output` option validates the provided path before creating the project:
When running `aspire new` in interactive mode, the command asks one or more questions before generating the project. The available prompts depend on the template and options you provide.
+### Select a template
+
+When you run `aspire new` in an interactive terminal, the initial template picker lists the built-in templates together with templates from configured [template sources](#configure-template-sources). When at least one template source is configured, the picker groups its entries under nonselectable headings. Built-in templates appear under **Built-in templates**, and each configured source appears under its own heading. There's no separate submenu or search action for each source.
+
+Each terminal entry is shown in the form `Template Name (Template Description)`. If a template has no description, only the name is shown. In the grouped terminal picker, long entries and headings are truncated with an ellipsis to fit the terminal width. When you type to search for a template, the selection moves to a matching entry rather than filtering the list. In the grouped terminal picker, search matches only the visible text of an entry.
+
+If no template sources are configured, or if you pass `--source`, `--version`, `--channel`, or `--language`, the picker shows a flat list of the built-in templates, without headings or truncation. Those options skip the discovery of configured template sources, so templates from configured sources can't be combined with them.
+
+
+
+#### Configure template sources
+
+A template source is a named Git repository or local directory that contains templates. Template sources are stored in global Aspire configuration and apply to every project on the machine. Use the `aspire template source` commands to manage them rather than editing the configuration file directly:
+
+```bash title="Aspire CLI"
+aspire template source add company --repository https://github.com/example/templates
+```
+
+
+ [Command reference: `aspire template source add`](../aspire-template-source-add/)
+ and [`aspire template source remove`](../aspire-template-source-remove/)
+
+
### Use \*.dev.localhost URLs?
During project creation, you may be prompted:
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-add.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-add.mdx
new file mode 100644
index 0000000000..50f865e291
--- /dev/null
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-add.mdx
@@ -0,0 +1,105 @@
+---
+title: aspire template source add command
+description: Learn about the aspire template source add command and its usage. This command adds a named template source to global configuration after confirming you trust it.
+---
+
+import Include from '@components/Include.astro';
+
+## Name
+
+`aspire template source add` - Add a named template source to global configuration after confirming you trust it.
+
+## Synopsis
+
+```bash title="Aspire CLI"
+aspire template source add [options]
+```
+
+## Description
+
+The `aspire template source add` command adds a named template source to global Aspire configuration. A template source is either a Git repository (`--repository`, optionally with `--path` and `--ref`) or an absolute local directory (`--path` without `--repository`). Templates from configured sources appear in the [`aspire new`](../aspire-new/#select-a-template) template picker.
+
+Templates can run code, so the command asks you to trust the source before it changes any configuration. After it validates the name and location, it writes the warning "Only use sources you trust. Content from these sources can run code on your machine." to standard error. Then it prompts for confirmation. The prompt shows the source name and its repository URL or local path, and defaults to **No**:
+
+```text
+Do you trust template source 'company' (https://example.com/templates)? [y/N]:
+```
+
+If you decline, the command is canceled and configuration isn't changed. To trust the source and skip the prompt, pass `--yes`.
+
+Non-interactive invocations, including invocations where interactive input isn't available, fail unless you pass `--yes`.
+
+## Arguments
+
+The following arguments are available:
+
+- **`name`**
+
+ The name of the template source. The name must be 1-64 ASCII letters, digits, dots (`.`), hyphens (`-`), or underscores (`_`), and must start with a letter or digit. Names are case-insensitive, and the command fails if a template source with the same name already exists.
+
+## Options
+
+The following options are available:
+
+- **`--path`**
+
+ The template directory. Its meaning depends on whether `--repository` is specified:
+
+ - Without `--repository`, `--path` must be an absolute local directory that contains templates.
+ - With `--repository`, `--path` is a directory relative to the repository root. It can't be an absolute path or use `..` to point outside the repository. It defaults to the repository root (`.`).
+
+- **`--repository`**
+
+ An HTTPS or SSH Git repository URL that contains templates.
+
+- **`--ref`**
+
+ A Git branch, tag, or full commit SHA. Requires `--repository` and defaults to `HEAD`.
+
+- **`-y, --yes`**
+
+ Trust the template source and skip confirmation.
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+## Examples
+
+- Add a template source and confirm trust interactively:
+
+ ```bash title="Aspire CLI"
+ aspire template source add company --repository https://example.com/templates
+ ```
+
+- Add a template source from a subdirectory of a repository at a specific tag:
+
+ ```bash title="Aspire CLI"
+ aspire template source add company --repository https://example.com/templates --path templates/web --ref v1.0.0
+ ```
+
+- Add a template source from an absolute local directory:
+
+ ```bash title="Aspire CLI"
+ aspire template source add local --path /home/user/templates
+ ```
+
+- Add a template source in automation by explicitly trusting it:
+
+ ```bash title="Aspire CLI"
+ aspire template source add company --repository https://example.com/templates --non-interactive --yes
+ ```
+
+## See also
+
+- [aspire template source list command](../aspire-template-source-list/)
+- [aspire template source remove command](../aspire-template-source-remove/)
+- [aspire new command](../aspire-new/)
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-list.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-list.mdx
new file mode 100644
index 0000000000..2b47e59057
--- /dev/null
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-list.mdx
@@ -0,0 +1,61 @@
+---
+title: aspire template source list command
+description: Learn about the aspire template source list command and its usage. This command lists the named template sources in global Aspire configuration.
+---
+
+import Include from '@components/Include.astro';
+
+## Name
+
+`aspire template source list` - List named template sources without discovering templates.
+
+## Synopsis
+
+```bash title="Aspire CLI"
+aspire template source list [options]
+```
+
+## Description
+
+The `aspire template source list` command lists the template sources in global Aspire configuration, sorted by name. It reads only configuration: it doesn't contact repositories or discover templates. Incomplete source definitions are included so that you can inspect and fix them.
+
+By default, the command shows a table with each source name and its configured fields. If no sources are configured, the command says so and suggests [`aspire template source add`](../aspire-template-source-add/).
+
+## Options
+
+The following options are available:
+
+- **`--format `**
+
+ The output format. The default is `Table`. `Json` writes an object keyed by source name to standard output, preserving the configured fields without adding defaults.
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+## Examples
+
+- List template sources as a table:
+
+ ```bash title="Aspire CLI"
+ aspire template source list
+ ```
+
+- List template sources as JSON:
+
+ ```bash title="Aspire CLI"
+ aspire template source list --format Json
+ ```
+
+## See also
+
+- [aspire template source add command](../aspire-template-source-add/)
+- [aspire template source remove command](../aspire-template-source-remove/)
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-remove.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-remove.mdx
new file mode 100644
index 0000000000..e28ade3450
--- /dev/null
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source-remove.mdx
@@ -0,0 +1,57 @@
+---
+title: aspire template source remove command
+description: Learn about the aspire template source remove command and its usage. This command removes a named template source from global Aspire configuration.
+---
+
+import Include from '@components/Include.astro';
+
+## Name
+
+`aspire template source remove` - Remove a named template source from global configuration.
+
+## Synopsis
+
+```bash title="Aspire CLI"
+aspire template source remove [options]
+```
+
+## Description
+
+The `aspire template source remove` command removes a named template source from global Aspire configuration. Templates from the removed source no longer appear in the [`aspire new`](../aspire-new/#select-a-template) template picker. The command fails if no template source with the given name exists.
+
+## Arguments
+
+The following arguments are available:
+
+- **`name`**
+
+ The name of the template source to remove. Names are case-insensitive.
+
+## Options
+
+The following options are available:
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+## Examples
+
+- Remove a template source:
+
+ ```bash title="Aspire CLI"
+ aspire template source remove company
+ ```
+
+## See also
+
+- [aspire template source add command](../aspire-template-source-add/)
+- [aspire template source list command](../aspire-template-source-list/)
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source.mdx
new file mode 100644
index 0000000000..5d2146c570
--- /dev/null
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-template-source.mdx
@@ -0,0 +1,75 @@
+---
+title: aspire template source command
+description: Learn about the aspire template source command and its usage. This command group manages global template sources that aspire new uses to discover templates.
+---
+
+import Include from '@components/Include.astro';
+
+## Name
+
+`aspire template source` - Manage global template sources.
+
+## Synopsis
+
+```bash title="Aspire CLI"
+aspire template source [command] [options]
+```
+
+## Description
+
+The `aspire template source` command manages global template sources. A template source is a named location that contains templates: either a Git repository or an absolute local directory. Sources are stored in the global Aspire configuration, so they apply to every project on the machine.
+
+When at least one source is configured, the interactive [`aspire new`](../aspire-new/#select-a-template) template picker lists templates from each source alongside the built-in templates. If a configured source can't be read when `aspire new` discovers templates, the command warns about that source and continues with the others.
+
+Template sources require the `aspire.config.json` configuration format. If your global configuration still uses the legacy format, these commands fail and direct you to run `aspire config info` to migrate it.
+
+## Options
+
+The following options are available:
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+## Commands
+
+The following commands are available:
+
+| Command | Function |
+| ------------------------------------------------------------------------- | ---------------------------------------------------------- |
+| [`aspire template source add `](../aspire-template-source-add/) | Add a named template source after confirming you trust it. |
+| [`aspire template source list`](../aspire-template-source-list/) | List the configured template sources. |
+| [`aspire template source remove `](../aspire-template-source-remove/) | Remove a named template source. |
+
+## Examples
+
+- Add a template source from a Git repository:
+
+ ```bash title="Aspire CLI"
+ aspire template source add company --repository https://github.com/example/templates
+ ```
+
+- List the configured template sources:
+
+ ```bash title="Aspire CLI"
+ aspire template source list
+ ```
+
+- Remove a template source:
+
+ ```bash title="Aspire CLI"
+ aspire template source remove company
+ ```
+
+## See also
+
+- [aspire new command](../aspire-new/)
+- [aspire template command](../aspire-template/)
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-template.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-template.mdx
new file mode 100644
index 0000000000..e4f0a4ba70
--- /dev/null
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-template.mdx
@@ -0,0 +1,49 @@
+---
+title: aspire template command
+description: Learn about the aspire template command and its usage. This command group is used to manage template configuration for the Aspire CLI.
+---
+
+import Include from '@components/Include.astro';
+
+## Name
+
+`aspire template` - Manage project templates.
+
+## Synopsis
+
+```bash title="Aspire CLI"
+aspire template [command] [options]
+```
+
+## Description
+
+The `aspire template` command manages template configuration for the Aspire CLI. It contains the `source` command group, which manages the global template sources that [`aspire new`](../aspire-new/#select-a-template) uses to discover templates.
+
+## Options
+
+The following options are available:
+
+-
+
+-
+
+-
+
+-
+
+-
+
+-
+
+## Commands
+
+The following commands are available:
+
+| Command | Function |
+| ------------------------------------------------------ | ------------------------------- |
+| [`aspire template source`](../aspire-template-source/) | Manage global template sources. |
+
+## See also
+
+- [aspire new command](../aspire-new/)
+- [aspire template source command](../aspire-template-source/)
diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire.mdx
index 8f17ac8748..a3e7519d27 100644
--- a/src/frontend/src/content/docs/reference/cli/commands/aspire.mdx
+++ b/src/frontend/src/content/docs/reference/cli/commands/aspire.mdx
@@ -74,6 +74,7 @@ The following commands are available:
| [`aspire doctor`](../aspire-doctor/) | Stable | Diagnose Aspire environment issues and verify setup. |
| [`aspire mcp`](../aspire-mcp/) | Stable | Interact with MCP tools exposed by Aspire resources. |
| [`aspire secret`](../aspire-secret/) | Stable | Manage apphost user secrets. |
+| [`aspire template`](../aspire-template/) | Stable | Manage project templates. |
| [`aspire dashboard`](../aspire-dashboard/) | Preview | Manage the Aspire dashboard. |
## Examples
diff --git a/src/frontend/tests/unit/cli-command-sidebar.vitest.test.ts b/src/frontend/tests/unit/cli-command-sidebar.vitest.test.ts
new file mode 100644
index 0000000000..7e695faaee
--- /dev/null
+++ b/src/frontend/tests/unit/cli-command-sidebar.vitest.test.ts
@@ -0,0 +1,40 @@
+import { readdirSync } from 'node:fs';
+import { join } from 'node:path';
+
+import { describe, expect, it } from 'vitest';
+
+import { referenceTopics } from '../../config/sidebar/reference.topics';
+
+const commandsDir = join(process.cwd(), 'src/content/docs/reference/cli/commands');
+
+function collectSlugs(items: unknown, slugs: Set): Set {
+ if (!Array.isArray(items)) {
+ return slugs;
+ }
+
+ for (const item of items) {
+ if (typeof item === 'string') {
+ slugs.add(item);
+ } else if (item && typeof item === 'object') {
+ const { slug, items: children } = item as { slug?: unknown; items?: unknown };
+ if (typeof slug === 'string') {
+ slugs.add(slug);
+ }
+ collectSlugs(children, slugs);
+ }
+ }
+
+ return slugs;
+}
+
+describe('CLI command reference sidebar', () => {
+ it('lists every CLI command page so the page resolves to the Reference topic', () => {
+ const slugs = collectSlugs(referenceTopics.items, new Set());
+ const missing = readdirSync(commandsDir)
+ .filter((file) => /\.mdx?$/.test(file))
+ .map((file) => `reference/cli/commands/${file.replace(/\.mdx?$/, '')}`)
+ .filter((slug) => !slugs.has(slug));
+
+ expect(missing).toEqual([]);
+ });
+});