6 releases (3 breaking)

new 0.4.1 Oct 28, 2024
0.4.0 Oct 23, 2024
0.3.0 Oct 21, 2024
0.2.0 Oct 16, 2024
0.1.1 Oct 16, 2024

#139 in WebSocket

Download history 210/week @ 2024-10-10 366/week @ 2024-10-17 185/week @ 2024-10-24

761 downloads per month
Used in 2 crates

MIT license

23KB
540 lines

cmfy

Build Crates.io Docs.rs Crates.io Crates.io

A CLI companion app for Comfy UI

Usage

cmfy provides several commands:

Usage: cmfy [OPTIONS] <COMMAND>

Commands:
  stats     Displays basic statistics about client and server
  history   Manipulates history of prompts
  queue     Manipulates the queue of pending prompts
  list      List all prompts from history and queue
  cancel    Cancel currently running prompt
  clear     Clear all prompts from history, queue and currently running prompt
  open      Open ComfyUI in a web browser
  capture   Capture running and pending prompt to file
  submit    Submits a batch of prompts to the server
  view      Open images from completed prompts in a browser
  get       Display GET request raw json output
  listen    Opens a websocket connection to the server, listens for messages and displays them as JSON on the console
  extract   Extracts prompt information from a PNG generated with Comfy UI, and outputs it as JSON
  monitor   Monitors the progress on ongoing prompts
  download  Download images from completed prompts locally
  help      Print this message or the help of the given subcommand(s)

Options:
  -s, --hostname <HOSTNAME>    hostname of the server [env: COMFY_HOSTNAME=172.24.80.1] [default: localhost]
  -p, --port <PORT>            port of the server [env: COMFY_PORT=] [default: 8188]
  -c, --client-id <CLIENT_ID>  client id advertised to the server, allows to spoof an existing client when listening to websocket message. If none is provided, a unique id will be computed [env:
 COMFY_CLIENT_ID=]
  -h, --help                   Print help
  -V, --version                Print version

Installation

From crates.io

From source

  • Install rust as per these instructions
  • Clone the repo:
    git clone https://github.com/meuter/cmfy
    
  • Install cmfy:
    cd cmfy
    cargo install --path .
    

From Github Release

  • Download the prebuilt binaries from the release page.

Dependencies

~16–34MB
~581K SLoC