# Build annotations

The annotations are generated using Markdown styling. Some use cases include:

- Detailed test results for custom tools.
- Emphasizing warnings or error messages.
- Security and vulnerability scan reports.
- Static analysis reports.
- Links to deployed artifacts.

## Annotating a build

To use annotations:

1. Add a Step capable of running custom commands.

   For example, **Script** or **fastlane**.
1. Add a command to install the Bitrise Annotations plugin:

   ```bash
   bitrise plugin install https://github.com/bitrise-io/bitrise-plugins-annotations.git
   ```
1. Use the `annotate` command of the plugin to create your annotations.

   The command works in the following format: `bitrise :annotations annotate [markdown] [flags]`. This is a basic Markdown annotation in the default style:

   ```bash
   bitrise :annotations annotate "**My Annotation**"
   ```

## Styling and formatting your annotations

Build annotations are a snippet of Markdown. The basic style of the snippet is determined by the `--style` flag of the annotation command. The possible values are:

- `info` (the default style)
- `success`
- `warning`
- `error`

The annotations accept Markdown syntax. In addition to simple formatting, it also supports code blocks, using the ~ character or four-space indentation:

```bash
bitrise :annotations annotate "
~~~
This is a codeblock
~~~ 
"

bitrise :annotations annotate "
    This is also a codeblock
"
```

You can add expandable elements to your annotations:

![annotations-expand.gif](/img/_paligo/uuid-b72c807f-04d5-72e5-9c85-670efa9bb40a.gif)

- Place your content in a details tag to collapse it by default.
- If you want the card to be open by default, use details open.
- Use a summary tag to let users know what is inside the section.
- You can include headers, images, code blocks, and more inside a collapsed section.

```yaml
<details>

<summary>Example summary</summary>

### You can add a header

You can add text within a collapsed section.

You can add an image or a code block, too.

</details>
```
