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

loomgen

v0.4.9

Published

loom CLI — multi-modal generation without API keys

Readme

loom CLI

一条命令搞定视频生成、图片生成、LLM 对话。支持平台模式和 BYOK(自带 key)。

完整功能全景与总体用户历程见 LOOM_GUIDE.md

最近更新(2026-08-19)

  • loom whoami 现在会先刷新 JWT,再读取实时余额;与 loom balance 保持一致。
  • loom billing history 修复字段解析和日期过滤,输出支付金额、入账 quota、入账人民币。
  • loom update --check 改为读取 package.json 当前版本,不再硬编码旧版本。
  • 网页“模型价格”已放入侧边栏,与“概览 / 数据看板”同级;已登录用户打开定价页会保持带侧边栏的 Dashboard 风格。
  • 修复 CLI 登录在“网页已登录”时一直等待的问题:现在打开授权链接会自动完成设备审批。
  • 后端 S256 PKCE 校验改为标准 base64url 实现。
  • 已跑通命令:
    • 文本:loom chat "写一段关于春天的小短文"
    • 视频:loom gen video --async "一只金色的猫在夕阳下的屋顶上行走,电影感光影"

安装

npm install -g loomgen

使用

登录(平台模式)

loom login
# 浏览器 → 邮箱验证码 → Approve → 终端自动拿到 JWT

LLM 对话

# 平台模式(扣 credits)
loom chat "用一句话解释量子计算"
loom chat --message "user: 推荐三本书" --message "assistant: ..." --message "user: 为什么"
loom chat "写诗" --system "你是诗人" --temperature 0.7
echo "总结这段话" | loom chat

# BYOK 模式(用自己的 key,不扣 credits)
loom chat "hello" --api-key sk-xxx --base-url https://api.openai.com
loom chat "hello" --api-key sk-xxx --base-url https://api.openai.com -m gpt-4o

视频生成

loom gen video --async "金色阳光洒在湖面上"
loom gen video "夕阳下的海浪" --output-path output.mp4
loom gen video "prompt" --dry-run

账户管理

loom billing balance              # 余额
loom billing history              # 流水记录
loom billing history --from 2026-07-01 --to 2026-07-29
loom billing topup 20             # 充值(mock)
loom balance                      # 余额别名

BYOK Profile 管理

# 创建 BYOK profile
loom config add-byok my-openai --api-key sk-xxx --base-url https://api.openai.com

# 切换到 BYOK
loom config use my-openai

# 之后所有 chat 命令自动走你的 key,不扣 credits
loom chat "hello"

# 切回平台模式
loom config use default

任务管理

loom gen status <task_id>
loom gen list [--status SUCCESS] [-n 20]
loom gen download <task_id> -o video.mp4
loom model list [--type chat|video]

配置与更新

loom config list / show / use / set / get
loom update --check               # 检查新版本
loom update                       # 自动升级

全局 Flag

| Flag | 作用 | |------|------| | --output json | 标准 JSON 输出 | | -q, --quiet | 抑制提示文本 | | --verbose | HTTP 细节 | | --timeout <ms> | 超时 |

Exit Code

| Code | 含义 | |------|------| | 0 | 成功 | | 1 | 通用错误 | | 2 | 认证失败 | | 3 | 参数错误 | | 4 | 配额不足 | | 5 | 上游失败 |

网页 Dashboard

浏览器打开 http://121.43.135.83/ 可访问网页版管理界面(邮箱登录)。

服务器

| 路径 | 内容 | |------|------| | /opt/loom/fistapi/ | 后端源码 | | /opt/loom/loomgen/ | CLI 源码 | | /opt/loom/docker-compose.yml | 部署配置 | | /opt/loom/.env | 密钥配置(不进 git) |

ssh [email protected]
cd /opt/loom && docker compose ps    # 状态
docker compose logs -f               # 日志