aspire template source add command
यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।
aspire template source add - Add a named template source to global configuration after confirming you trust it.
Synopsis
Section titled “Synopsis”aspire template source add <name> [options]Description
Section titled “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 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:
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
Section titled “Arguments”The following arguments are available:
-
nameThe 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
Section titled “Options”The following options are available:
-
--pathThe template directory. Its meaning depends on whether
--repositoryis specified:- Without
--repository,--pathmust be an absolute local directory that contains templates. - With
--repository,--pathis 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 (.).
- Without
-
--repositoryAn HTTPS or SSH Git repository URL that contains templates.
-
--refA Git branch, tag, or full commit SHA. Requires
--repositoryand defaults toHEAD. -
-y, --yesTrust the template source and skip confirmation.
-
-?, -h, --helpPrints help and usage documentation for the available commands and options.
-
-l, --log-level <Critical|Debug|Error|Information|None|Trace|Warning>Set the minimum log level for console output. Use this option to increase diagnostics while troubleshooting or reduce output in scripted runs.
-
--non-interactiveRun the command in non-interactive mode, disabling all interactive prompts and spinners.
-
--nologoSuppress the startup banner and telemetry notice.
-
--bannerDisplay the animated Aspire CLI welcome banner.
-
--wait-for-debuggerWait for a debugger to attach before running a command.
Examples
Section titled “Examples”-
Add a template source and confirm trust interactively:
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:
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:
Aspire CLI aspire template source add local --path /home/user/templates -
Add a template source in automation by explicitly trusting it:
Aspire CLI aspire template source add company --repository https://example.com/templates --non-interactive --yes