scaffold_custom_node
Generate a starter pack for a ComfyUI custom node, including required files, a sample node, and optional frontend and CI workflow for publishing.
Instructions
Generate a new ComfyUI custom-node pack from a template into <COMFYUI_PATH>/custom_nodes//. Writes pyproject.toml (with the [tool.comfy] PublisherId/DisplayName/Icon table the Comfy Registry requires), init.py exporting NODE_CLASS_MAPPINGS / NODE_DISPLAY_NAME_MAPPINGS, and src/nodes.py containing a runnable sample node (INPUT_TYPES/RETURN_TYPES/FUNCTION/CATEGORY), plus .comfyignore and .gitignore. Optionally emits a web/js frontend stub (wiring WEB_DIRECTORY) and a GitHub Actions publish workflow (with_ci). This is the FIRST step of the author loop: scaffold here, then restart_comfyui to load it, test it, and finally publish_custom_node. LOCAL-ONLY: it writes to your local ComfyUI install and requires COMFYUI_PATH (it does nothing for a remote --comfyui-url target). Names must be a safe lowercase slug and cannot escape custom_nodes/; an existing non-empty directory is left untouched unless overwrite is true. Use this to CREATE a pack you author — to install someone else's pack use install_custom_node instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Pack folder name — a safe lowercase slug (letters, digits, hyphens, underscores), e.g. 'my-cool-nodes'. Becomes the directory under custom_nodes/ and the pyproject [project].name. | |
| display_name | Yes | Human-readable name shown in the ComfyUI node menu and the registry listing. | |
| category | No | Node menu category for the sample node (default 'custom'). | |
| description | No | Short description written to pyproject [project].description. | |
| publisher_id | No | Your Comfy Registry publisher id, stamped into [tool.comfy].PublisherId. If omitted a placeholder is written that you must replace before publishing. | |
| with_frontend | No | If true, also generate a web/js/<name>.js extension stub and set WEB_DIRECTORY (default false). | |
| with_ci | No | If true, also generate .github/workflows/publish_action.yml (Comfy-Org/publish-node-action; needs the REGISTRY_ACCESS_TOKEN repo secret) so pushing a pyproject.toml version bump auto-publishes (default false). | |
| overwrite | No | If true, overwrite template files in an existing pack directory instead of refusing (default false). |