The Aspire CLI is used to create, run, and manage Aspire-based distributed applications.
Usage
aspire <command> [options]
Global 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.
Commands
App Commands
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.
run
Run an apphost in development mode.
stop
Stop a running apphost or the specified resource.
ps
List running apphosts.
Resource Management
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.
Monitoring
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.
Deployment
Command
Description
publish
Generate deployment artifacts for an apphost.
deploy
Deploy an apphost to its deployment targets.
destroy
Destroy a previously deployed AppHost environment.
do <step>
Execute a specific pipeline step and its dependencies.
Tools & Configuration
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 and API reference from aspire.dev.
agent
Manage AI agent specific setup.
Examples
# Create a new Aspire application
aspire new
# Run the apphost
aspire run
# Start in the background (useful for CI and agent environments)
aspire start --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 start
aspire wait webapi --timeout 60
# Add an integration
aspire add redis
# Diagnose environment issues
aspire doctor
# Search the API reference
aspire docs api search "RunAsEmulator" --language csharp
# Search Aspire documentation
aspire docs search "redis"