Watch Aspire live streamsDocsTry Aspire

CommandSpec Properties

ClassProperties4 members
Specifies a command to execute.
Gets the arguments for the command. Supports placeholders: {appHostFile}, {appHostDir}, {args}
public string[] Args { get; init; }
Gets the command to execute (e.g., "npm", "npx", "python").
public string Command { get; init; }
EnvironmentVariablesSection titled EnvironmentVariablesnullableDictionary<string, string>
Gets the environment variables to set when executing the command. These are merged with any environment variables provided by the caller.
public Dictionary<string, string>? EnvironmentVariables { get; init; }
Gets an optional incremental-build check. When set, the command is skipped if every declared output exists and its stamp file is newer than every declared input. Null means the command always runs.
public CommandUpToDateCheck? UpToDateCheck { get; init; }