"playwright --version","scrapy"=>"scrapy version","nuclei"=>"nuclei -version","docker"=>"docker --version","python3"=>"python3 --version","php"=>"php -v | head -1","node"=>"node -v","git"=>"git --version","curl"=>"curl --version | head -1","psql"=>"psql --version","nginx"=>"nginx -v 2>&1","ollama"=>"curl -sf http://127.0.0.1:11434/api/tags | python3 -c \"import json,sys;print(len(json.load(sys.stdin)['models']),'models')\""]; foreach ($checks as $name => $cmd) { $out = trim(shell_exec("$cmd 2>/dev/null") ?? ""); $tools[$name] = $out ? ["status"=>"installed","version"=>substr($out,0,50)] : ["status"=>"missing"]; } echo json_encode(["tools"=>$tools,"installed"=>count(array_filter($tools,function($t){return $t["status"]==="installed";})),"total"=>count($tools)], JSON_UNESCAPED_UNICODE);