Javascript api Client for ComfyUI that supports both NodeJS and Browser environments.
This client provides comprehensive support for all available RESTful and WebSocket APIs, with built-in TypeScript typings for enhanced development experience. Additionally, it introduces a programmable workflow interface, making it easy to create and manage workflows in a human-readable format.
- ⭐ client: This is the main readme which contains very detailed instructions and examples
- cli
- cw-reader
- transpiler
- ⭐ Online Transpiler: Online convert workflow to code.
- Environment Compatibility: Seamlessly functions in both NodeJS and Browser environments.
- Comprehensive API Support: Provides full support for all available RESTful and WebSocket APIs.
- TypeScript Typings: Comes with built-in TypeScript support for type safety and better development experience.
- Programmable Workflows: Introduces a human-readable and highly customizable workflow interface inspired by this issue and this library.
- Ease of Use: Both implementation and usage are designed to be intuitive and user-friendly.
- Zero Dependencies: This library is designed to minimize the introduction of external dependencies and is currently dependency-free.
This library has been refactored from a single-package structure into a monorepo, now containing the following packages to support various development scenarios:
Package | Description | Location |
---|---|---|
@stable-canvas/comfyui-client |
Core client library for interacting with ComfyUI via REST and WebSocket APIs. | packages/client |
@stable-canvas/comfyui-client-cli |
CLI tool that converts ComfyUI workflows into JavaScript code. Ideal for scripting and automation. | packages/client-cli |
@stable-canvas/cw-reader |
read workflow(comfyui) info from image/json | packages/cw-reader |
@stable-canvas/comfyui-client-transpiler |
Low-level transpiler used by the CLI. Contains AST parsing and code generation logic. | packages/transpiler |
Each package includes its own README for usage and development details.
MIT