Setup Command - Interactive wizard to connect TuiML to AI agents.
Functions
Print a dimmed informational line.
Parameters
msg
Print a green check-marked success line.
Parameters
msg
Print a yellow warning line.
Parameters
msg
Print a red error line.
Parameters
msg
Print a bold section heading preceded by a blank line.
Parameters
title
Ask the user a yes/no question, unless answering has been pre-empted.
Parameters
prompt
default
assume_yes
Returns
answer
assume_yes is set.
Return the spec for every AI client TuiML knows how to wire up.
Returns
specs
id, name, detect, and kind keys, plus config, key, or skills_dir depending on the kind.
Return the specs of clients that appear to be installed.
detect path exists, if its detect_glob pattern matches a versioned install directory, or if its detect_command is on PATH.Returns
detected
client_specs found on this machine.
Copy a file alongside itself with a timestamped .bak suffix.
Parameters
path
Returns
backup
path did not exist.
Write an MCP server entry into a JSON config file.
Parameters
config_path
key
'mcp.servers'.
server_name
command
entry
command, for clients that require them, e.g. VS Code's {"type": "stdio"}.
Returns
changed
reason
Register TuiML with OpenClaw, preferring its own CLI.
openclaw mcp set when the executable is on PATH, and falls back to editing the JSON config directly if that command is missing or fails.Parameters
spec
config and key.
Returns
changed
reason
Write an MCP entry into OpenCode's opencode.json.
"mcp" key with the shape {"mcp": {"": {"type": "local", "command": [""], "enabled": true}}} . The file is backed up before being rewritten.Parameters
config_path
opencode.json.
server_name
command
Returns
changed
reason
Append an [mcp_servers.<name>] section to a TOML config.
Parameters
config_path
server_name
command
Returns
changed
reason
Copy the bundled skill (SKILL.md plus its reference and workflow files) into a coding agent's skills directory.
/tuiml/ . An existing SKILL.md with different contents is backed up before being overwritten; other files are overwritten in place.Parameters
skills_dir
Returns
changed
reason
Print the YAML snippet the user must add by hand (Goose and similar).
Parameters
spec
config.
Returns
changed
reason
Print client-specific setup instructions without editing any config.
Parameters
spec
instructions.
Returns
changed
reason
Wire TuiML into one client, dispatching on the spec's kind.
Parameters
spec
client_specs.
Returns
changed
reason
Return the path this client's wiring will be written to, for display.
Parameters
spec
client_specs.
Returns
target
Map user-supplied --client slugs onto canonical spec IDs.
Parameters
clients
Returns
resolved
unknown
Ask whether to configure all detected clients at once or one by one.
Parameters
default
Returns
mode
Connect TuiML to your AI agents.
Detects installed clients and wires them up: appends an MCP server entry for MCP clients, copies the SKILL.md file for skill-based agents, or prints manual instructions for YAML and unsupported configs. Every config file is backed up before it is modified, and re-running is safe: a client that is already wired correctly is left alone.
By default the wizard asks whether to configure every detected client at once (Auto) or one by one (Manual). Pass -y / --yes to skip the menu and go straight to Auto, or --manual to go straight to Manual. Undo everything with tuiml uninstall.
Run the interactive wizard:
$ tuiml setup
See which clients are detected, without changing anything:
$ tuiml setup --list
Wire up every detected client without prompting:
$ tuiml setup --yes
Configure only specific clients:
$ tuiml setup --client claude-code --client cursor
Options
--yes, -y
--manual
--list
--client