# server.Server.showHooks

- **Module:** server.Server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L678
- **Page:** https://libtmux.org/en/ts/latest/reference/server-server-showhooks/

```
server.Server.showHooks() -> Promise<ReadonlyMap<string, readonly string[]>>
```

Every global hook tmux currently reports.

A hook is an array of commands, keyed by the name `setHook` takes, so
what was set reads back under the name it was set with. tmux prints each
element as `name[0]`, which composes with neither of the writers.

## Example

```ts
const hooks = await server.showHooks();
hooks.get("session-created")?.[0];
```
