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

@wwkit/freetoken

v1.0.13

Published

Free LLM API token manager — speed test, proxy, and web dashboard (Vue 3 + Express)

Readme

@wwkit/freetoken

Free LLM API token 管理工具,前后端分离 Web 架构。监控和管理免费 LLM API tokens,提供测速和代理功能。

快速开始

# 从 monorepo 根目录(自动检测模式 + 打开浏览器)
pnpm --filter freetoken start

# 或直接 CLI
freetoken web              # 启动 + 打开浏览器
freetoken web --dev        # 强制开发模式(Vite + server)
freetoken web stop         # 停止
freetoken web restart      # 重启 + 打开浏览器
  • 前端:http://localhost:7905(Vite,自动代理 /api 到后端)
  • 后端:http://localhost:5905(Express + SQLite)

命令列表

| 命令 | 说明 | |------|------| | web [start] [--dev\|--prod] | 启动服务并打开浏览器(start 可省略) | | web stop | 停止所有服务 | | web restart [--dev\|--prod] | 重启服务并打开浏览器 | | status | 查看服务状态 | | speed-test | 手动执行测速 | | config | 查看当前配置 | | help / -h / --help | 显示帮助 |

完整命令说明见 cli.md

配置

配置文件:~/.config/freetoken/config.json5(JSON5 格式,首次安装自动生成)

{
  server: { port: 5905 },
  client: { port: 7905 },
  speedTest: { cron: '0 9 * * *', runOnStart: true },
  web: { openBrowser: true },
}
  • 内置默认:src/config.json5
  • 用户配置:~/.config/freetoken/config.json5(深合并覆盖内置)
  • 环境注入:FREETOKEN_CONFIG_CONTENT(JSON5 字符串,优先级最高)
  • 目录覆盖:FREETOKEN_CONFIG_DIR
  • API Keys:通过 server/.env(dotenv),不写入 config

工程结构

packages/freetoken/
├── package.json          # @wwkit/freetoken monorepo 配置
├── src/                   # 配置层(config.json5 + config.js)
├── bin/                   # CLI 入口(web start/stop/restart/speed-test/config)
├── scripts/               # postinstall + 打包脚本
├── client/               # 前端 Vue 3 + Vite + Element Plus
│   ├── vite.config.js    # Vite 配置 + API 代理到 :5905
│   └── src/
├── server/               # 后端 Express + sql.js (SQLite)
│   ├── src/
│   │   ├── index.js      # Express 入口
│   │   ├── config/       # 测速目标配置
│   │   ├── lib/          # 测速引擎、调度器、数据库
│   │   └── routes/       # API 路由(proxy/speed/admin)
│   └── .env.example
└── tests/                # jest 单元测试

构建

pnpm --filter freetoken build   # 构建前端到 client/dist
freetoken web --prod            # 生产模式启动

测试

pnpm --filter freetoken run ut

技术栈

| 层 | 选型 | |----|------| | 后端 | Express + sql.js (SQLite) + node-cron | | 前端 | Vue 3 + Vue Router + Pinia + Element Plus | | 构建 | Vite | | 配置 | @wwkit/shared createConfigLoader (JSON5) | | 项目管理 | pnpm workspaces (@wwkit) |