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

# workshopctl (CLI)

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

**workshopctl** is a small in-workshop utility that
[SDK hooks](https://ubuntu.com/workshop/docs//explanation/sdks/concepts.md#exp-sdk-hooks) invoke to report SDK state
back to the **Workshop** daemon over a restricted socket.
It runs inside a running workshop, not on the host,
and is not intended for end users to call directly.

There is one category of commands:

| Actions           | Commands       | What they do                                                                                                                                                             |
|-------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Report SDK health | **set-health** | Let the daemon know whether the SDK is `okay`,<br/>`waiting`, or in an `error` state,<br/>with an optional machine-readable error code<br/>and a human-readable message. |

#### NOTE
**workshopctl** only works from an SDK hook context,
where the daemon supplies a context cookie via the
`WORKSHOP_COOKIE` environment variable.
Running it from an interactive shell returns
`cannot invoke workshopctl operation commands ... from outside of a workshop`.

## See also

Explanation:

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

Reference:

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

Tutorial:

- [Get started with workshops](https://ubuntu.com/workshop/docs//tutorial/part-1-get-started.md#tut-get-started)
