Watch Aspire live streamsDocsTry Aspire

aspire describe command

aspire describe - Describe resources in a running AppHost.

Aspire CLI
aspire describe [<resource>] [options]

The aspire describe command displays resource details for a running Aspire AppHost. It shows a table of resources with their name, type, state, health status, and URLs. Hidden resources are excluded by default; use the --include-hidden option to show them. Use the --follow option to continuously stream resource state changes in real time.

When a specific resource name is provided, only matching resources are displayed. If no matching resource is found, the command returns an error.

When executed without the --apphost option, the command:

  1. Scans for all running AppHost processes.
  2. If multiple AppHosts are running within the current directory scope, prompts you to select which one to target.
  3. If only one AppHost is running in scope, connects to it directly.
  4. If no in-scope AppHosts are found but out-of-scope AppHosts exist, displays all running AppHosts for selection.
  • <resource>

    The name of the resource to display. If not specified, all resources are shown.

The following options are available:

  • -f, --follow

    Continuously stream resource state changes. The current state of every resource is emitted immediately when streaming starts, even if no further changes occur, and then each subsequent update is emitted as it happens. In table mode, each update prints a line showing the resource name, state, health, and endpoints. In JSON mode, each update emits a single JSON object per line (Newline Delimited JSON (NDJSON) format).

  • --apphost <path>

    The path to the Aspire AppHost project file. When specified, the command connects to the AppHost running from that project file without prompting for selection.

  • --format <Json|Mermaid|Table>

    Output format. Use Json for machine-readable output suitable for scripting and automation, or Mermaid to export a resource graph snapshot. Defaults to Table. Values are case-insensitive.

    JSON output includes both resourceType (the technical type) and resourceTypeDisplayName (the friendly type label shown in the table’s Type column). Older AppHosts that don’t provide a label fall back to the technical type.

    In snapshot mode (without --follow), JSON output wraps resources in a { "resources": [...] } object. In follow mode, JSON output uses Newline Delimited JSON (NDJSON) for streaming, emitting one JSON object per line.

    Mermaid output is an unfenced flowchart LR diagram with deterministic node identifiers, escaped resource labels, and directed relationships based on resource references. Parameters, endpoints, configuration values, and resource state are not exported, and references outside the selected resource set are omitted. Progress and informational messages are written to stderr, so redirecting stdout captures only the diagram source. --follow isn’t supported with Mermaid output. Each invocation captures one snapshot.

    Starting with Aspire 17.0, the properties object of a .NET project resource describes how the project was launched:

    • project.launchCommand is run for dotnet run, watch for dotnet watch, ide for an IDE-managed launch, or direct when Aspire builds the project and then starts the built app directly. The value is null when the launch command can’t be classified.
    • project.configuration and project.targetFramework report the build configuration and target framework, when they’re known.

    For ide and direct launches, executable.pid identifies the app process rather than a dotnet run or dotnet watch launcher.

  • --include-hidden

    Includes resources that are marked as hidden. By default, hidden resources are not shown. When a specific resource name is provided, hidden resources are always included regardless of this option.

  • -?, -h, --help

    Prints 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-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 running a command.

  • Show all resources in a running AppHost:

    Aspire CLI
    aspire describe

    Example output:

    Output
    Name Type State Health Endpoints
    cache Redis Running Healthy tcp://localhost:63122
    webfrontend Project Running Healthy https://localhost:17015, http://localhost:15099
    apiservice Project Running Healthy https://localhost:17016, http://localhost:15100
    migrations Project Finished (exit code: 0) - -

    For resources in the Finished or Exited state, the State column includes the exit code when it’s available, such as Finished (exit code: 0). A nonzero exit code is shown in red so that failed resources stand out.

  • Show details for a specific resource:

    Aspire CLI
    aspire describe webfrontend
  • Continuously stream resource state changes:

    Aspire CLI
    aspire describe --follow
  • Stream state changes for a specific resource:

    Aspire CLI
    aspire describe webfrontend --follow
  • Output resource details as JSON:

    Aspire CLI
    aspire describe --format Json
  • Stream resource changes as Newline Delimited JSON (NDJSON) for scripting:

    Aspire CLI
    aspire describe --follow --format Json
  • Export a resource graph as Mermaid diagram source:

    Aspire CLI
    aspire describe --format Mermaid > resources.mmd

    Each invocation exports one diagram. Appending repeated invocations with >> produces multiple diagrams in the file, not a merged diagram.

  • Target a specific AppHost project:

    Aspire CLI
    aspire describe --apphost './src/MyApp.AppHost/MyApp.AppHost.csproj'
  • Show all resources including hidden ones:

    Aspire CLI
    aspire describe --include-hidden