ComfyGit Core
comfygit-core is the UI-independent library behind ComfyGit's CLI and runtime
adapters. It owns workspace discovery, environment manifests, custom nodes,
model metadata, dependency resolution, sync, import/export and materialization.
APIs are still evolving; integrations should pin a tested release.
Installation
uv add 'comfygit-core==0.7.0'
Core does not require desktop keyring. For OS-backed credential persistence,
install the optional comfygit-core[keyring]==0.7.0 extra. The CLI includes that
extra; headless library users can use environment credentials or inject their
own store instead.
Open a workspace
from pathlib import Path
from comfygit_core import Workspace
workspace = Workspace.open(Path.home() / "comfygit")
env = workspace.get_environment("my-project", auto_sync=False)
status = env.status()
Workspace.create(path) creates a workspace; Workspace.open_or_create(path)
handles either case. Opening with auto_sync=False above avoids reconciling the
environment just to inspect it.
Create and reconcile an environment
env = workspace.create_environment(
name="experiment",
python_version="3.12",
torch_backend="auto",
no_manager=True,
)
env.add_node("rgthree-comfy")
result = env.sync(model_strategy="required")
Creation and sync can download code and packages. Resolve an existing saved workflow by its name, not an arbitrary JSON path:
result = env.resolve_workflow("my-workflow")
For ambiguous resolution, supply implementations of the protocols in
models/protocols.py. Do not put prompts,
printing or CLI policy into Core. A successful dependency resolution is not proof
that a ComfyUI inference job succeeds.
Credentials
Workspace entry points accept process-local credential_overrides, keyed by
CredentialProvider. A token overrides all discovery for that provider; None
explicitly selects anonymous access. Omitted providers use normal discovery.
from comfygit_core.models.credentials import CredentialProvider
workspace = Workspace.open(
Path.home() / "comfygit",
credential_overrides={CredentialProvider.HUGGINGFACE: None},
)
Normal resolution uses provider environment variables, workspace secure storage,
provider-native credentials when available, then legacy workspace values during
migration. An unavailable keyring backend does not prevent environment/native
credentials from working. Saving a new credential requires a working secure store;
there is no new plaintext fallback. Callers may inject a CredentialStore through
the credential_store parameter.
Portable and local state
The tracked pyproject.toml, workflows/, workflow_api/, shared overlays and
source metadata form the portable environment. Model bytes stay in the shared
model directory. ComfyUI/node checkouts, virtualenvs, .cec/, local overlays,
credentials and backend choices are derived or machine-local state.
Use ComfyGit operations to change the recipe; manual runtime edits may be
replaced on sync. For a headless recreation, use the materialization API or
cg materialize.
API and development references
- Workspace entry points
- Environment operations
- Architecture
- Normative contracts and specifications
- Contributing
From the monorepo root:
uv sync --frozen --all-packages
uv run pytest packages/core/tests -q
make lint
Core, Studio runtime and CLI releases use matched versions. See the root agent guide for release ordering and package boundaries.
Metadata
Release files for comfygit-core 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| comfygit_core-0.7.1.tar.gz | 855.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| comfygit_core-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / comfygit_core-0.7.1.tar.gz
| Download URL | comfygit_core-0.7.1.tar.gz |
|---|---|
| Size | 855.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8858a84bf9ac48bb797f9fddeee0dd02719e3bb94f3280fc08da7bf1c2a20f9
|
|
BLAKE2b-256 checksum How to use checksums |
8dce0414c0d782faaa68924664ccb8c864eb4d678213db0371e12b4505541626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / comfygit_core-0.7.1-py3-none-any.whl
| Download URL | comfygit_core-0.7.1-py3-none-any.whl |
|---|---|
| Size | 536.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf5a4bc2f8adf492eac74b16ca34741d1fd6cbefe9106a00bb33f27746355000
|
|
BLAKE2b-256 checksum How to use checksums |
fe77baae16c7d0b24708049642a471ad07e393643b5b58d4e768894dc87da0b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|