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

twparking

v0.2.0

Published

CLI 查台北/新北/基隆/桃園/台中 即時停車格剩餘量

Readme

twparking

CLI 查台北 / 新北 / 基隆 / 桃園 / 台中 五個城市的即時停車格剩餘量。

Install

pnpm add -g twparking
# 或一次性執行
pnpm dlx twparking search 信義

需要 Node.js ≥ 20。

Usage

twparking search <關鍵字> [--city 台北|新北|基隆|桃園|台中] [--json]
twparking add <城市>:<停車場ID或名稱>
twparking list [--json]
twparking remove <城市>:<停車場ID>
twparking refresh [--city <城市>]
twparking watch [--interval 60] [<城市>:<停車場ID> ...]

範例

# 找含「信義」的停車場(跨五城)
twparking search 信義

# 加進 favourites(傳精確 ID)
twparking add 台北:TPE0334

# 也可以傳名稱、CLI 會找對應 ID
twparking add 台北:信義公務中心

# 列出 favourites
twparking list

# 開始 watch(預設每 60 秒重整一次畫面、Ctrl+C 結束)
twparking watch

# 不用 favourites、暫時指定要看哪幾個
twparking watch --interval 30 台北:TPE0334 新北:010001

Watch 畫面

twparking · 2026-05-13 21:43:11 · refresh every 60s · Ctrl+C to stop

城市  停車場            剩餘 / 總數  更新時間  狀態
台北  信義公務中心      12 / 250     21:42:38
台北  101 購物中心       3 / 1843    21:42:40  ⚠ 將滿
桃園  中路停車場        ─            ─         ✗ fetch error: timeout

剩餘 ≤ 10 會顯示 ⚠ 將滿;單城 API 掛了那幾行顯示 ✗、其他城市正常更新。

資料來源

各城市官方 open data:

| 城市 | catalog | availability | |---|---|---| | 台北 | tcgbusfs.blob.core.windows.net/blobtcmsv/TCMSV_alldesc.json | TCMSV_allavailable.json | | 新北 | data.ntpc.gov.tw/api/datasets/B1464EF0-…/json | data.ntpc.gov.tw/api/datasets/E09B35A5-…/json | | 基隆 | e-traffic.klcg.gov.tw/KeelungTraffic/pages/park.jsp/(HTML scraping) | 同左 | | 桃園 | opendata.tycg.gov.tw/api/dataset/f4cc0b12-…/resource/0381e141-…/download | 同左 | | 台中 | motoretag.taichung.gov.tw/DataAPI/api/ParkingSpotListAPIV2 | 同左 |

停車場目錄會快取到 ~/.cache/twparking/lots-<城市>.json,預設 7 天 TTL。Favourites 存在 ~/.config/twparking/favourites.json,尊重 XDG_CONFIG_HOME / XDG_CACHE_HOME

Develop

pnpm install
pnpm dev search 信義         # tsx 跑原始碼
pnpm test                    # vitest
pnpm typecheck
pnpm build                   # dist/cli.js
node dist/cli.js --help

License

MIT