Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: aspire start command
description: Learn about the aspire start command and its usage. This command starts an apphost in the background.
description: Learn about the aspire start command and its usage. This command starts an AppHost in the background.
---

import Include from '@components/Include.astro';

## Name

`aspire start` - Start an apphost in the background.
`aspire start` - Start an AppHost in the background.

## Synopsis

Expand All @@ -17,12 +17,47 @@ aspire start [options] [[--] <additional arguments>...]

## Description

The `aspire start` command starts an AppHost in the background and exits after the apphost is running. Use it when you want a detached apphost that you can inspect later with commands such as `aspire ps`, `aspire describe`, `aspire logs`, and `aspire stop`.
The `aspire start` command starts an AppHost in the background and exits after the AppHost reaches a stable running state. Use it when you want a detached AppHost that you can inspect later with commands such as `aspire ps`, `aspire describe`, `aspire logs`, and `aspire stop`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot implement this fix. standardize to AppHost

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Standardized to "AppHost" (PascalCase) in frontmatter description, Name section, and Options section in commit 14c9152.


<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

You can output detached startup details as a table or JSON, and you can pass additional arguments through to the AppHost by using the `--` delimiter.

### Startup readiness and failure diagnostics

`aspire start` waits for the AppHost to report that it has reached a stable running state before detaching. This means that early startup failures — such as TypeScript syntax errors in a polyglot AppHost or C# compile errors in a .NET AppHost — are surfaced in the parent terminal instead of being silently lost in the background.

When the AppHost fails to start, `aspire start` displays a curated excerpt of the startup output that filters out noise such as package install logs and highlights the relevant error messages:

```bash title="Aspire CLI"
Starting Aspire AppHost in the background...
❌ Failed to start the AppHost.
ℹ️ Recent AppHost startup output:
apphost.ts(1,15): error TS1109: Expression expected.
❌ AppHost process exited with code 2.
📄 See logs at <log-path>
```
Comment on lines +37 to +39
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot implement this fix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — replaced both ... placeholders with <log-path> in the TypeScript and .NET sample output blocks in commit 79553e4.


For a .NET AppHost with a compile error, the output includes the relevant build diagnostics:

```bash title="Aspire CLI"
Starting Aspire AppHost in the background...
❌ Failed to start the AppHost.
ℹ️ Recent AppHost startup output:
Determining projects to restore...
All projects are up-to-date for restore.
/work/MyAppHost/Program.cs(3,41): error CS1002: ; expected [/work/MyAppHost/MyAppHost.csproj]
Build FAILED.
0 Warning(s)
1 Error(s)
❌ AppHost failed to build.
📄 See logs at <log-path>
```

The parent log also captures the replayed child output under `DetachedAppHost/...` log categories so the log file is self-contained.

Pressing **Ctrl+C** while `aspire start` is waiting for the AppHost to start will terminate the startup process.

## Hot Reload and watch behavior

By default, `aspire start` starts the AppHost as a detached background process. It doesn't watch the AppHost or resource source files. After you change AppHost code, restart the detached AppHost by running `aspire start` again. For individual resource changes, keep the AppHost running and restart or rebuild the resource from the Aspire CLI or dashboard when needed.
Expand Down Expand Up @@ -51,7 +86,7 @@ The following options are available:

- **`--format <Json|Table>`**

Output format for detached apphost results. Use `Json` for machine-readable output suitable for scripting and automation.
Output format for detached AppHost results. Use `Json` for machine-readable output suitable for scripting and automation.

- **`--isolated`**

Expand Down