A cookiecutter template for writing a ComfyUI custom node extension
Find a file
2026-03-29 20:07:48 -04:00
.github gross bugs fixed, cookiecutter now runs to completion 2024-06-11 23:16:56 -04:00
hooks Merge pull request #11 from christian-byrne/feat/add-node-help-docs-scaffold 2026-03-29 20:07:48 -04:00
tests initial commit 2024-06-07 14:35:11 -04:00
{{cookiecutter.project_slug}} Merge pull request #11 from christian-byrne/feat/add-node-help-docs-scaffold 2026-03-29 20:07:48 -04:00
.editorconfig initial commit 2024-06-07 14:35:11 -04:00
.gitignore Add vscode settings json for types. 2024-12-30 18:54:37 -08:00
.gitmodules add vue template 2025-08-09 21:59:19 -04:00
cookiecutter.json add vue template 2025-08-09 21:59:19 -04:00
LICENSE fix text of outer project license 2024-06-21 06:17:00 -04:00
pyproject.toml Fix License format. 2024-12-28 11:35:10 -08:00
README.md readme 2025-06-06 21:45:31 -04:00

cookiecutter-comfy-extension

Get started writing custom nodes in one step without setting up a ton of Python project config.

An opinionated way to develop ComfyUI custom nodes. Uses cookiecutter to scaffold a python project.

This template helps you

Usage

  • First install cookiecutter:

    # pipx is strongly recommended
    pipx install cookiecutter
    
    # if pipx is not an option, you can install cookiecutter in your Python user directory.
    python -m pip install --user cookiecutter
    
  • Run cookiecutter with this template:

    # if you installed cookiecutter with pipx
    pipx run cookiecutter gh:comfy-org/cookiecutter-comfy-extension
    
    # if you installed cookiecutter with pip
    cookiecutter gh:comfy-org/cookiecutter-comfy-extension
    
    # initialize git repo in your new project
    cd <your-project-name>
    git init
    
  • Run cookiecutter with this as local template:

    git clone https://github.com/Comfy-Org/cookiecutter-comfy-extension
    cd cookiecutter-comfy-extension
    git submodule update --init --recursive
    cookiecutter .
    

Features

The resulting ComfyUI node extension project will automatically come with a few neat features:

  • Support for Ruff linter and various recommended rules
  • A pre-commit hook for the Ruff linter
  • An optional web directory if your extension will include custom javascript
    • If selected, web will also be added to the project's MANIFEST.in to ensure that any non-python code in web will also be correctly installed
  • Testing via PyTest (check the tests/ directory)
  • A Github Action that will automatically run any unit tests as part of Pull Requests made against your project
  • A Github Action to diff your changes for backwards incompatible changes: (node-diff)[https://github.com/Comfy-Org/node-diff]
  • A Github Action to publish to the Comfy Registry