用途:通过 goplaces CLI 查询 Google Places API(New),完成地点搜索、地址解析、地点详情与评论获取,适合人工查看地点信息或以 JSON 接入脚本。
安装:brew install steipete/tap/goplaces
配置:必须设置 GOOGLE_PLACES_API_KEY。可选 GOOGLE_PLACES_BASE_URL,用于测试或代理。
常用命令: 搜索:goplaces search "coffee" --open-now --min-rating 4 --limit 5 位置偏好:goplaces search "pizza" --lat 40.8 --lng -73.9 --radius-m 3000 分页:goplaces search "pizza" --page-token "NEXT_PAGE_TOKEN" 解析:goplaces resolve "Soho, London" --limit 5 详情:goplaces details <place_id> --reviews JSON:goplaces search "sushi" --json
说明与限制:默认输出人类可读文本,--json 供脚本使用。--no-color 或 NO_COLOR 可禁用 ANSI 颜色。价格等级为 0..4(免费到非常昂贵)。类型过滤只发送第一个 --type 值,因为 API 只接受一个。需自行准备 Google Places API 密钥;其余关于计费、配额、平台支持与返回字段的细节暂未提供。