All docs
Context·
property
Context.ui
the ui surface for notify, show, confirm, open_panel
Python
ui: UI
Returns UI — the UI surface, or None when headless
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 · viewer · Context
Guides: Commands & actions
By LSD Team · Last updated Jul 18, 2026
Ask on Discord
View as Markdown