# Reference > Extensions

# Artillery Plugins

## Overview

Artillery has support for plugins, which can add functionality and extend its built-in features. Plugins can hook into Artillery's internal APIs and extend its behavior with new capabilities.

Plugins are distributed as normal npm packages which are named with an `artillery-plugin-` prefix, e.g. `artillery-plugin-expect`.

## Installing plugins

Plugins can be installed with `npm`, `yarn` or `pnpm` in the same way as any other Node.js module.

If Artillery is installed globally (i.e. with `npm install -g artillery`), plugins should be installed globally too:

```sh npm2yarn
npm install -g artillery-plugin-example
```

If Artillery is installed locally to a project (i.e. a directory with `package.json` in it), plugins should be installed as a normal dependency:

```sh npm2yarn
npm install -D artillery-plugin-example
```

## Using plugins

Plugins need to be explicitly loaded in the test scripts via `config.plugins`.

For example, to load the functionality provided by `artillery-plugin-example`, add `example` under `config.plugins`:

```yaml
config:
  target: 'https://service-foo.staging.corp.acme.digital'
  plugins:
    expect: {}
```

By convention, Artillery will try to load npm package with the name of `artillery-plugin-example` for that configuration.

In this example, we are not providing any configuration for the `example` plugin, but most plugins will allow for some configuration.
