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

@zongzi1993/popcorn-cli

v0.1.0

Published

Popcorn CLI - 通过 API Key 提交生图任务

Readme

popcorn-cli

Popcorn 的命令行客户端(Node.js),通过 API Key 调用后端服务,按任务类型提交任务、查询模型清单和任务状态。

快速开始

# 1. 安装依赖
npm install

# 2. 全局链接(可选,方便直接使用 `popcorn-cli` 命令)
npm link

# 3. 配置 API Key
popcorn-cli config set-key <YOUR_API_KEY>

# 4. 查看某类型下可用的模型(含使用限制和入参 schema)
popcorn-cli image models

# 5. 按 params_schema 构造 JSON 并提交任务
popcorn-cli image submit -p '{"model":"sd-xl-v1","prompt":"a cat"}'

未执行 npm link 时,可用 node bin/popcorn-cli.js 替代 popcorn-cli 命令。

命令一览

| 命令 | 说明 | |------|------| | popcorn-cli config show / set-key | 管理本地配置(~/.popcorn-cli/config.json) | | popcorn-cli image submit / models | 生图任务:提交 / 查询可用模型 | | popcorn-cli video submit / models | 生视频任务:提交 / 查询可用模型 | | popcorn-cli task list --sid / --tid | 按会话 ID 或任务 ID 查询任务列表 |

所有子命令都支持 --help 查看参数详情。

研发调试后门

CLI 默认指向生产环境 https://mangaforge.svcs.n1q.cn,普通用户无需关心。 研发 / 测试如需临时把 CLI 指向别的环境(QA、本地起的后端等),可用:

popcorn-cli config set-url <BASE_URL>
# 例如切到 QA:
popcorn-cli config set-url https://mangaforge-qa.apps.n1q.cn
# 切到本地后端:
popcorn-cli config set-url http://localhost:8000
# 恢复默认(生产):删掉本地配置里的 baseUrl 字段即可

注意:该命令是研发后门,Agent / 生产环境使用不应触碰。它未在 SKILL.md 中暴露。

文档索引

本仓库包含三份文档,用途各不相同:

| 文档 | 目标读者 | 内容 | |------|----------|------| | README.md(本文) | 所有人 | 项目介绍、快速开始、命令一览 | | popcorn-cli-installation-guide.md | Agent / 自动化脚本 | 在目标机器上安装 @zongzi1993/popcorn-cli 并把 popcorn-cli 命令装好的可执行步骤 | | SKILL.md | Agent | 已安装 CLI 后如何调用其能力(配置、任务提交、模型查询、任务状态查询等) |