Skip to content
Back to skills

Aspire Restart

ASecurity

Start or restart the .NET Aspire AppHost via the developer CLI. Always use this, never the developer CLI's `run` command, `aspire run`, or `aspire restart`.

  • 438 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 26, 2026
developmentbashdatabasefrontendbackend

Works with

  • cli

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add platformplatform/PlatformPlatform --skill aspire-restart --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aspire Restart?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aspire Restart
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/platformplatform-aspire-restart/badge)](https://www.skillsdirectory.com/skills/platformplatform-aspire-restart)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aspire-restart
description: Start or restart the .NET Aspire AppHost via the developer CLI. Always use this, never the developer CLI's `run` command, `aspire run`, or `aspire restart`.
---

# Restart Aspire

```bash
dotnet run --project developer-cli -- restart
```

Use `developer-cli` exactly as written - do not expand to an absolute worktree path.

Stops any running Aspire AppHost and starts a fresh instance. Detached by default - the CLI returns immediately while Aspire keeps running.

Always use `restart`, even when nothing is running yet. It is a no-op when Aspire is not up, and the safe default in every other case. Never use the developer CLI's `run` command, `aspire run`, or `aspire restart`.

- `--public-url <url>` - set `PUBLIC_URL` (e.g. an ngrok URL)

## When to use

- After backend or frontend changes - `restart` is the safe default; it works whether Aspire is up or not.
- To run database migrations.
- When hot reload breaks or stops picking up changes.
- Before running e2e tests on a fresh stack.

## Port allocation

Fully automatic. On a fresh checkout the developer CLI bootstraps `.workspace/port.txt`: the root gets the default base port; worktrees scan a fixed list of candidates and pick the first one whose ports are all free. Once written, the file is the authoritative allocation for the lifetime of the checkout.

## Output is fire-and-forget

The CLI prints `Aspire is restarting on https://app.dev.localhost:<port>` and exits before Aspire is fully ready.

## Stopping Aspire

To stop without restarting, run `dotnet run --project developer-cli -- stop`. Rarely needed - prefer `restart` for everyday use.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.