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

aihub-desktop

v1.1.1

Published

TeamSync AI Gateway desktop usage monitor — floating widget showing month-to-date usage against quota.

Readme

TeamSync AI Desktop

桌面版使用量監控工具,透過 Magic Link 登入後顯示 /portal/api/usage/series 數據。

最快上手

npx aihub-desktop

第一次執行會自動下載 Electron runtime(~100MB,放在 npm cache),之後啟動約 1 秒內。

或全域安裝後直接執行:

npm install -g aihub-desktop
aihub-desktop

開發模式(clone repo 改 code)

# 安裝依賴
npm install

# 開發模式執行
npm start

# 打包成安裝檔(.exe / .dmg / AppImage)
npm run dist        # 會產生 dist/ 資料夾

檔案結構

aihub-desktop/
├── package.json
├── bin/
│   └── aihub-desktop.js   # npx 入口(spawn electron)
└── src/
    ├── main.js               # Electron 主程序(IPC、session、fetch)
    ├── preload.js            # 安全橋接(contextBridge)
    ├── index.html            # 登入 UI
    ├── widget.html           # 浮動 widget UI
    └── assets/icon.png       # 應用圖示

登入流程

  1. 輸入 email → 打 POST /portal/api/auth/send
  2. 去信箱點 magic link
  3. App 每 2 秒 polling checkSession 直到登入成功
  4. 自動跳轉儀表板

注意事項

  • main.js 裡的 PORTAL_ORIGIN 設為 https://ai.teamsync.com.tw,可視需要修改
  • Session cookie 存在 Electron 預設 session,關掉 app 後仍保留(下次不需重新登入)
  • 如果 GET /portal/api/auth/me 端點不存在,checkSession 會永遠回傳 loggedIn: false → 可改成 polling fetchUsage 看是否 200 來判斷