# CommandContext

Source: /tuil/docs/reference/packages/core/api/command-context
Locale: en

interface exported by @mwillbanks/tuil-core.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-core`.

```ts
export interface CommandContext {
  readonly services: ServiceContainer;
  readonly signal: AbortSignal;
  readonly source?: string;
  readonly metadata: Readonly<Record<string, unknown>>;
}
```

## Members [#members]

| Member     | Type                                | Required | Description                                                                  | Related types                                                             |
| ---------- | ----------------------------------- | -------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `services` | `ServiceContainer`                  | Yes      | The `services` member uses the `ServiceContainer` contract.                  | [`ServiceContainer`](/tuil/docs/reference/packages/core/api/service-container) |
| `signal`   | `AbortSignal`                       | Yes      | The `signal` member uses the `AbortSignal` contract.                         | —                                                                         |
| `source`   | `string \| undefined`               | No       | The `source` member uses the `string \| undefined` contract.                 | —                                                                         |
| `metadata` | `Readonly<Record<string, unknown>>` | Yes      | The `metadata` member uses the `Readonly<Record<string, unknown>>` contract. | —                                                                         |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`ServiceContainer`](/tuil/docs/reference/packages/core/api/service-container)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/core/src/commands.ts)

## Package [#package]

[@mwillbanks/tuil-core](/tuil/docs/reference/packages/core)
