API Reference / cli /

uninstall.py

Uninstall Command, remove TuiML's MCP wiring from every detected AI client.

This command is the inverse of tuiml setup. It does NOT remove the tuiml package itself (use uv tool uninstall tuiml or pip uninstall tuiml for that). It only unwires the MCP server entries and the Claude Code skill file that tuiml setup wrote.

Functions

Func

remove_json_entry

Line 53
remove_json_entry(config_path: Path, key: str) -> tuple[bool, str]

Remove the tuiml entry from a JSON config file.

The file is backed up before being rewritten. A missing file, unparseable JSON, or an absent entry is reported rather than raised.

Parameters

config_path
Path
JSON config file to edit.
key
str
Key holding the server map, dotted for nesting, e.g. 'mcp.servers'.

Returns

changed
bool
True if the file was modified.
reason
str
Short human-readable description of what happened.
Func

remove_toml_entry

Line 91
remove_toml_entry(config_path: Path) -> tuple[bool, str]

Strip the [mcp_servers.tuiml] block from a TOML config.

Follows the OpenAI Codex CLI layout. The file is backed up before being rewritten.

Parameters

config_path
Path
TOML config file to edit.

Returns

changed
bool
True if the file was modified.
reason
str
Short human-readable description of what happened.
Func

remove_opencode_entry

Line 127
remove_opencode_entry(config_path: Path) -> tuple[bool, str]

Remove the tuiml entry from OpenCode's opencode.json.

OpenCode nests servers under a top-level "mcp" key rather than "mcpServers", so it needs its own remover.

Parameters

config_path
Path
Path to opencode.json.

Returns

changed
bool
True if the file was modified.
reason
str
Short human-readable description of what happened.
Func

remove_openclaw_entry

Line 148
remove_openclaw_entry(spec: dict) -> tuple[bool, str]

Remove TuiML from OpenClaw, preferring its own CLI.

Uses openclaw mcp remove when the executable is on PATH, and falls back to editing the nested JSON config directly if that command is missing or fails.

Parameters

spec
dict
Client spec, providing config and key.

Returns

changed
bool
True if the client configuration was modified.
reason
str
Short human-readable description of what happened.
Func

remove_skill_dir

Line 185
remove_skill_dir(skills_dir: Path) -> tuple[bool, str]

Delete the installed tuiml skill directory.

Removes /tuiml and everything under it.

Parameters

skills_dir
Path
The agent's skills directory.

Returns

changed
bool
True if the directory was deleted.
reason
str
Short human-readable description of what happened.
Func

print_yaml_instructions

Line 209
print_yaml_instructions(spec: dict) -> tuple[bool, str]

Print the manual removal step for YAML-config clients (Goose and similar).

YAML configs are not edited automatically, to avoid destroying comments and formatting.

Parameters

spec
dict
Client spec, providing config.

Returns

changed
bool
Always False; nothing is written.
reason
str
Note explaining that this is a manual step.
Func

unconfigure

Line 231
unconfigure(spec: dict) -> tuple[bool, str]

Remove TuiML's wiring from one client, dispatching on the spec's kind.

Parameters

spec
dict
Client spec from tuiml.cli.setup.client_specs.

Returns

changed
bool
True if the client configuration was modified.
reason
str
Short human-readable description of what happened.
Func

prompt_mode

Line 267
prompt_mode(default: str='auto') -> str

Ask whether to unwire every client at once or one by one.

Parameters

default
str = "auto"
Choice used when the user just presses Enter.

Returns

mode
{"auto", "manual", "quit"}
The selected mode.
Command

tuiml uninstall

Line 305
tuiml uninstall [OPTIONS]

Remove TuiML from your AI agents, undoing tuiml setup.

Scans every supported client, and for each one that currently has a tuiml MCP entry or skill file, removes it. Every known client is checked rather than only the detected ones, so stale entries left behind by an uninstalled client are cleaned up too. Each config file is backed up before being modified.

This command does not uninstall the tuiml Python package itself; it prints the right command to finish that job.

Run the interactive wizard:

bash
$ tuiml uninstall

Unwire every client without prompting:

bash
$ tuiml uninstall --yes

Unwire only specific clients:

bash
$ tuiml uninstall --client claude-code --client cursor

Then remove the package itself, using whichever installer you used:

bash
$ uv tool uninstall tuiml
bash
$ pip uninstall tuiml

Options

--yes, -y
flag
Auto mode: unwire every client without prompting.
--manual
flag
Manual mode: ask before unwiring each client, skipping the Auto/Manual menu.
--client
repeatable
Unwire only this client, by ID. Repeatable. Run 'tuiml setup --list' to see valid IDs.