This repo is the ComfyGit Manager custom node and panel UI for ComfyUI. It is
not the cloud dashboard and it is not the core ComfyGit library. Most durable
environment behavior belongs in the sibling comfygit repo; this repo owns the
ComfyUI extension surface, local manager API, panel UX, and local development
container for the manager.
This repo has moved away from bead-first development. Do not treat .beads/ as
the source of truth for product behavior.
Use the spec-driven truth layer under docs/:
docs/spec-driven-development.mdexplains the local methodology.docs/contracts/README.mddefines clause statuses and validation classes.docs/contracts/manager-ui/CONTRACT.mdcovers manager frontend guarantees.docs/contracts/manager-api/CONTRACT.mdcovers local HTTP API guarantees.docs/specs/holds lifecycle and interaction specs.docs/architecture/service-boundaries.mdexplains manager/core/cloud responsibility boundaries.
When changing behavior covered by the truth layer:
- Read the relevant contract/spec clauses before editing code.
- Update docs when behavior or direction changes.
- Use clause IDs in commit messages, PR notes, or validation notes when a change is intended to satisfy or modify a clause.
- Do not mark clauses
[LIVE]unless they are true in the current codebase. - Prefer explicit
[PARTIAL]clauses over aspirational prose when the code only partly satisfies the desired behavior.
Useful validator from the spec skill:
python3 <spec-workflows-skill-dir>/scripts/validate_contract_docs.py docsCore frontend:
frontend/src/main.tsregisters the ComfyUI extension and mounts panel, modal, popover, and graph-adjacent UI.frontend/src/components/ComfyGitPanel.vueis the root panel shell and navigation coordinator.frontend/src/components/*Section.vuefiles are the main panel surfaces.frontend/src/components/WorkflowContractModal.vueandfrontend/src/components/WorkflowIOMappingOverlay.vueare the contract authoring surfaces.frontend/src/composables/useComfyGitService.tsis the main API client.frontend/src/composables/useCloudAuth.tsowns local cloud auth state.frontend/src/types/comfygit.tsis the central frontend API type file.frontend/src/constants/should hold user-facing strings/links that need to be easy to update.
Built frontend output:
js/comfygit-panel.jsandjs/comfygit-panel.cssare generated bycd frontend && npm run build.- If frontend source changes affect the shipped panel, rebuild and include the
generated
js/output unless the task explicitly says not to. js/comfygit-manager.jsis a ComfyUI-side manager integration script, not the Vite bundle.
Backend/API:
server/comfygit_panel.pyregisters the local/v2/comfygit/...panel API.server/comfygit_server.pyregisters ComfyUI Manager compatibility routes and feature flags.server/api/v2/contains the domain route modules used by the panel API.server/cgm_core/contains backend decorators, context helpers, serializers, and version utilities.server/cgm_utils/contains small backend utility helpers.server/orchestrator.pysupervises managed ComfyUI environment startup, restart, and switch behavior.server/workflow_file_watcher.pywatches workflow files for panel refresh.
Docs and maps:
docs/frontend-map.mdanddocs/server-map.mdare orientation docs. Update them when major files move or responsibility boundaries change.docs/COMFYUI_MANAGER_ARCHITECTURE.mdanddocs/COMFYUI_MANAGER_UI_INTEGRATION.mdare older but still useful reference material for ComfyUI integration details.
Tests:
testing/unit/covers backend units and orchestrator behavior.testing/integration/covers integration behavior.testing/integration/panel/protects the local panel HTTP contract.testing/run_tests.shis the test helper entrypoint.- Root
package.jsonis for Playwright e2e support. frontend/package.jsonis for Vite/Vitest frontend work.
Prefer the manager-owned scripts. See scripts/README.md and
dev/docker/README.md for details.
Recommended Docker flow:
./scripts/setup-dev-env comfygit-cloud-test1 \
--workspace <path-to-comfygit-workspace> \
--docker \
--comfyui-port 8189 \
--torch-backend cu126Direct lower-level Docker wrapper:
./scripts/start-dev-container comfygit-cloud-test1 --comfyui-port 8189Behavior to know:
- If the named environment already exists in the workspace, the scripts reuse it.
- If it does not exist and
--dockeris used, the container entrypoint creates it. - The dev container mounts this repo, the sibling
comfygitrepo, and the ComfyGit workspace. comfygit-coreandcomfygit-studiolocal editable paths are configured through.cec/overlays/.local.toml.- Do not rely on direct
uv pip install -emutations inside an environment venv for persistent dev setup;cg syncandcg runown that venv. - Docker Compose is configured with
gpus: all. If GPU behavior fails, checknvidia-smiinside the container and the selectedCOMFYGIT_TORCH_BACKEND.
Browser-facing local URLs may need the dev machine Tailscale address rather
than localhost when the user is on another machine. Check the global Codex
machine context for current Tailscale details.
- ALWAYS use uv and the commands below for python environment management!
- NEVER try to run the system python!
- uv commands should be run in the root repo directory in order to use the repo's .venv
Frontend:
cd frontend
npm run build
npm run test:runBackend tests:
cd testing
uv run pytest
uv run pytest integration/panelBackend tests that need unreleased local comfygit-core or comfygit-studio
changes:
./scripts/test-local-core
./scripts/test-local-core testing/unit/test_readiness.py -qRun that script from the manager repo root. It keeps pyproject.toml pinned to
the released ComfyGit packages, but runs the repo-local testing project with
editable sources for sibling local core and Studio runtime checkouts. By default
it expects the monorepo at ../comfygit; set
COMFYGIT_CORE_PATH=/path/to/comfygit/packages/core and
COMFYGIT_STUDIO_PATH=/path/to/comfygit/packages/studio-runtime when using a
different checkout location. Use this for cross-repo development where manager
code intentionally depends on local ComfyGit changes that have not been released
to PyPI yet.
Script checks:
bash -n scripts/setup-dev-env
bash -n scripts/start-dev-container
bash -n dev/docker/start-stack.sh
docker compose -f dev/docker/docker-compose.yml configFrontend version check:
./scripts/check-frontend-version.sh- Preserve user work. This repo may have dirty generated assets or local harness changes; inspect diffs before staging or reverting.
- Do not commit broad generated bundle churn unless it corresponds to a frontend source change that needs to ship.
- Keep manager/cloud boundaries clear. The local panel may support auth, linking, and publishing, but full deployment, target/provider management, build artifacts, and runtime operations belong to the cloud dashboard.
- Keep durable environment and workflow contract persistence in
comfygit-corewhere possible. The manager should route persistence through backend APIs and core helpers rather than directly editing durable state in the browser. - When Manager consumes stable core-domain behavior, prefer typed core services and convert to JSON only at the manager API boundary. Do not duplicate core policy as ad hoc nested dictionaries in manager backend or frontend code.
- For user-facing constants, URLs, provider labels, and social links, prefer
frontend/src/constants/or a backend config surface over hardcoding strings deep inside components. - The old beads workflow is no longer mandatory. If task records exist, use them as context only; truth-layer clauses and code/tests are the authoritative alignment mechanism.
- Frontend source is in
frontend/src/(Vue 3 + TypeScript) - Built assets go to
js/directory (committed to repo) cd frontend && npm run build- Rebuild frontend after changescd frontend && npm run dev- Start dev server with hot reload- IMPORTANT: Always rebuild frontend before committing if you changed:
- Any file in
frontend/src/ - The
versioninpyproject.toml
- Any file in
- Version displayed in UI is injected from
pyproject.tomlat build time - Pre-commit hook will block commits if frontend version doesn't match pyproject.toml
- Install hooks:
./scripts/install-hooks.sh
- Pin ComfyGit dependencies to exact versions - Always use
==X.Y.Z(not>=) forcomfygit-coreandcomfygit-studiodependencies in pyproject.toml. This ensures reproducible builds and prevents unexpected breakage from core or Studio runtime updates.
Manager releases depend on the core/CLI monorepo release. The Manager package
pins comfygit-core==X.Y.Z and comfygit-studio==X.Y.Z exactly, and ComfyUI
registry installs consume requirements.txt, so the pinned core and Studio
runtime versions must already exist on PyPI before publishing Manager.
When asked to prepare a Manager release:
- Confirm the target
comfygit-core==X.Y.Zandcomfygit-studio==X.Y.Zhave been published to PyPI.uv lockwill fail, and registry installs will fail, if this is not true. - Bump
comfygit-core==X.Y.Zandcomfygit-studio==X.Y.Zinpyproject.tomldependencies. - Bump the Manager
versioninpyproject.toml. - Run
uv run scripts/sync-requirements.pysorequirements.txtmatchespyproject.toml. Do not editrequirements.txtseparately. - Run
uv lockto updateuv.lockagainst the published ComfyGit packages. - Run
cd frontend && npm run build. The footer version shown in the bottom left of the ComfyGit panel is injected frompyproject.tomlat build time, so the builtjs/comfygit-panel.jsmust be regenerated for the displayed version to change. - Run
./scripts/check-frontend-version.sh; it must report the same version inpyproject.tomlandjs/comfygit-panel.js. - Run targeted backend/frontend tests for the changed areas.
- Stage
pyproject.toml,uv.lock,requirements.txt, and generatedjs/assets together, then commit.
After the release commit lands on main, the publish workflow creates the
ComfyUI registry release and GitHub release. Do not publish Manager before the
matching core and Studio runtime packages are available on PyPI.
For local development before core or Studio runtime is published, use editable ComfyGit overlays or the CI helper flow only for testing. Do not treat those local source overrides as a publishable Manager release state.
- frontend/THEMES.md - Theme system documentation
Use concise commit messages describing behavior. Include clause IDs when a change is directly tied to a truth-layer clause. Do not include obsolete bead IDs unless the user specifically asks for bead bookkeeping.
Don't make any implementation overly complex. This is a one-person dev MVP project. We are still pre-customer - any unnecessary fallbacks, unnecessary versioning, testing overkill should be avoided. Simple, elegant, maintainable code is the goal. We DONT want any legacy or backwards compatible code.
This codebase must run on Windows, Linux, and macOS. All engineering choices should consider cross-platform compatibility:
- Use
pathlib.Pathinstead of string concatenation for file paths - Use
os.path.join()orPathobjects, never hardcode/or\\separators - Use
shutilfor file operations instead of shell commands when possible - Avoid platform-specific shell commands; when unavoidable, handle all platforms explicitly
- Use
subprocesswith lists (not shell strings) to avoid shell escaping issues - Be mindful of case sensitivity differences (Linux/macOS case-sensitive, Windows case-insensitive)
- Test path handling with spaces and special characters
- Use
sys.executablefor Python interpreter path, not hardcoded paths