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

@yang0/jimeng-cli

v0.1.0

Published

API-first CLI for Jimeng image and video generation workflows.

Readme

jimeng-cli

English README

一个以 API 为主的即梦 CLI,用于图片/视频生成、积分查询、模型查看和结果下载。

功能

  • 从 Netscape 格式的 cookie 文件加载登录态。
  • 直接调用即梦 HTTP API 提交图片和视频生成任务。
  • 在下载结果时自动等待任务完成。
  • 查询当前积分余额。
  • 查看当前 CLI 支持的图片/视频模型别名。

安装

本地开发

npm install

全局安装

npm install -g @yang0/jimeng-cli
jimeng --help

快速开始

# 验证 cookie 是否可用
jimeng auth check --cookie-file "G:\cookies\jimeng.txt"

# 查看积分余额
jimeng credit --cookie-file "G:\cookies\jimeng.txt"

# 查看当前支持的模型
jimeng models

# 只提交图片任务,不等待
jimeng image generate "一只霓虹狐狸,赛博朋克风格" --cookie-file "G:\cookies\jimeng.txt"

# 提交图片任务并下载结果
jimeng image generate "一只霓虹狐狸,赛博朋克风格" --download --cookie-file "G:\cookies\jimeng.txt"

# 提交视频任务并下载结果
jimeng video generate "赛博朋克城市上空掠过一艘发光飞船" --download --cookie-file "G:\cookies\jimeng.txt"

# 查看历史任务
jimeng history list --limit 10 --cookie-file "G:\cookies\jimeng.txt"

使用说明

  • --download 的含义是:提交任务、等待完成,然后自动下载结果。
  • cookie 需要是 Netscape 格式文件,例如 G:\cookies\jimeng.txt
  • 默认图片生成走的是逆向得到的即梦网页接口链路,不是官方公开 API。
  • 按当前真实联调结果,默认图片路径与网页侧 5.0 Lite 行为一致,且没有观察到积分减少。
  • models 输出的是 CLI 维护的 API 别名;即梦网页返回的实际模型展示名仍可能显示为 5.0 Lite
  • 浏览器工具只用于调试网页请求变化,正式 CLI 运行路径仍然是纯代码。

命令说明

  • auth check:验证 cookie 文件对应的即梦登录态。
  • credit:输出赠送积分、购买积分、VIP 积分和总积分。
  • models:列出当前 CLI 支持的图片/视频模型别名。
  • image generate:提交图片生成任务。
  • video generate:提交视频生成任务。
  • task get / task wait:查看已有任务状态或等待任务完成。
  • history list:读取已有生成历史。
  • download:解析并下载已有任务的输出结果。

打包说明

  • npm 可执行入口指向 dist/cli.js
  • 执行 npm pack / npm publish 时会先触发 prepack 自动构建。
  • 最终 tarball 只包含构建产物和 README 文档,不会带上源码测试目录。

浏览器调试兜底

主实现路径仍然是 API-first。只有当即梦网页请求结构发生变化、需要补抓包时,才使用下面这个 Chrome profile:

G:\chrome_data\remote_debug

这个 profile 只用于 DevTools 核对和 payload 恢复,不作为 CLI 的主执行方式。