# Resource command

A named operation attached to a resource that lets a developer trigger work such as clearing a cache or seeding data.

Also known as: custom resource command

A resource command exposes an operation on a resource through Aspire's developer tools. Its implementation might invoke application logic, make an HTTP request, or run a process.

Examples include applying database migrations, seeding test data, and clearing a cache. Commands can report progress and results, and their availability can depend on the resource's state.

A resource command is not a top-level Aspire CLI command. It belongs to a particular resource in the application model, even when you invoke it through the CLI.

## Practical example

Attach a clear-cache command to a Redis resource so a developer can reset cached data without restarting the entire app.

## Learn more

- [Add custom resource commands](https://aspire.dev/fundamentals/custom-resource-commands/)

- [Invoke resource HTTP endpoints as commands](https://aspire.dev/fundamentals/http-commands/)

## Related terms

- [AppHost](https://aspire.dev/hub/glossary/apphost/)

- [Aspire dashboard](https://aspire.dev/hub/glossary/aspire-dashboard/)

- [Resource](https://aspire.dev/hub/glossary/resource/)