<a id="ref-workshopctl-cli"></a>

# workshopctl (CLI)

<!-- @artefact workshopctl -->
<!-- @artefact SDK hook -->

SDKs use the **workshopctl** tool when reporting to the workshop;
to invoke a subcommand, add it to your [SDK hook](https://ubuntu.com/workshop/docs//reference/sdks.md#ref-sdk-hooks).

## workshopctl set-health

Report the health of the SDK.

### Usage

```console
$ workshopctl set-health [--code=<ERROR CODE>] <STATUS> [<MESSAGE>]
```

### Description

<!-- @artefact check-health -->

This command is essential for the `check-health` hook
that runs after launch or refresh operations in a workshop.
The arguments are as follows:

| Placeholder   | Required                                                                       | Value                                                        |
|---------------|--------------------------------------------------------------------------------|--------------------------------------------------------------|
| `<STATUS>`    | Required                                                                       | Can be `okay`, `waiting` or `error`.                         |
| `<MESSAGE>`   | Required when `<STATUS>` is `waiting` or `error`;<br/>not allowed with `okay`. | Arbitrary string explaining the status;<br/>7–70 characters. |

### Examples

Report an error with a code and a message;
note only the message is quoted:

```console
$ workshopctl set-health --code=missing-cuda error "CUDA libraries not found"
```

### Flags

## See also

Explanation:

- [workshopctl (CLI)](https://ubuntu.com/workshop/docs//explanation/sdks/workshopctl-cli.md#exp-workshopctl-cli)

Reference:

- [SDK hooks](https://ubuntu.com/workshop/docs//reference/sdks.md#ref-sdk-hooks)
- [workshop (CLI)](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-cli)
