Skip to content
DocsTry Aspire
DocsTry

aspire terminal command

aspire terminal - Manage interactive terminal sessions for resources.

Aspire CLI
aspire terminal [command] [options]

The aspire terminal command provides subcommands for working with interactive terminal sessions exposed by resources that were registered using WithTerminal() in the AppHost. You can list which resources have a terminal and attach your local terminal to a running session.

Because WithTerminal is experimental, the aspire terminal command group is hidden behind a feature flag. Enable it before use:

Enable the aspire terminal commands
aspire config set features.terminalCommandsEnabled true

The connected AppHost must advertise the terminals.v1 capability (Aspire.Hosting 13.4 or later). Against an older AppHost the subcommands report that terminals are not supported.

The following options are available:

  • -?, -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.

The following commands are available:

CommandFunction
aspire terminal attachAttach the local terminal to a resource’s interactive session.
aspire terminal psList interactive terminal sessions in the connected AppHost.