npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tencent-map/lbs-skills

v0.0.8

Published

腾讯地图位置服务命令行工具,支持 POI 搜索、地理编码、周边搜索、路径规划、旅游规划、轨迹可视化等功能

Readme

@tencent-map/lbs-skills

腾讯地图位置服务命令行工具,支持 POI 搜索、地理编码、周边搜索、路径规划、旅游规划、轨迹可视化等功能。

安装

npm install -g @tencent-map/lbs-skills

快速开始

设置 API Key

# 方式一:命令行设置(持久化到 ~/.tmap-lbs/config.json)
tmap-lbs config set-key YOUR_KEY

# 方式二:环境变量(当前会话有效)
export TMAP_WEBSERVICE_KEY=YOUR_KEY

获取 Key:https://lbs.qq.com/dev/console/application/mine

查看帮助

tmap-lbs --help
tmap-lbs <command> --help

命令列表

config — 管理 API Key

tmap-lbs config set-key <key>    # 保存 Key
tmap-lbs config get-key          # 查看当前 Key
tmap-lbs config remove-key       # 删除 Key
tmap-lbs config path             # 显示配置文件路径

search — POI 搜索

# 城市关键词搜索
tmap-lbs search --keywords 肯德基 --city 北京

# 周边坐标搜索
tmap-lbs search --keywords 酒店 --location 116.397,39.909 --radius 1000

# 带分类筛选
tmap-lbs search --keywords 餐厅 --city 上海 --types 餐饮

# 输出完整 JSON
tmap-lbs search --keywords 肯德基 --city 北京 --raw

geocode — 地理编码

tmap-lbs geocode --address 西直门
tmap-lbs geocode --address 北京天安门

nearby — 周边搜索(生成可视化链接)

生成腾讯地图周边搜索可视化链接,点击即可在地图上查看结果:

tmap-lbs nearby --location 西直门 --keywords 美食
tmap-lbs nearby --location 北京南站 --keywords 酒店
tmap-lbs nearby --keyword 天坛餐厅

如需获取结构化 POI 数据,使用 search + geocode 组合:

tmap-lbs geocode --address 西直门
tmap-lbs search --keywords 美食 --location 116.353,39.939 --radius 1000

route — 路径规划

支持出行方式:walk(步行)、drive(驾车)、cycle(骑行)、ecycle(电动车)、transit(公交)

# 步行
tmap-lbs route --mode walk --origin 116.397,39.909 --destination 116.427,39.903

# 驾车(带策略)
tmap-lbs route --mode drive --origin 116.397,39.909 --destination 116.427,39.903 --policy LEAST_TIME

# 驾车(带途经点和车牌号)
tmap-lbs route --mode drive --origin 116.397,39.909 --destination 116.427,39.903 \
  --waypoints "116.41,39.91;116.42,39.92" --plate-number 京A12345

# 公交
tmap-lbs route --mode transit --origin 116.397,39.909 --destination 116.427,39.903 --policy LEAST_TRANSFER

travel — 旅游规划(生成可视化链接)

自动地理编码获取景点坐标,生成旅游规划可视化链接:

tmap-lbs travel --city 北京 --interests 故宫,颐和园,香山
tmap-lbs travel --city 杭州 --interests 西湖,灵隐寺,龙井茶 --recommend restaurant

trail — 轨迹可视化(生成可视化链接)

tmap-lbs trail --data https://mapapi.qq.com/web/claw/trail.json

编程接口

也可以作为 Node.js 模块在代码中使用:

const { searchPOI, geocode, walkRoute } = require('@tencent-map/lbs-skills');

// 搜索
const result = await searchPOI({ keywords: '肯德基', city: '北京' });

// 地理编码
const geo = await geocode({ address: '西直门' });

// 路线规划
const route = await walkRoute({
  origin: '116.397,39.909',
  destination: '116.427,39.903',
});

坐标格式

所有命令中的坐标参数统一使用 "经度,纬度" 格式(经度在前),工具内部会自动转换为腾讯地图 API 所需的 "纬度,经度" 格式。

License

MIT