一站式域名查询与购买
简介
通过 Vercel CLI 一站式查询域名可用性、比价并直接购买管理域名,开发者域名注册利器
原始描述
Check domain availability via Vercel and buy/manage domains via Vercel CLI
通过你的 Agent 添加
安装目录:domain-check/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Domain Check & Buy 是一套基于 Vercel 生态的域名管理工具,整合域名可用性查询、实时比价、一键购买及后续管理功能。核心工作流分为三步:
- 批量可用性查询:执行
domain-check myproject自动检测目标名称在常见 TLD(.com/.io/.dev/.ai 等)的注册状态与价格,直观展示 ✅/❌ 状态及年付/续费价格 - 交互式购买:通过
npx vercel domains buy <domain>触发 Vercel CLI 的交互式购买流程,确认价格后完成支付(需pty: true支持交互) - 全生命周期管理:支持域名列表查看 (
list)、详情检查 (inspect)、项目绑定 (add)、跨团队转移 (move)、外部转入 (transfer-in) 等操作
底层调用 Vercel Registrar API /v1/registrar/domains/{domain}/price,通过 purchasePrice 字段判断可用性(null=已注册,数字=可购买价格)。支持个人账号与团队账号自动切换,Token 从本地 CLI 配置读取。
显著优点
- 生态整合度高:查询-购买-部署-管理全链路在 Vercel 平台完成,无需切换多个服务商
- 开发者体验友好:命令行原生支持,输出格式清晰,支持批量 TLD 比价
- 实时价格透明:直接展示 Vercel 官方 registrar 价格,无隐藏费用
- API 可脚本化:提供裸 curl 示例,便于 CI/CD 或自动化脚本集成
- 团队协作出众:自动识别 team ID,支持跨团队域名转移
潜在缺点与局限性
- 供应商锁定:域名必须托管于 Vercel Registrar,无法直接查询其他注册商价格
- CLI 依赖重:核心购买流程强制交互式确认,纯自动化场景受限(虽可通过 API 绕过)
- TLD 覆盖有限:价格表仅列出常见 TLD,小众国别域名可能不支持
- 成本偏高:.io ($46)、.ai ($140) 等热门后缀价格高于部分第三方注册商
- 地域限制:Vercel Registrar 服务受限于其运营区域,部分国家/地区用户可能无法使用
适合人群
- 已使用 Vercel 托管项目的全栈开发者
- 追求「命令行即一切」工作流的技术团队
- 需要快速验证品牌域名可用性的初创企业
- 希望减少域名管理账户复杂度的个人开发者
常规风险
- 误操作购买:CLI 交互确认环节若配合
pty: true在自动化脚本中使用,存在意外确认导致非预期扣费风险 - Token 泄露:脚本中硬编码
VERCEL_TOKEN或读取本地 auth.json 存在凭证泄露风险,建议配合环境变量与权限最小化 - 续费价格波动:标注价格为「约价」,实际续费可能调整,需关注 Vercel 政策变更
- API 变更:Vercel 已 sunset v4 端点,未来 registrar API 仍可能迭代,需关注官方文档更新
技能正文
name: domain-check description: Check domain availability via Vercel and buy/manage domains via Vercel CLI
Domain Check & Buy (Vercel)
Check domain availability, pricing, and purchase — all via Vercel.
Quick Reference
# Check availability + pricing for a name across TLDs
domain-check myproject
# Check specific TLDs
domain-check myproject com,io,dev,app,ai
# Buy a domain (interactive — needs pty:true)
npx vercel domains buy mydomain.com
# List your owned domains
npx vercel domains list
# Inspect a domain you own
npx vercel domains inspect mydomain.com
# Add domain to a Vercel project
npx vercel domains add mydomain.com my-project
# Transfer a domain into Vercel
npx vercel domains transfer-in mydomain.com
How It Works
Availability Check (domain-check)
Uses the Vercel Registrar API (/v1/registrar/domains/{domain}/price):
purchasePrice: null→ domain is takenpurchasePrice: <number>→ domain is available at that price
$ domain-check myproject
Checking: myproject
-----------------------------------------------------------
DOMAIN STATUS BUY PRICE RENEWAL
-----------------------------------------------------------
myproject.com ❌ Taken - $11.25
myproject.io ✅ Available $46.00 $46.00
myproject.dev ✅ Available $13.00 $13.00
-----------------------------------------------------------
Prices from Vercel Registrar
Buying (npx vercel domains buy)
Interactive command — requires pty: true when calling from exec.
# Example exec call
exec(command: "npx vercel domains buy myproject.dev", pty: true, timeout: 30)
The CLI will show price and ask for confirmation before charging.
API Direct (for scripts)
VERCEL_TOKEN=$(jq -r '.token' ~/.local/share/com.vercel.cli/auth.json)
TEAM=$(jq -r '.currentTeam // empty' ~/.local/share/com.vercel.cli/config.json)
TEAM_PARAM="${TEAM:+?teamId=$TEAM}"
# Check price/availability
curl -s "https://api.vercel.com/v1/registrar/domains/example.com/price${TEAM_PARAM}" \
-H "Authorization: Bearer $VERCEL_TOKEN"
# Returns: { "years": 1, "purchasePrice": 11.25, "renewalPrice": 11.25, "transferPrice": 11.25 }
# purchasePrice: null = taken, number = available
# Buy via API
curl -s -X POST "https://api.vercel.com/v1/registrar/domains${TEAM_PARAM}" \
-H "Authorization: Bearer $VERCEL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "example.com"}'
Vercel CLI Domain Commands
| Command | Description |
|---|---|
npx vercel domains list |
Show all domains |
npx vercel domains inspect <domain> |
Domain info (owned domains only) |
npx vercel domains buy <domain> |
Purchase (interactive) |
npx vercel domains add <domain> <project> |
Add to Vercel project |
npx vercel domains move <domain> <dest> |
Transfer to another team |
npx vercel domains transfer-in <domain> |
Transfer in to Vercel |
npx vercel domains remove <domain> |
Remove from team |
Typical TLD Pricing (Vercel)
| TLD | ~Price/yr |
|---|---|
| .com | $11.25 |
| .dev | $13 |
| .app | $15 |
| .co | $27 |
| .io | $46 |
| .ai | $140 |
| .org | $9.99 |
| .net | $13.50 |
| .xyz | $13 |
Auth
Requires Vercel CLI authentication (npx vercel login). Token is read from ~/.local/share/com.vercel.cli/auth.json.
Team ID is auto-detected from Vercel CLI config, or set VERCEL_TEAM_ID env var to override. If neither is set, the personal account is used.
Notes
- Vercel registrar API replaced the old v4 domains/price endpoint (sunsetted Nov 2025)
domains inspectonly works for domains you own — use the price API for availability.aidomains are expensive ($140/yr) across all registrars- When buying via CLI, use
pty: truefor the interactive confirmation prompt
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。