estevecastells/domscan-cli
GitHub: estevecastells/domscan-cli
DomScan CLI 是一款基于 Node.js 的命令行工具,用于便捷地调用 DomScan 域名情报 API 进行域名可用性检查、健康度评估和数据批量查询。
Stars: 0 | Forks: 0
# DomScan CLI
[DomScan API](https://domscan.net) 的官方命令行客户端。
需要 Node.js 18.18 或更高版本。
## 安装
```
npm install -g https://github.com/estevecastells/domscan-cli/releases/latest/download/domscan-cli.tgz
```
运行相同的命令进行升级,然后确认已安装的版本:
```
domscan --version
```
## 快速开始
```
# 显示来自实时 OpenAPI spec 的所有 API operations
domscan list
# 目标为本地 DomScan server
domscan --local get-open-api-spec
# 调用经过认证的 API operation
export DOMSCAN_API_KEY=dsk_your_key_here
domscan check-domain-availability --name acme --tlds com,io
# 使用通用 fallback caller
domscan call /v1/status --query name=acme --query tlds=com,io
```
## Base URL 选择
- 默认:`https://domscan.net`
- 本地:`--local` -> `http://127.0.0.1:8787`
- 自定义:`--base-url https://staging.example.com`
你也可以设置 `DOMSCAN_BASE_URL`。
## 认证
对于需要认证的 endpoint,请提供以下任意一种:
```
domscan --api-key dsk_your_key_here get-domain-health --domain example.com
```
或:
```
export DOMSCAN_API_KEY=dsk_your_key_here
domscan get-domain-health --domain example.com
```
## 常用命令
```
domscan help
domscan list --search ssl
domscan docs get-domain-health
domscan get-tld-detail --tld io
domscan call /v1/prices/bulk --method POST --body '{"tlds":["com","io"]}'
```
## 输出
默认情况下,JSON 响应会针对终端进行格式化。使用 `--compact` 输出单行 JSON,或使用 `--raw` 原样打印响应主体。
将成功的响应(包括 CSV 批量下载)直接保存到文件:
```
domscan get-api-batch-results \
--job-id job_123 \
--format csv \
--output results.csv
```
现有文件会受到保护。仅在你打算替换输出文件时才添加 `--force`。
## 资源
- [API 文档](https://domscan.net/docs)
- [CLI 版本发布](https://github.com/estevecastells/domscan-cli/releases)
- [问题](https://github.com/estevecastells/domscan-cli/issues)
标签:API客户端, GNU通用公共许可证, Homebrew安装, MITM代理, Node.js, 域名智能, 域名查询, 文档结构分析, 暗色界面, 自动化攻击