> ## Documentation Index
> Fetch the complete documentation index at: https://buildcharts.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Plugins

> Built-in plugins that extend generation before and after HCL creation.

Use plugins to extend build generation with custom steps, configuration, and environment setup.

## What plugins do

Plugins hook into the `buildcharts` generation pipeline to run custom logic before and/or after the build configuration is produced. They are an extensibility point for tasks such as injecting environment secrets, generating additional output files, or performing validation.

* Prepare external state before generation
* Write secret or debug files under `.buildcharts`
* Patch the generated `.buildcharts/docker-bake.hcl`
* Generate additional output files
* Perform validation or environment setup

## How to enable them

To enable plugins for a particular repository, declare a top-level `plugins` list in your `build.yml`. Each entry should be the name of a registered plugin. When you run `buildcharts generate`, these plugins execute in sequence and can modify the generated HCL or write additional files.

**Example**

```yaml theme={"theme":{"light":"plastic","dark":"plastic"}}
plugins:
  - NuGetAuthenticate@v1
  - TestcontainersDinD@v1
```

Combine multiple plugins by listing them one per line. Plugins are executed in the order they appear in the list.

## Built-in plugins

BuildCharts currently loads built-in plugins only. If you need a new plugin, you must extend the BuildCharts tool and ship it as part of your BuildCharts distribution.

* [NuGetAuthenticate@v1](/plugins/nuget-authenticate)
* [TestcontainersDinD@v1](/plugins/testcontainers-dind)

Use this page for the plugin model and `build.yml` wiring, then use the plugin pages for behavior and environment details.

## Example

```yaml theme={"theme":{"light":"plastic","dark":"plastic"}}
version: v1beta

plugins:
  - TestcontainersDinD@v1

variables:
  - VERSION
  - COMMIT

targets:
  src/dotnet-testcontainers.csproj:
    type: [build, test]
    with:
      contexts:
        base: docker-image://mcr.microsoft.com/dotnet/sdk:10.0
```

## Related pages

* [NuGetAuthenticate@v1](/plugins/nuget-authenticate)
* [TestcontainersDinD@v1](/plugins/testcontainers-dind)
