INNER CODE UNIT · Python
_analyze_cli
AgentSkillOS/SkillAnything · scripts/analyze_target.py:106
def _analyze_cli(target: str, verbose: bool = False) -> dict:
"""Run ``<tool> --help`` and parse the output."""
raw_help = ""
for flag in ("--help", "-h", "help"):
try:
result = subprocess.run(
[target, flag],
capture_output=True,
text=True,
timeout=15,
)
raw_help = result.stdout or result.stderr
if raw_help.strip():
break
except (subprocess.TimeoutExpired, FileNotFoundError, OSError):
continue
if not raw_help.strip():