# IResource.withProcessCommand

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [IResource](/reference/api/typescript/aspire.hosting/iresource.md)
- Version: `13.4.0`
- Kind: `method`

Adds a command to the resource that starts a local process when invoked.

## Definition

```typescript
interface IResource {
  // ... omitted for brevity
  withProcessCommand(
      commandName: string,
      displayName: string,
      options: ProcessCommandExportOptions): IResource;
}
```

## Signature

```typescript
withProcessCommand(
    commandName: string,
    displayName: string,
    options: ProcessCommandExportOptions): IResource
```

## Parameters

- `commandName` (`string`)
- `displayName` (`string`)
- `options` ([ProcessCommandExportOptions](/reference/api/typescript/aspire.hosting/processcommandexportoptions.md))

## Returns

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

## Defined on

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