url-health-check-cli
v1.1.0
Published
批量检查URL状态码的CLI工具,支持并发请求
Maintainers
Readme
url-health-check-cli
批量检查URL状态码的CLI工具,支持并发请求。
安装
npm install -g url-health-check-cli用法
检查多个URL
url-health https://example.com https://httpbin.org/status/404从文件读取URL
创建 urls.txt,每行一个URL:
https://example.com
https://httpbin.org/status/200
https://httpbin.org/status/500然后运行:
url-health -f urls.txt自定义并发数和超时
url-health -f urls.txt --concurrency 10 --timeout 5
# 或缩写
url-health -f urls.txt -c 10 -t 5输出示例
📊 结果汇总 (共 3 个URL)
✅ 正常: 2
❌ 异常: 1
✅ 200 https://example.com
✅ 200 https://httpbin.org/status/200
❌ 500 https://httpbin.org/status/500选项
| 选项 | 缩写 | 默认值 | 说明 |
|------|------|--------|------|
| --concurrency | -c | 5 | 并发请求数 |
| --timeout | -t | 10 | 单请求超时(秒) |
| --file | -f | — | 从文件读取URL列表 |
| --help | -h | — | 显示帮助 |
许可证
MIT
