# Silverstripe

`talaria/silverstripe` **3.0.3** supports Silverstripe **4.13+, 5, and 6**. PHP **8.1+**.

## Install

```bash
composer require talaria/silverstripe:^3.0
```

## Initialise

Add to `.env`:

```env
TALARIA_API_KEY="tal_sk_prod_nz1_…"
# TALARIA_BROWSER_API_KEY="tal_pk_prod_nz1_…"
```

```bash
vendor/bin/sake dev/build flush=1
```

Leave `TALARIA_URL` empty on Talaria Cloud. Tracing and analytics follow [project settings](https://docs.newtalaria.com/get-started/project-settings.md).

## Verify

```php
\Talaria\Talaria::captureException(new \RuntimeException('Talaria test error'));
```

Run this once, then open **Issues** in the [dashboard](https://one.newtalaria.com). The test error shows as a new issue in the key's environment. Nothing there? See [fail-safe](https://docs.newtalaria.com/get-started/fail-safe.md).

## SiteHost

`vendor/bin/talaria-sitehost install` reads `talaria/sitehost/monitors.json` and reconciles one crontab block and the supervisord probe. The SiteHost deploy action runs this command and also installs the log collector. Full steps: [SiteHost containers](https://docs.newtalaria.com/guides/collectors/sitehost.md).

## Next

See [configuration](https://docs.newtalaria.com/sdk/silverstripe/configuration.md), [errors](https://docs.newtalaria.com/sdk/silverstripe/errors.md), and [tracing](https://docs.newtalaria.com/sdk/silverstripe/tracing.md).
