# Context.ui
URL: https://lsd.tools/docs/api-context-ui
Updated: 2026-07-18

## Example

```python
@tool.command("demo/hello")
def hello(ctx: Context):
    if ctx.ui:
        ctx.ui.notify("Imported 1,024 rows")
```

## Notes

Exposes `ctx.ui.notify(...)`, `ctx.ui.show(...)`, `ctx.ui.confirm(...)`, and `ctx.ui.open_panel(...)`.
It is `None` when running **headless** — always guard before calling.

## See also

**API:** [UI overview](/docs/ui-overview) · [viewer](/docs/api-context-viewer) · [Context](/docs/api-context)

**Guides:** [Commands & actions](/docs/tools-commands-actions)
