API Reference / cli /

restart.py

tuiml restart: kill every running tuiml-mcp; clients respawn it.

Most useful right after tuiml update to pick up the new code without manually quitting each AI client. The process discovery and signalling live in tuiml.agent.tools.system.restart; this module is only the CLI front end.

Functions

Command

tuiml restart

Line 19
tuiml restart [OPTIONS]

Restart every running tuiml-mcp process.

Each AI client (Claude Desktop, Cursor, Codex, ...) automatically respawns its tuiml-mcp child when the previous one exits, so stopping the servers is all it takes to pick up a freshly installed version. Every instance gets a SIGTERM, then a SIGKILL if it is still alive after the grace period, and the stopped process ids are reported. Nothing is restarted eagerly: the clients spawn a new server on their next request.

Use tuiml status first to see what is running.

Pick up a new version straight after upgrading:

bash
$ tuiml update && tuiml restart

Give slow servers longer to shut down cleanly:

bash
$ tuiml restart --grace 5

Restart from a script and inspect what was stopped:

bash
$ tuiml restart --json

Options

--json
flag
Emit raw JSON instead of human-readable output.
--grace
float = 2.0
Seconds to wait for SIGTERM before sending SIGKILL.