# CommandSpec

- Kind: `class`
- Package: [Aspire.TypeSystem](/reference/api/csharp/aspire.typesystem.md)
- Version: `13.4.0`
- Namespace: `Aspire.TypeSystem`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/RuntimeSpec.cs)

Specifies a command to execute.

## Definition

```csharp
namespace Aspire.TypeSystem;

public sealed class CommandSpec
{
    // ...
}
```

## Constructors

- [CommandSpec](/reference/api/csharp/aspire.typesystem/commandspec/constructors.md#constructor)

## Properties

- [Args](/reference/api/csharp/aspire.typesystem/commandspec/properties.md#args) : `string[]` `get; init` -- Gets the arguments for the command. Supports placeholders: {appHostFile}, {appHostDir}, {args}
- [Command](/reference/api/csharp/aspire.typesystem/commandspec/properties.md#command) : `string` `get; init` -- Gets the command to execute (e.g., "npm", "npx", "python").
- [EnvironmentVariables](/reference/api/csharp/aspire.typesystem/commandspec/properties.md#environmentvariables) : `Dictionary<string, string>` `get; init` -- Gets the environment variables to set when executing the command. These are merged with any environment variables provided by the caller.
