tmuxp debug-info - tmuxp.cli.debug_info¶
CLI for tmuxp debug-info subcommand.
- class tmuxp.cli.debug_info.CLIDebugInfoNamespace(**kwargs)[source]¶
Bases:
NamespaceTyped
argparse.Namespacefor tmuxp debug-info command.- color: CLIColorModeLiteral¶
- output_json: bool¶
- tmuxp.cli.debug_info.create_debug_info_subparser(parser)[source]¶
Augment
argparse.ArgumentParserwithdebug-infosubcommand.- Return type:
- tmuxp.cli.debug_info._private(path)[source]¶
Privacy-mask a path by collapsing home directory to ~.
- Return type:
- Parameters:
path (pathlib.Path | str | None) – Path to mask.
- Returns:
Path with home directory replaced by ~.
- Return type:
Examples
>>> _private(None) '' >>> _private('') '' >>> _private('/usr/bin/tmux') '/usr/bin/tmux'
- tmuxp.cli.debug_info._collect_debug_info()[source]¶
Collect debug information as a structured dictionary.
All paths are privacy-masked using PrivatePath (home → ~).
- Return type:
- Returns:
Debug information with environment, versions, paths, and tmux state.
- Return type:
Examples
>>> data = _collect_debug_info() >>> 'environment' in data True >>> 'tmux_version' in data True
- tmuxp.cli.debug_info._format_human_output(data, colors)[source]¶
Format debug info as human-readable colored output.
- Return type:
- Parameters:
- Returns:
Formatted human-readable output.
- Return type:
Examples
>>> from tmuxp.cli._colors import ColorMode, Colors >>> colors = Colors(ColorMode.NEVER) >>> data = { ... "environment": { ... "dist": "Linux", ... "arch": "x86_64", ... "uname": ["Linux", "host", "6.0"], ... "version": "#1 SMP", ... }, ... "python_version": "3.12.0", ... "system_path": "/usr/bin", ... "tmux_version": "3.4", ... "libtmux_version": "0.40.0", ... "tmuxp_version": "1.50.0", ... "tmux_path": "/usr/bin/tmux", ... "tmuxp_path": "~/tmuxp", ... "shell": "/bin/bash", ... "tmux": { ... "sessions": [], ... "windows": [], ... "panes": [], ... "global_options": [], ... "window_options": [], ... }, ... } >>> output = _format_human_output(data, colors) >>> "environment" in output True