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

@tscomfy/cli

v0.3.0

Published

The tscomfy command: generate types from a ComfyUI server, check them for drift, and transpile API prompts and UI workflows to code.

Readme

@tscomfy/cli

npm

The tscomfy command. It generates the types @tscomfy/core builds workflows with from your ComfyUI server, tells you when they are out of date, and turns workflows saved in ComfyUI into typed code. It only sends GET requests; it never queues anything.

npm install @tscomfy/core
npm install --save-dev @tscomfy/cli

Runs on Node 24 or later and Bun 1.4 or later.

| Command | What it does | |---|---| | tscomfy generate --url <server> --out <dir> | Writes types for every node, model and sampler the server has | | tscomfy check --url <server> --out <dir> | Exits 1 when the server, or the generated files, changed since generate | | tscomfy transpile --workflow <file> --schema <dir> | Writes a saved workflow, or with --prompt an "Export (API)" file, as typed code |

tscomfy help <command> lists every option. Exit codes: 0 for success, 1 for a failure or drift, 2 for a usage error.

generate

npx tscomfy generate --url http://127.0.0.1:8188 --out src/comfy/local

| File | What | |---|---| | nodes.ts | The Nodes interface: a function per node class, combo options as literal unions | | index.ts | export const local: the schema workflow takes, typed by Nodes | | object_info.json | The server's response, for check and for regenerating offline with --from | | tscomfy.json | The manifest check and transpile read |

The constant is named after the directory; --name picks another. index.ts imports ./nodes.js, as tsc and bundlers expect; --import-extension .ts makes it ./nodes.ts, to run the sources with Node or Bun without a build. The files hold your model names and change with what the server has installed, so most projects gitignore them and regenerate.

check

npx tscomfy check --url http://127.0.0.1:8188 --out src/comfy/local

Prints what changed (nodes, inputs, combo options, outputs) and the generate command that updates the files. It also fails when a generated file was edited or comes from another tscomfy version. Files uploaded to the server, such as LoadImage's images, don't count as drift.

transpile

npx tscomfy transpile --workflow portrait.json --schema src/comfy/local --out src/portrait.ts

The module exports the workflow, built with your generated types; exporting it with toApi gives back the prompt the frontend queues for the file. A node the types can't express is written as raw(…), so the module always compiles. --no-inline gives every node a variable.

From code

run(args, io) runs the CLI in-process and resolves to the exit code; systemIo() is the real file system, network and console.

import { run, systemIo } from "@tscomfy/cli";

const code = await run(["check", "--url", "http://127.0.0.1:8188", "--out", "src/comfy/local"], systemIo());

To generate or transpile without files, use @tscomfy/codegen.

Documentation

The CLI reference has every option. See also getting started and importing and transpiling.

License

MIT