The Aspire CLI is used to create, run, and manage Aspire-based distributed applications.
aspire <command> [options]
| Option |
Description |
-h, /h |
Show help and usage information. |
-v, --version |
Show version information. |
-l, --log-level |
Set the minimum log level for console output (Trace, Debug, Information, Warning, Error, Critical). |
--non-interactive |
Run the command in non-interactive mode, disabling all interactive prompts and spinners. |
--nologo |
Suppress the startup banner and telemetry notice. |
--banner |
Display the animated Aspire CLI welcome banner. |
--wait-for-debugger |
Wait for a debugger to attach before executing the command. |
| Command |
Description |
new |
Create a new app from an Aspire starter template. |
init |
Initialize Aspire in an existing codebase. |
add [<integration>] |
Add a hosting integration to the apphost. |
update |
Update integrations in the Aspire project. (Preview) |
run |
Run an apphost in development mode. |
stop |
Stop a running apphost or the specified resource. |
ps |
List running apphosts. |
| Command |
Description |
start <resource> |
Start a stopped resource. |
stop [<resource>] |
Stop a running apphost or the specified resource. |
restart <resource> |
Restart a running resource. |
wait <resource> |
Wait for a resource to reach a target status. |
command <resource> <command> |
Execute a command on a resource. |
| Command |
Description |
describe [<resource>] |
Describe resources in a running apphost. |
logs [<resource>] |
Display logs from resources in a running apphost. |
otel |
View OpenTelemetry data (logs, spans, traces) from a running apphost. |
| Command |
Description |
publish |
Generate deployment artifacts for an apphost. (Preview) |
deploy |
Deploy an apphost to its deployment targets. (Preview) |
do <step> |
Execute a specific pipeline step and its dependencies. (Preview) |
| Command |
Description |
config |
Manage CLI configuration including feature flags. |
cache |
Manage disk cache for CLI operations. |
doctor |
Diagnose Aspire environment issues and verify setup. |
docs |
Browse and search Aspire documentation from aspire.dev. |
agent |
Manage AI agent specific setup. |
# Create a new Aspire application
aspire new
# Run the apphost
aspire run
# Run in the background (useful for CI and agent environments)
aspire run --detach --isolated
# Check resource status
aspire describe
# Stream resource state changes
aspire describe --follow
# View logs
aspire logs
aspire logs webapi
# Stop the apphost
aspire stop
# Wait for a resource to be healthy (CI/scripts)
aspire run --detach
aspire wait webapi --timeout 60
# Add an integration
aspire add redis
# Diagnose environment issues
aspire doctor
# Search Aspire documentation
aspire docs search "redis"
https://github.com/dotnet/aspire