{"id":20135620,"url":"https://github.com/karurochori/comfyui-bun-client","last_synced_at":"2025-10-09T05:07:05.121Z","repository":{"id":249708194,"uuid":"831270490","full_name":"KaruroChori/comfyui-bun-client","owner":"KaruroChori","description":"A comfyui typescript client for the bun runtime","archived":false,"fork":false,"pushed_at":"2025-05-17T13:45:28.000Z","size":3356,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T14:36:29.424Z","etag":null,"topics":["bun","codegen","comfyui","rest-api","typescript"],"latest_commit_sha":null,"homepage":"https://karurochori.github.io/comfyui-bun-client/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaruroChori.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-20T05:11:39.000Z","updated_at":"2025-05-17T13:43:49.000Z","dependencies_parsed_at":"2025-04-09T17:51:23.747Z","dependency_job_id":null,"html_url":"https://github.com/KaruroChori/comfyui-bun-client","commit_stats":null,"previous_names":["karurochori/comfyui-bun-client"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/KaruroChori/comfyui-bun-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaruroChori%2Fcomfyui-bun-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaruroChori%2Fcomfyui-bun-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaruroChori%2Fcomfyui-bun-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaruroChori%2Fcomfyui-bun-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaruroChori","download_url":"https://codeload.github.com/KaruroChori/comfyui-bun-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaruroChori%2Fcomfyui-bun-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000743,"owners_count":26082933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","codegen","comfyui","rest-api","typescript"],"created_at":"2024-11-13T21:15:48.992Z","updated_at":"2025-10-09T05:07:05.100Z","avatar_url":"https://github.com/KaruroChori.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ComfyUI client for bun\n\n\u003e [!IMPORTANT]  \n\u003e This library is specifically designed to work with typescript and the [bun](https://bun.sh/) runtime.  \n\u003e Porting it to other runtimes is mostly trivial, however there is no plan for that right now.  \n\u003e No JS distribution is provided, as features like the **workflow builder** intrinsically rely on Typescript.\n\nThis library offers several tools to create custom clients for [comfyui](https://github.com/comfyanonymous/ComfyUI).  \nIt is specifically designed for headless operations and automation. It features:\n\n- A mostly 1-to-1 wrapper for all the REST endpoints defined by ComfyUI.\n- An abstraction for **jobs** with customizable callbacks over their lifetime.\n- Utilities to simplify deployments, assets used for generation and the artifact collection.\n- A workflow builder, to generate new workflows directly in typescript with hints and static type checking.\n- A code generator that allows to take normal ComfyUI workflows and convert them into ts code.\n\n## Quick start\n\nTo use `comfyui-bun-client` you just need to add it to your `package.json`.  \nMake sure you are selecting the latest version available as this readme file might be outdated:\n\n```sh\nbun add git+ssh://github.com/KaruroChori/comfyui-bun-client.git#v0.2.15\n```\n\nThere is no plan to distribute this package via `npm`. Any version which might pop up there is not endorsed.\n\n### Minimal example\n\nThis example shows how to connect to your ComfyUI backend in debug mode, and ask for the system stats to be provided:\n\n```ts\nimport {ComfyClient} from \"comfyui-bun-client\"\n{\n    //Variable with a scope-contrained lifetime\n    using client = new ComfyClient(process.env.COMFY ?? 'localhost:8188', { debug: true })\n    console.log(await client.system_stats())\n}\n```\n\nThere is a small set of examples provided as part of this repository in `./examples/` to explore any more advanced usage.\n\n### CLI tools\n\n\u003e [!IMPORTANT]  \n\u003e Implementation just added in v0.2.9. Please report bugs!\n\nThis library also ships with a small CLI to perform some operations which are not related to its runtime usage:\n\n- Generate types from a ComfyUI instance\n- Generate the code by reading the workflow information embedded in the metadata of an image.\n\nFor further information about their usage check [here](./docs/cli.md).\n\n### Define a custom workflow in TS\n\nWorkflows can be directly written in typescript!  \nType hints are supported and `tsc` can be used to statically check if your custom workflow is (likely) sound.  \n[Check here](./docs/custom-workflows.md) for the relevant documentation \u0026 examples.\n\nUnlike the main UI based on [litegraph](https://github.com/jagenjo/litegraph.js) which uses groups to organize complex workflows, as it is just TS code you can freely structure components as functions or classes.  \nYou might even be able to bind some react-like library and write workflows as `jsx` files, but I have not explored this option.\n\nI plan on having a small collection of workflows as part of this package in `./workflows`.  \nFeel free to send submissions, but please check the [README](./workflows/README.md) first.\n\n### Run a full sequence of jobs\n\n[Check here](./docs/run-jobs.md).\n\n## Information for developers\n\nIf you want to contribute to this project, or you need more details about the implementation, I wrote some notes [here](./docs/developers.md).\n\n## Milestones\n\nYou can find information about what is expected in future releases [here](./TODO.md).  \nPlease, keep in mind those plans are subject to change at any point in time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarurochori%2Fcomfyui-bun-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarurochori%2Fcomfyui-bun-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarurochori%2Fcomfyui-bun-client/lists"}