# withRequiredCommand

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Declares that a resource requires a specific command/executable to be available on the local machine PATH before it can start.

## Definition

```typescript
interface ContainerResource {
  // ... omitted for brevity
  withRequiredCommand(
    command: string,
    helpLink?: string): IResource
}
```

## Parameters

- `command` (`string`)
- `helpLink` (`string`) `optional`

## Returns

[IResource](/reference/api/typescript/aspire.hosting/iresource.md) `builder`

## Applies to

- [ContainerResource](/reference/api/typescript/aspire.hosting/containerresource.md)
- [ExecutableResource](/reference/api/typescript/aspire.hosting/executableresource.md)
- [ProjectResource](/reference/api/typescript/aspire.hosting/projectresource.md)
- [ParameterResource](/reference/api/typescript/aspire.hosting/parameterresource.md)
- [ContainerRegistryResource](/reference/api/typescript/aspire.hosting/containerregistryresource.md)
- [DotnetToolResource](/reference/api/typescript/aspire.hosting/dotnettoolresource.md)
- [ExternalServiceResource](/reference/api/typescript/aspire.hosting/externalserviceresource.md)
- [CSharpAppResource](/reference/api/typescript/aspire.hosting/csharpappresource.md)
