aspire init command
Bu içerik henüz dilinizde mevcut değil.
aspire init - Initialize Aspire support in an existing codebase with a C# or TypeScript AppHost.
Synopsis
Section titled “Synopsis”aspire init [options]Description
Section titled “Description”The aspire init command initializes Aspire support in an existing repo or workspace. It scaffolds a minimal AppHost skeleton together with an aspire.config.json, then optionally installs the aspireify agent skill so your AI coding agent can complete the wiring.
This command defaults to interactive mode. When executed without any options, the command prompts you for the AppHost language when more than one path is available.
AppHost detection
Section titled “AppHost detection”The command adapts to the repo it finds:
- C# file-based AppHost (when selected interactively) — creates
apphost.cswith#:sdkand#:packagedirectives for a lightweight single-file orchestrator. - TypeScript AppHost (when selected interactively) — creates
apphost.tswith the generated.modules/folder.
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.
The aspireify skill
Section titled “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.
The skill instructs the agent to:
- Scan the repo and discovering existing projects, services, and containers
- Ask you clarifying questions before making decisions — for example, which services to orchestrate, whether a hardcoded port is significant, or whether to map an existing env var or switch to Aspire’s service discovery
- Wire resources into the AppHost with
WithReference,WaitFor, endpoints, and volumes - Optionally configure OpenTelemetry
- Validate the wiring with a smoke-test
aspire start
Options
Section titled “Options”The following options are available:
-
--channelChannel to use for templates (
stable,staging,daily). -
--languageThe AppHost language to scaffold (
csharp,typescript). -
-?, -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”-
Initialize Aspire support in the current repo interactively:
Aspire CLI aspire init -
Initialize Aspire support with a TypeScript AppHost:
Aspire CLI aspire init --language typescript -
Initialize Aspire support using the
dailychannel templates:Aspire CLI aspire init --channel daily