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

@olduvai-jp/comine-san

v1.0.1

Published

run comfy-ui on the command line

Readme

Comine San

Comine San は ComfyUI でエクスポートした workflow_api.json を読み込み、CLI からワークフローを実行する TypeScript 製ツールです。

特徴

  • ワークフロー内の入力/出力ノードを解析し、--<ノードタイトル>.<入力名> 形式の CLI オプションを自動生成
  • 指定した ComfyUI サーバーに対して POST /prompt を発行し、WebSocket で進行状況を監視
  • SaveImage / ShowText / Show Any to JSON などの出力をファイル保存と JSON で集約

必要環境

  • Node.js 18 以上(fetch API を利用)
  • Yarn もしくは npm
  • 実行中の ComfyUI サーバー(デフォルトは http://127.0.0.1:8188

セットアップ

yarn install

使い方

  1. ComfyUI から対象フローを workflow_api.json としてエクスポートする。
  2. ComfyUI サーバーを起動する(例: python main.py --listen 0.0.0.0 --port 8188)。
  3. 下記のように --help を実行し、利用可能なオプションを確認する。
yarn start ./path/to/workflow_api.json --help

Result types として、取得できる出力ノードとフィールド型が末尾に表示されます。

  1. 必要なオプションを確認したら、実際の実行コマンドを組み立てて実行する。
yarn start ./path/to/workflow_api.json \
  --output-json ./results/output.json \
  --server http://127.0.0.1:8188 \
  --Prompt_Text.string "test prompt" \
  --SaveImage.filename output/result.png
  • 第 1 引数: ワークフロー JSON のパス
  • --output-json: 実行結果を保存する JSON のパス(省略時は metadata.json が作成される)
  • --server: ComfyUI のベース URL(省略時は http://127.0.0.1:8188
  • その他のオプションは、ComfyUI 上で設定したノードタイトル(英数字・_- に正規化)と入力キーを組み合わせた形式で自動生成される

例: ComfyUI のノードタイトルが Prompt Text、入力キーが string の場合、CLI オプションは --Prompt_Text.string になります。

実行結果

  • 画像出力ノード (SaveImage) は指定したパスに画像ファイルを保存します。
  • テキスト出力ノード (ShowText|pysssss, Show any to JSON [Crystools]) は JSON の text フィールドに格納されます。
  • CLI の --output-json オプションで指定した JSON ファイルには、各出力ノードの結果が連想配列形式でまとめられます。

対応ノード

  • Input Primitive string multiline [Crystools](文字列のプロンプトなど)
  • Input Primitive integer [Crystools](シード値などの整数入力)
  • Input Primitive float [Crystools](ガイダンススケールなどの小数入力)
  • Input ETN_LoadImageBase64(ファイルパス/既存の Base64 文字列から画像を読込)
  • Output SaveImage(画像をファイルに保存しパスを返却)
  • Output SaveAnimatedWEBP(アニメーションWebPをファイルに保存しパスを返却)
  • Output Show any to JSON [Crystools](任意の値を JSON テキストとして取得)
  • Output ShowText|pysssss(テキスト出力を改行付き文字列として取得)

ドキュメント

  • CLI の詳細な利用手順は docs/cli-guide.md(ドラフト)を参照してください。
  • ライブラリ API の使い方は docs/library-guide.md(ドラフト)で概要をまとめています。

ライブラリ利用のヒント

// CommonJS
const { ComfyUiWorkflow } = require('@olduvai-jp/comine-san');

// ES Modules (tree-shakeable)
import { ComfyUiWorkflow } from '@olduvai-jp/comine-san';

// サブパス例
import { ComfyAPIClient } from '@olduvai-jp/comine-san/lib';
import { PrimitiveStringCrystools } from '@olduvai-jp/comine-san/nodes/input/primitiveString';
  • CLI 実行ロジックに直接アクセスする場合は @olduvai-jp/comine-san/cli を import してください(npx 利用時は不要)。
  • exports フィールド経由で CJS/ESM のいずれにも最適化された dist/cjs / dist/esm を提供しているため、バンドラー経由で未使用のエントリーポイント(例: @olduvai-jp/comine-san/cli)を除去できます。

開発メモ

  • 型チェック: yarn type-check
  • ビルド: yarn builddist/cjsdist/esm を生成)
  • CI: .github/workflows/ci.yml で Node.js 20 上の yarn type-check / yarn build を実行
  • ノード固有の実装は workflow/nodes/ 配下にまとまっています。必要に応じて新しい Input / Output ノードクラスを追加してください。