aspire ps command
aspire ps - List running Aspire AppHosts.
Synopsis
Section titled “Synopsis”aspire ps [options]Description
Section titled “Description”The aspire ps command lists all running Aspire AppHost processes. The output includes the AppHost project path, process IDs, and dashboard URLs for each running instance.
The command scans for running AppHosts by checking the backchannel connections in the ~/.aspire/backchannels/ directory. This approach is fast because it doesn’t need to recursively search for project files.
aspire ps provides AppHost-level information. Use --follow to continuously stream AppHost lifecycle updates. To inspect per-resource details or stream resource state changes within a specific AppHost, use aspire describe --follow.
The default output is a human-readable table with the following columns:
| Column | Description |
|---|---|
PATH | The file path to the AppHost project |
SDK | The Aspire SDK version used by the AppHost |
PID | The process ID of the running AppHost |
CLI_PID | The process ID of the CLI that started the AppHost |
DASHBOARD | The dashboard URL with login token |
In-scope AppHosts (those within the current directory) are displayed first, followed by out-of-scope AppHosts.
Before listing, aspire ps also detects and stops any orphaned AppHosts whose launching CLI process has died (for example, after a crash or a hard kill) so the output reflects only AppHosts that are actually running. This cleanup is best effort: if it fails for a given AppHost, aspire ps still proceeds with listing the rest.
Options
Section titled “Options”The following options are available:
-
-f, --followContinuously stream AppHost lifecycle updates. Requires
--format Json. Output is emitted as one compact JSON object per line in Newline Delimited JSON (NDJSON) format whenever an AppHost starts, stops, or changes state. Each line follows the same schema as a single AppHost entry from snapshot JSON output, plus astatusfield (runningorstopped). -
--format <Json|Table>Output result format. Use
Jsonfor machine-readable output suitable for scripting and automation. The JSON output includes an array of AppHost objects withappHostPath,appHostPid,cliPid,logFilePath, anddashboardUrlproperties. ThelogFilePathfield isnullwhen no log path is available. Defaults toTable. -
--output <Default|Snapshot>Output mode for
--followstreaming.Defaultemits one changed AppHost record per NDJSON line, as described for--followabove.Snapshotemits full AppHost snapshots that also include resource health and heartbeat updates, intended for monitoring tools and the native tray rather than interactive use.Snapshotrequires both--followand--format Json. Defaults toDefault. -
-?, -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”-
List all running AppHosts in table format:
Aspire CLI aspire psExample output:
Output PATH SDK PID CLI_PID DASHBOARD./src/MyApp.AppHost/MyApp.AppHost.csproj 17.0.0 12345 12340 https://localhost:17244/login?t=abc123/home/user/other/OtherApp.AppHost.csproj 17.0.0 67890 67885 https://localhost:17250/login?t=def456 -
Output running AppHosts as JSON for scripting:
Aspire CLI aspire ps --format JsonExample output:
Output [{"appHostPath": "./src/MyApp.AppHost/MyApp.AppHost.csproj","appHostPid": 12345,"cliPid": 12340,"logFilePath": "~/.aspire/logs/cli_20260516T123456_abc12345.log","dashboardUrl": "https://localhost:17244/login?t=abc123"}]The
logFilePathproperty isnullwhen no log path is available for the AppHost. -
Stream AppHost lifecycle updates as NDJSON and pipe to
jq:Aspire CLI aspire ps --follow --format Json | jq -c '{ appHostPath, status }' -
Stream full AppHost snapshots, including resource health and heartbeats, for a monitoring tool:
Aspire CLI aspire ps --output Snapshot --follow --format Json --non-interactive --nologoNormal shutdown of this stream (including the consumer disconnecting or the command being canceled) exits with code
0. Terminal errors, including AppHost discovery failures and exceeded AppHost-count or message-size limits, exit with a non-zero code.