Let's grow with ComfyUI community -- The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
  • TypeScript 89.8%
  • HTML 7.4%
  • Rust 1.3%
  • Shell 0.9%
  • CSS 0.4%
  • Other 0.2%
Find a file
Christian Byrne 6b2156a6d3
Merge pull request #217 from Comfy-Org/chore/retire-frontend-release-notification
chore(tasks): retire frontend release Slack notification task
2026-10-03 02:06:43 -07:00
.bot feat(bot): ComfyPR-Bot improvements — webhook retry, sectioned progress, image vision, ❌-cancel (#204) 2026-04-26 03:32:10 +09:00
.claude/skills feat: merge sno-bot improvements to main (#184) 2026-03-19 23:46:20 +09:00
.devcontainer Create devcontainer.json 2024-05-19 13:39:12 +09:00
.github/workflows ci: refresh checkout and setup-node to v7 (#216) 2026-09-28 23:29:30 -07:00
.husky fix: resolve MetaCollection initialization error and add CI typecheck (#188) 2026-04-03 08:34:43 +00:00
.vscode feat: add comprehensive Slack API research commands to prbot CLI 2026-02-04 00:12:26 +09:00
app chore(tasks): retire frontend release Slack notification task 2026-10-03 09:01:21 +00:00
bot feat(bot): ComfyPR-Bot improvements — webhook retry, sectioned progress, image vision, ❌-cancel (#204) 2026-04-26 03:32:10 +09:00
components perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
docs feat(bot): ComfyPR-Bot improvements — webhook retry, sectioned progress, image vision, ❌-cancel (#204) 2026-04-26 03:32:10 +09:00
gh-service fix(lint): resolve oxlint warnings and errors (#173) 2026-02-21 03:37:00 +09:00
lib fix: post overflow changelog PR entries as thread replies instead of truncating 2026-09-12 20:56:44 +00:00
mocks perf: optimize TypeScript server performance (#139) 2026-01-11 08:11:37 +00:00
packages/mongodb-pipeline-ts feat(backport): improve backport notifications with persistent warnings and author tagging (#179) 2026-03-17 11:54:58 +09:00
patches Fix zod v3 compatibility by patching trpc-to-openapi 2025-07-18 15:03:26 +00:00
public fix(main): swagger 2024-06-16 12:37:07 +00:00
reports/gh-pr-speed fix: resolve all TypeScript lint errors for tsgo compatibility (#157) 2026-02-18 08:10:35 +00:00
run perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
scripts feat: add slack-cli subtree and subtree sync script (#187) 2026-04-05 18:02:37 +09:00
src fix(test): add MSW handlers for Slack users.info/conversations.info 2026-08-23 08:38:23 +00:00
templates fix(lint): resolve oxlint warnings and errors (#173) 2026-02-21 03:37:00 +09:00
.dockerignore feat(CNRepos): comfypr-notification sender 2024-06-10 17:37:11 +00:00
.env Add Slack avatar updater and enhance pr-agent with GitHub token auth 2026-01-15 21:50:21 +09:00
.env.dev Update bot configuration and documentation 2026-01-15 21:50:21 +09:00
.env.example feat(env): add .env.example file to provide a template for environment variables configuration 2025-07-16 03:29:42 +00:00
.env.production fix(main): add prod envs 2024-07-12 13:44:49 +00:00
.env.test feat: add MSW for mocking GitHub API in tests (#90) 2025-10-25 19:10:37 +09:00
.gitignore feat(bot): ComfyPR-Bot improvements — webhook retry, sectioned progress, image vision, ❌-cancel (#204) 2026-04-26 03:32:10 +09:00
.oxlintrc.json feat: ban 'as any' type assertions and fix all violations (#155) 2026-02-06 04:40:26 +00:00
.prettierrc perf: optimize TypeScript server performance (#139) 2026-01-11 08:11:37 +00:00
.releaserc.json fix: remove @semantic-release/git plugin to work with branch protection 2026-04-05 08:35:31 +00:00
AGENTS.md perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
bot-start.sh Add Slack avatar updater and enhance pr-agent with GitHub token auth 2026-01-15 21:50:21 +09:00
bun.lock perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
bunfig.toml feat: major ComfyPR Bot improvements with unified CLI and enhanced integrations (#154) 2026-02-05 20:47:53 +09:00
CHANGELOG.md chore(release): 0.2.27 2024-08-15 08:22:28 +00:00
CLAUDE.md perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
comfypr-ignore.yaml fix(pr): prevent duplicate 2025-03-13 04:39:36 +00:00
components.json perf: optimize TypeScript server performance (#139) 2026-01-11 08:11:37 +00:00
docker-compose.test.yml perf: optimize TypeScript server performance (#139) 2026-01-11 08:11:37 +00:00
docker-compose.yml feat: add bot service to docker-compose and remove gh-service 2026-01-15 21:50:21 +09:00
Dockerfile chore(Dockerfile): update Dockerfile to install comfy-cli in a virtual environment and streamline the build process 2025-06-26 10:16:33 +00:00
ecosystem.config.cjs feat(bot): Improvements to bot functionalities 2026-01-15 21:50:21 +09:00
entry.sh chore(Dockerfile): update Dockerfile to install comfy-cli in a virtual environment and streamline the build process 2025-06-26 10:16:33 +00:00
gcp-deploy.sh fix(analyze-contributors): single-repo-done 2025-05-06 04:07:14 +00:00
inbox.yaml feat: add slack-cli subtree and subtree sync script (#187) 2026-04-05 18:02:37 +09:00
index.ts chore(main): add shadcn-ui 2024-07-14 15:15:13 +00:00
lefthook.yml fix(main): format lefthook 2024-07-12 13:22:50 +00:00
next.config.ts fix: resolve Vercel build timeout and import errors 2026-01-15 21:50:21 +09:00
package.json perf: performance fixes, bugcop 404 handling, and createIndex docs (#201) 2026-04-19 07:16:12 +09:00
PERFORMANCE-FIXES.md Add MongoDB performance indexes to fix critical query slowdowns (#153) 2026-02-04 09:11:42 +00:00
post-summary.ts fix: resolve all TypeScript lint errors for tsgo compatibility (#157) 2026-02-18 08:10:35 +00:00
postcss.config.mjs fix(main): stage 2024-06-16 02:22:48 +00:00
README.md docs: update README with current architecture and features (#64) 2025-08-30 16:46:42 +09:00
run-bot.md feat(bot): Improvements to bot functionalities 2026-01-15 21:50:21 +09:00
tailwind.config.ts feat(bot): Improvements to bot functionalities 2026-01-15 21:50:21 +09:00
tsconfig.json feat(bot): ComfyPR-Bot improvements — webhook retry, sectioned progress, image vision, ❌-cancel (#204) 2026-04-26 03:32:10 +09:00
vercel.json fix: resolve Vercel CI/CD build issues 2025-08-16 10:13:36 +00:00
WEBHOOK_SETUP.md feat(label-op): add webhook support for real-time GitHub event monitoring 2025-08-15 07:14:57 +00:00

Comfy-PR

A comprehensive automation platform for ComfyUI Custom Node development and publishing. Comfy-PR helps Custom Node authors streamline their publishing workflow by automating repository setup, pull request creation, and ongoing maintenance.

Features

  • 🔄 Automated PR Creation: Clone repos, update pyproject.toml, initialize GitHub Actions, and create PRs
  • 📊 Analytics Dashboard: Web-based dashboard with statistics, CSV/YAML exports, and repository insights
  • 🔗 GitHub Webhook Integration: Real-time monitoring of issues, PRs, and comments
  • ⚡ Performance Optimized: Cached GitHub API client with SQLite storage (5min TTL)
  • 📋 Task Management: Automated task execution with progress tracking
  • 🎯 Rule-Based Follow-ups: Configurable automation rules for different PR states

Comfy-PR Project Goals

The Comfy-PR project aims to support and streamline the process for Custom Node Authors to publish their work in the Comfy Registry. Here's why this initiative is essential:

  1. Simplify Node Publishing: Provide tools and assistance to make publishing Custom Nodes straightforward, allowing authors to concentrate on development rather than the complexities of the publishing process.
  2. Expand Node Availability: Streamlined publishing will increase the number of Custom Nodes in the Comfy Registry, enriching the ecosystem and offering more options to users.
  3. Encourage Collaboration: Scanning GitHub repositories and providing follow-up support fosters collaboration, knowledge-sharing, and a stronger sense of community among Custom Node Authors and users.
  4. Ensure Quality and Compliance: Automate checks and provide guidance to maintain high-quality standards and compliance within the Comfy Registry.
  5. Resolve Publishing Issues Promptly: Address Custom Node Authors' issues during the publishing process quickly, reducing frustration and improving the overall user experience.
  6. Strengthen the Comfy Community: Help solve users' problems with Custom Node uploading and publishing, contributing to a more vibrant, supportive, and engaged community.
  7. Promote Innovation: Lower barriers to publishing Custom Nodes to encourage innovation and creativity within the community, leading to the development of novel and exciting nodes.

Through these efforts, Comfy-PR seeks to create an environment where Custom Node Authors can thrive and users can access a diverse and high-quality array of Custom Nodes.

Architecture Overview

Core Components

  1. CLI Tool (src/cli.ts): Command-line interface for processing individual repositories
  2. Main Service (src/index.ts): Orchestrates batch processing of repositories
  3. Web Dashboard (app/): Next.js application with analytics and management UI
  4. Webhook Service (run/index.ts): Real-time GitHub event monitoring
  5. Task System (app/tasks/): Automated background tasks for various operations

Key Features

CLI Operations

  • ✅ Repository forking and local cloning
  • ✅ Automated pyproject.toml setup via comfy node init
  • ✅ GitHub Actions workflow creation and publishing
  • ✅ Template-based PR creation with descriptions
  • ✅ Clean workspace management

Analytics & Monitoring

  • ✅ Repository status tracking (private/archived/active)
  • ✅ PR status monitoring (open/merged/closed) with comments
  • ✅ Statistical analysis and reporting
  • ✅ CSV/YAML data exports
  • ✅ Related PR cross-referencing

Automation Engine

  • ✅ Rule-based follow-up actions
  • ✅ Slack notifications
  • ✅ Email task management
  • ✅ License schema updates
  • ✅ Repository bypass logic
  • 🔄 Auto-cleanup of merged forks (in progress)

Web Dashboard

Access the dashboard at https://comfy-pr.vercel.app

  • 📊 Repository statistics and analytics
  • 📈 Interactive charts and visualizations
  • 📋 Task management interface
  • 📤 Data export tools (CSV/YAML)
  • 🔍 PR status monitoring and filtering

Configuration

Environment Variables

Core Settings

# GitHub API token (required)
GH_TOKEN=ghp_your_github_token_here

# PR source organization (optional - defaults to your account)
FORK_OWNER="ComfyNodePRs"

# PR branch prefix (optional)
FORK_PREFIX="PR-"

# MongoDB connection (for dashboard/analytics)
MONGODB_URI=mongodb://localhost:27017

Webhook Service (Optional)

# Enable real-time webhook monitoring
USE_WEBHOOKS=true
GITHUB_WEBHOOK_SECRET=your_secure_webhook_secret
WEBHOOK_BASE_URL=https://your-domain.com
PORT=8080

GitHub Token Setup

  1. Go to GitHub Personal Access Tokens
  2. Create a fine-grained token with these permissions:
    • Pull requests: Read and write
    • Workflows: Read and write
    • Metadata: Read-only
    • Repository hooks: Read and write (for webhooks)

SSH Key Setup

Required for automated git operations:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
cat ~/.ssh/id_rsa.pub
# Add the public key to https://github.com/settings/keys

Quick Start

CLI Usage

# Install and run for specific repositories
bunx comfy-pr [GITHUB_REPO_URLS...]

# Process from a file list
bunx comfy-pr --repolist repos.txt

# Use environment variable
REPO=https://github.com/owner/repo bunx comfy-pr

Examples

# Process a single repository
bunx comfy-pr https://github.com/example/my-comfy-node

# Process multiple repositories
bunx comfy-pr \
  https://github.com/user1/node-a \
  https://github.com/user2/node-b

# Use a repository list file
echo "https://github.com/example/repo1" > repos.txt
echo "https://github.com/example/repo2" >> repos.txt
bunx comfy-pr --repolist repos.txt

Installation & Setup

Prerequisites

  • Bun runtime
  • Python 3.x with comfy-cli installed
  • Git with SSH key configured
  • GitHub Personal Access Token

Local Development

# Clone the repository
git clone https://github.com/Comfy-Org/Comfy-PR
cd Comfy-PR

# Install dependencies
bun install

# Setup Python environment for comfy-cli
python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install comfy-cli

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Run CLI tool
bun src/cli.ts https://github.com/example/my-comfy-node

# Run main service (batch processing)
bun src/index.ts

# Start web dashboard
bun run dev  # Available at http://localhost:3000

Production Deployment

# Configure environment
cp .env.example .env
# Edit .env with production settings

# Deploy with Docker Compose
docker compose up -d

Manual Docker

docker run --rm -it \
  -v $HOME/.ssh:/root/.ssh:ro \
  -e GH_TOKEN=your_github_token \
  -e MONGODB_URI=mongodb://localhost:27017 \
  comfy-org/comfy-pr

Cloud Deployment

The webhook service can be deployed to:

  • Vercel: vercel --prod
  • Google Cloud Run: cd run && ./deploy.sh
  • Railway: railway deploy
  • Heroku: Standard Node.js deployment

Development

Project Structure

Comfy-PR/
├── src/                      # Core utilities and business logic
│   ├── cli.ts               # Command-line interface
│   ├── index.ts             # Main service orchestrator
│   ├── ghc.ts               # Cached GitHub API client
│   ├── db/                  # Database models and utilities
│   ├── gh/                  # GitHub API wrappers
│   └── utils/               # Shared utilities
├── app/                      # Next.js web dashboard
│   ├── (dashboard)/         # Dashboard pages and components
│   ├── api/                 # API routes and tRPC
│   └── tasks/               # Background task implementations
├── run/                      # Production services
│   ├── index.ts             # GitHub webhook service
│   └── deploy.sh            # Cloud deployment scripts
├── gh-service/              # Legacy webhook service
├── templates/               # PR and workflow templates
└── packages/                # Internal packages
    └── mongodb-pipeline-ts/ # MongoDB aggregation utilities

Development Workflow

# Install dependencies
bun install

# Start MongoDB (required for dashboard)
docker compose up mongodb -d

# Initialize database
bun src/index.ts

# Development modes:
bun run dev          # Web dashboard (http://localhost:3000)
bun run dev:tsc      # TypeScript compiler watch mode
bun run gh-service   # Webhook service

# Testing
bun test             # Run test suite
bun test --watch     # Watch mode

# Linting and building
bun run lint         # ESLint
bun run build        # Next.js build

Running Individual Components

# Process specific repositories
bun src/cli.ts https://github.com/example/repo

# Run specific tasks
bun app/tasks/coreping/coreping.ts
bun app/tasks/gh-bounty/gh-bounty.ts

# Update repository data
bun src/updateCNRepos.ts
bun src/updateAuthors.ts

Advanced Usage

Webhook Integration

For real-time GitHub event monitoring:

# Generate secure webhook secret
export GITHUB_WEBHOOK_SECRET=$(openssl rand -hex 32)

# Enable webhook mode
export USE_WEBHOOKS=true
export WEBHOOK_BASE_URL=https://your-domain.com

# Start webhook service
bun run gh-service

See WEBHOOK_SETUP.md for detailed webhook configuration.

Task System

The platform includes several automated tasks:

  • CorePing (app/tasks/coreping/): Repository health monitoring
  • GitHub Bounty (app/tasks/gh-bounty/): Bounty management
  • Design Tasks (app/tasks/gh-design/): Design-related automation
  • Contributor Analysis (app/tasks/github-contributor-analyze/): Contribution statistics
  • Action Updates (app/tasks/github-action-update/): GitHub Actions maintenance

Database Inspection

# Inspect production database (read-only)
echo 'MONGODB_URI_INSPECT=mongodb://prod-readonly-uri' > .env.development.local
echo 'MONGODB_URI=$MONGODB_URI_INSPECT' >> .env.development.local

# Run inspection scripts
bun src/checkPRsFailures.ts
bun src/analyzeTotals.ts

Performance Optimization

The project uses a cached GitHub API client (src/ghc.ts) that:

  • Stores responses in SQLite for 5 minutes
  • Reduces API rate limiting
  • Improves response times for repeated requests
import { ghc } from "./src/ghc";

// Use ghc instead of gh for automatic caching
const repo = await ghc.repos.get({ owner, repo });