https://github.com/comfy-org/cookiecutter-comfy-extension
A cookiecutter template for writing a ComfyUI custom node extension
https://github.com/comfy-org/cookiecutter-comfy-extension
Last synced: 8 months ago
JSON representation
A cookiecutter template for writing a ComfyUI custom node extension
- Host: GitHub
- URL: https://github.com/comfy-org/cookiecutter-comfy-extension
- Owner: Comfy-Org
- License: other
- Created: 2024-06-07T18:39:43.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-08T02:34:16.000Z (about 1 year ago)
- Last Synced: 2025-06-08T03:42:09.901Z (about 1 year ago)
- Language: Python
- Size: 120 KB
- Stars: 24
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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`:
```bash
# 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:
```bash
# 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
git init
```
- Run `cookiecutter` with this as local template:
```bash
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