{"id":19695419,"url":"https://github.com/tanis2000/comfy-client","last_synced_at":"2026-05-15T02:33:34.940Z","repository":{"id":243103985,"uuid":"811483852","full_name":"tanis2000/comfy-client","owner":"tanis2000","description":"ComfyUI client library written in Go","archived":false,"fork":false,"pushed_at":"2024-06-07T19:14:33.000Z","size":102,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T09:33:52.412Z","etag":null,"topics":["api","api-client","api-client-go","comfyui","go","golang","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanis2000.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-06-06T17:24:52.000Z","updated_at":"2024-10-19T02:44:42.000Z","dependencies_parsed_at":"2024-06-07T20:30:31.143Z","dependency_job_id":null,"html_url":"https://github.com/tanis2000/comfy-client","commit_stats":null,"previous_names":["tanis2000/comfy-client"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanis2000%2Fcomfy-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanis2000%2Fcomfy-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanis2000%2Fcomfy-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanis2000%2Fcomfy-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanis2000","download_url":"https://codeload.github.com/tanis2000/comfy-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241005769,"owners_count":19892860,"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","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":["api","api-client","api-client-go","comfyui","go","golang","stable-diffusion"],"created_at":"2024-11-11T19:27:47.554Z","updated_at":"2026-05-15T02:33:34.896Z","avatar_url":"https://github.com/tanis2000.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ComfyUI Go client library\n\ncomfy-client is a REST/WS client library for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) written in Go.\n\nThe aim is to provide an easy way to interface with the REST and WebSocket based API offered by ComfyUI.\n\nThis is still in early development. Contributions are welcome.\n\n# Basic usage\n\n```go\npackage main\n\nimport (\n    \"encoding/json\"\n    \"fmt\"\n    \"github.com/tanis2000/comfy-client/client\"\n    \"github.com/tanis2000/comfy-client/graph\"\n    \"github.com/tanis2000/comfy-client/workflow\"\n    \"io\"\n    \"log\"\n    \"os\"\n)\n\nfunc main() {\n    callbacks := \u0026client.Callbacks{\n        OnStatus: func(c *client.Client, queuedItems int) {\n            log.Printf(\"Queue size: %d\", queuedItems)\n        },\n    }\n    c, err := client.NewClient(\"localhost\", 8188, callbacks)\n    if err != nil {\n        panic(err)\n    }\n\n    println(\"Loading JSON workflow API\")\n    f, err := os.Open(\"examples/txt2img/txt2img_api.json\")\n    if err != nil {\n        panic(err)\n    }\n    content, err := io.ReadAll(f)\n    if err != nil {\n        panic(err)\n    }\n    err = f.Close()\n    if err != nil {\n        panic(err)\n    }\n    println(\"Building workflow from workflow api\")\n    w, err := workflow.NewWorkflow(string(content))\n    if err != nil {\n        panic(err)\n    }\n\n    println(\"Enqueueing a prompt\")\n    res, err := c.QueuePrompt(-1, w)\n    if err != nil {\n        panic(err)\n    }\n    println(res)\n\n    println(\"Starting the message loop\")\n    for continueLoop := true; continueLoop; {\n        msg := \u003c-res.Messages\n        println(msg)\n    }\n\n}\n```\n\nExamples of how to use this library can be found in [examples](examples)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanis2000%2Fcomfy-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanis2000%2Fcomfy-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanis2000%2Fcomfy-client/lists"}