# Comfy Workflows Code-first TypeScript SDK and `cwf` CLI for ComfyUI. Author graphs in TypeScript (or import JSON), compile them through Graph IR with the official compiler, and run them on ComfyUI. Unofficial project. Not affiliated with or endorsed by Comfy Org. Core package: @stepupgaming/comfy-workflows@0.2.16 Human docs: https://stepupgaming.github.io/comfy-workflows/ Skills (in the installed package): skills/comfy-workflows/SKILL.md ยท skills/comfy-custom-nodes/SKILL.md Repo instructions (contributors): https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/AGENTS.md ## Critical rules - TypeScript (`ir.build.ts` / `workflow.ts`) is the normal authored surface. - Graph IR is the canonical semantic representation. Do not hand-edit generated `workflow.ir.json` or Comfy API JSON. - Use generated typed nodes from `/object_info` (`cwf codegen`) for known custom nodes. - `rawNode` is an escape hatch, not the default custom-node API. - Non-Node applications must not implement another Graph IR compiler. Bind `{$param}` at runtime. - GitHub Release + GitHub Packages are canonical distribution. npmjs is an optional convenience mirror. - `inspect` / `init` / `run` never install Python. Only explicit `cwf setup` does, after a printed plan. Do not run `setup --yes` without user intent. - Seeds use bigint / `{"$int":"..."}`. Do not round integers past 2^53 through JS `Number`. Prefer these raw Markdown URLs over scraping rendered HTML. Installed-package skills should use the matching git tag `v0.2.16` (see skill `references/_links.md`). The live site index below tracks `main`. ## Start - [What is it](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/start/what-is.md) - [Choose your path](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/start/choose-your-path.md) - [What do I edit?](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/start/what-do-i-edit.md) - [Install](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/start/install.md) ## Build workflows as code - [Quickstart](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/quickstart.md) - [Codegen](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/codegen.md) - [Graph](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/build-a-graph.md) - [Parameters](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/parameters.md) - [Connections](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/connections.md) - [Composition](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/composition.md) - [Recipes](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/recipes.md) ## Existing workflows - [Import](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/migrate/import.md) - [Parameterize](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/parameters.md) - [Package](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/migrate/package.md) ## Product integration - [Architecture](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/architecture.md) - [Build-time vs runtime](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/build-time-vs-runtime.md) - [No second compiler](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/concepts/no-second-compiler.md) - [Multiple environments](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/environments.md) - [CI](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/ci.md) ## Custom nodes - [Custom nodes](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/guide/custom-nodes.md) - [Setup / security](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/security.md) - [Escape hatches](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/code/escape-hatches.md) ## Reference - [API](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/reference/api/index.md) - [CLI](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/reference/cli.md) - [Errors](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/reference/errors.md) - [Graph IR](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/concepts/graph-ir.md) - [Manifest](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/reference/manifest.md) - [Distribution](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/product/distribution.md) - [Coding agents](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/docs/guide/agents.md) ## Machine files - [llms.txt](https://stepupgaming.github.io/comfy-workflows/llms.txt) - [llms-full.txt](https://stepupgaming.github.io/comfy-workflows/llms-full.txt) - [agent-index.json](https://stepupgaming.github.io/comfy-workflows/agent-index.json) - [Skill](https://raw.githubusercontent.com/stepupgaming/comfy-workflows/main/skills/comfy-workflows/SKILL.md)