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

weather-ct

v1.0.1

Published

终端查天气(支持中国天气网和和风天气)

Readme

waether-cli

天气预报cli工具(支持中国天气网和和风天气)

该版本可以视为和风天气的升级版本,引入了中国天气网的源,支持最长7天的天气预报(和风免费用户最多支持3天),并且中国天气网不需要引入开发者key,查询的次数都不限制,这些方面都是优于和风的。不过和风提供的数据类型更多,比如支持能见度,中国天气网不支持。

安装

npm install -g weather-ct

参数说明

--source / -s : 选择源(1:中国天气网,2:和风天气),默认是1
--city / -c : 选择目标城市(如果选择了地区可以忽略)
--area / -a : 选择目标地区(如果选择了城市可以忽略)
--opt  / -o : 选择查询的模式,目前有now(今天的天气情况),forecast(未来天气情况).如果选择了1的源,请忽略now选项.如果选择了2的源,默认是now
--lang / -l : 语言,默认为中文,可忽略。如果选择了1的源,请忽略
--key  / -k : 开发者key,如果在config.json中已经填了可忽略此选项。如果选择了1的源,请忽略。

注意事项

在最开始使用和风源的时候,需要在命令行中加入key配置,它只需要配置一次,后续可以省略key 中国天气网输入的地址需要是汉语拼音,和风支持中文汉字 下面的模式无法使用:

$ waethercli -a huadu

请使用:

$ waethercli -c guangzhou(待查询地区的辖区)

demo

中国天气网(1)

$ waethercli -c guangzhou
$ waethercli -c guangzhou -o forecast
$ waethercli -a huadu -o forecast

和风天气(2)

$ waethercli -c guangzhou
$ waethercli -c guangzhou -o forecast
$ waethercli -a huadu
$ waethercli -a huadu -o forecast

补充

两个源都还没有测试过外国和港澳台 中国天气网的的源有两个,一个可以靠位置的拼音来查询,另外一个只能靠位置的编码来查询,并且在部分地区的命名上也没有统一的标准,有些区直接划为了市,有些区把“区”的称号取消了,让人很难受。所以可能在输入部分地区后会有bug