aspire ls command
aspire ls - List AppHost project candidates.
Synopsis
Section titled “Synopsis”aspire ls [options]Description
Section titled “Description”The aspire ls command discovers and lists AppHost project candidates in the current working directory and its subdirectories. It performs parallel discovery and reports results along with each candidate’s programming language and build status.
The default output is a human-readable table with the following columns:
| Column | Description |
|---|---|
PATH | The file path to the AppHost project |
LANGUAGE | The raw AppHost language ID, such as csharp or typescript/nodejs |
STATUS | Build status of the AppHost candidate: buildable or possibly-unbuildable |
The STATUS value is buildable when the project validates as an AppHost candidate. It is possibly-unbuildable when the project looks like an AppHost but may not build in the current environment.
Discovery and configuration
Section titled “Discovery and configuration”If a configuration file (for example aspire.config.json with appHost.path or a legacy .aspire/settings.json with appHostPath) points to an AppHost project, that path is included as a candidate. When a configured AppHost path points to a missing file, aspire ls displays a warning. When the configuration file is invalid JSON, has an invalid shape, or the configured AppHost path is empty, contains invalid characters, or isn’t a JSON string, aspire ls displays an error. When no configuration file is present, discovery continues silently.
Output ordering
Section titled “Output ordering”Non-streaming mode (--format json without --stream): results are sorted by path before output.
Streaming mode (--format json --stream): results are emitted in arrival order from parallel discovery and are not sorted. If you need a deterministic order for streamed output, pipe through a sort step. For example:
aspire ls --format json --stream | jq -s 'sort_by(.path)'This example uses jq, a third-party JSON processor.
Options
Section titled “Options”The following options are available:
-
--format <Json|Table>Output result format. Use
Jsonfor machine-readable output suitable for scripting and automation. Defaults toTable. -
--streamOutput discovered AppHosts as newline-delimited JSON (NDJSON), emitting each candidate as soon as it is discovered. Requires
--format json. -
--allInclude all candidate AppHosts by disabling Git filtering and the built-in skip list for common dependency, build-output, and tooling directories such as
bin,obj,node_modules,.venv,.git, and.vs. The NuGet package cache is still excluded. -
-?, -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 discovered AppHost candidates in table format:
Aspire CLI aspire lsExample output:
Output PATH LANGUAGE STATUS./src/MyApp.AppHost/MyApp.AppHost.csproj csharp buildable./src/OtherApp.AppHost/apphost.ts typescript/nodejs buildable -
Output discovered AppHosts as JSON for scripting:
Aspire CLI aspire ls --format jsonExample output:
Output [{"path": "./src/MyApp.AppHost/MyApp.AppHost.csproj","language": "csharp","status": "buildable"},{"path": "./src/OtherApp.AppHost/apphost.ts","language": "typescript/nodejs","status": "buildable"}] -
Stream discovered AppHosts as newline-delimited JSON:
Aspire CLI aspire ls --format json --streamExample output (each line is a JSON object emitted as candidates are discovered; your line order may vary):
Output {"path":"./src/OtherApp.AppHost/apphost.ts","language":"typescript/nodejs","status":"buildable"}{"path":"./src/MyApp.AppHost/MyApp.AppHost.csproj","language":"csharp","status":"buildable"}Note: lines are emitted in discovery arrival order and are not sorted. To sort streamed output by path:
Aspire CLI aspire ls --format json --stream | jq -s 'sort_by(.path)' -
Include all AppHost candidates, ignoring
.gitignoreand directory filters:Aspire CLI aspire ls --all