comfygit 0.2.0__tar.gz → 0.3.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {comfygit-0.2.0 → comfygit-0.3.11}/CLAUDE.md +14 -14
- {comfygit-0.2.0 → comfygit-0.3.11}/PKG-INFO +130 -127
- {comfygit-0.2.0 → comfygit-0.3.11}/README.md +128 -125
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/cli.py +203 -9
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/cli_utils.py +2 -1
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/completers.py +7 -7
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/completion_commands.py +68 -1
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/env_commands.py +787 -107
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/global_commands.py +384 -49
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/logging/environment_logger.py +12 -12
- comfygit-0.3.11/comfygit_cli/strategies/conflict_resolver.py +113 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/utils/civitai_errors.py +1 -1
- comfygit-0.3.11/comfygit_cli/utils/orchestrator.py +252 -0
- comfygit-0.3.11/docs/architecture.md +145 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/pyproject.toml +2 -2
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_batch_node_remove.py +69 -2
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_branch_commands.py +23 -15
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_completion_commands.py +66 -0
- comfygit-0.3.11/tests/test_conflict_resolver.py +220 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_logging_structure.py +8 -8
- comfygit-0.3.11/tests/test_manager_commands.py +319 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_manifest_command.py +54 -2
- comfygit-0.3.11/tests/test_preview_display.py +280 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_py_commands.py +5 -5
- comfygit-0.3.11/tests/test_status_disabled_nodes_display.py +95 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_status_displays_uninstalled_nodes.py +1 -1
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_status_path_sync_display.py +6 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_status_real_bug_scenario.py +1 -1
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_status_suggestions.py +4 -4
- comfygit-0.3.11/tests/test_status_uninstalled_reporting.py +78 -0
- comfygit-0.3.11/tests/test_torch_backend_cli.py +292 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_update_workflow_model_paths.py +1 -1
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_workflow_model_importance.py +1 -1
- comfygit-0.2.0/docs/codebase-map.md +0 -131
- comfygit-0.2.0/tests/test_status_uninstalled_reporting.py +0 -151
- {comfygit-0.2.0 → comfygit-0.3.11}/.github/workflows/publish_pypi.yml +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/.gitignore +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/.python-version +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/LICENSE.txt +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/__init__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/__main__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/formatters/__init__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/formatters/error_formatter.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/interactive/__init__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/logging/compressed_handler.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/logging/log_compressor.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/logging/logging_config.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/resolution_strategies.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/strategies/__init__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/strategies/interactive.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/strategies/rollback.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/utils/__init__.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/utils/pagination.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/comfygit_cli/utils/progress.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/README_REGISTRY.md +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/augment_mappings.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/build_global_mappings.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/build_registry_cache.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/extract_builtin_nodes.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/extract_node_modules.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/get_hash.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/global-node-mappings.md +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/registry.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/registry_client.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/scripts/test_concurrent_api.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/conftest.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_batch_node_add.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_completers.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_detached_head_display.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_error_formatter.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_log_command.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_pagination.py +0 -0
- {comfygit-0.2.0 → comfygit-0.3.11}/tests/test_py_remove_group_commands.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ComfyGit CLI Package
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
|
-
CLI interface for
|
|
4
|
+
CLI interface for ComfyGit, providing command-line tools for workspace and environment management.
|
|
5
5
|
|
|
6
6
|
## Key Documents
|
|
7
7
|
- @docs/codebase-map.md - Architecture and structure
|
|
@@ -16,13 +16,13 @@ CLI interface for ComfyDock, providing command-line tools for workspace and envi
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
# Run mypy (stricter, CI/CD-style checking)
|
|
19
|
-
uv run mypy packages/cli/
|
|
19
|
+
uv run mypy packages/cli/comfygit_cli/
|
|
20
20
|
|
|
21
21
|
# Run pyright (Pylance/IDE-style checking - catches "possibly unbound" etc.)
|
|
22
|
-
uv run pyright packages/cli/
|
|
22
|
+
uv run pyright packages/cli/comfygit_cli/
|
|
23
23
|
|
|
24
24
|
# Run both together
|
|
25
|
-
uv run mypy packages/cli/
|
|
25
|
+
uv run mypy packages/cli/comfygit_cli/ && uv run pyright packages/cli/comfygit_cli/
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
**Why both?**
|
|
@@ -79,14 +79,14 @@ uv run pytest packages/cli/tests/ -v
|
|
|
79
79
|
uv run pytest packages/cli/tests/test_status_displays_uninstalled_nodes.py -v
|
|
80
80
|
|
|
81
81
|
# Test with coverage
|
|
82
|
-
uv run pytest packages/cli/tests/ --cov=
|
|
82
|
+
uv run pytest packages/cli/tests/ --cov=comfygit_cli
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
## Code Style
|
|
86
86
|
|
|
87
87
|
### Command Handler Pattern
|
|
88
88
|
```python
|
|
89
|
-
@with_env_logging("command name"
|
|
89
|
+
@with_env_logging("status") # Use actual command name, e.g., "status", "node add"
|
|
90
90
|
def command(self, args: argparse.Namespace, logger=None) -> None:
|
|
91
91
|
"""Command description."""
|
|
92
92
|
env = self._get_env(args)
|
|
@@ -128,20 +128,20 @@ except Exception as e:
|
|
|
128
128
|
|
|
129
129
|
Before committing CLI changes:
|
|
130
130
|
|
|
131
|
-
1. ✅ Run `uv run mypy packages/cli/
|
|
132
|
-
2. ✅ Run `uv run pyright packages/cli/
|
|
131
|
+
1. ✅ Run `uv run mypy packages/cli/comfygit_cli/`
|
|
132
|
+
2. ✅ Run `uv run pyright packages/cli/comfygit_cli/`
|
|
133
133
|
3. ✅ Run `uv run pytest packages/cli/tests/`
|
|
134
|
-
4. ✅ Test manually with `uv run
|
|
134
|
+
4. ✅ Test manually with `uv run cg <command>`
|
|
135
135
|
5. ✅ Check no red squiggles in IDE
|
|
136
136
|
|
|
137
137
|
## Common Commands
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
140
|
# Run CLI locally
|
|
141
|
-
uv run
|
|
141
|
+
uv run cg --help
|
|
142
142
|
|
|
143
143
|
# Test specific command
|
|
144
|
-
uv run
|
|
144
|
+
uv run cg -e test-env status
|
|
145
145
|
|
|
146
146
|
# Install in dev mode
|
|
147
147
|
uv pip install -e packages/cli/
|
|
@@ -155,7 +155,7 @@ uv run ruff check --fix packages/cli/
|
|
|
155
155
|
|
|
156
156
|
## Dependencies
|
|
157
157
|
|
|
158
|
-
- **
|
|
158
|
+
- **comfygit-core**: Core library (DO NOT couple with CLI specifics)
|
|
159
159
|
- **argparse**: Command-line parsing
|
|
160
160
|
- **argcomplete**: Shell tab completion
|
|
161
161
|
- **aiohttp**: Async HTTP for registry operations
|
|
@@ -163,7 +163,7 @@ uv run ruff check --fix packages/cli/
|
|
|
163
163
|
## Architecture
|
|
164
164
|
|
|
165
165
|
```
|
|
166
|
-
|
|
166
|
+
comfygit_cli/
|
|
167
167
|
├── cli.py # Main entry point, argument parsing
|
|
168
168
|
├── env_commands.py # Environment-scoped commands
|
|
169
169
|
├── global_commands.py # Workspace-scoped commands
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: comfygit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: ComfyGit - Git-based environment management for ComfyUI
|
|
5
5
|
License-File: LICENSE.txt
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Requires-Dist: argcomplete>=3.5.0
|
|
8
|
-
Requires-Dist: comfygit-core
|
|
8
|
+
Requires-Dist: comfygit-core==0.3.11
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# ComfyGit CLI
|
|
12
12
|
|
|
13
|
-
Command-line interface for
|
|
13
|
+
Command-line interface for ComfyGit workspace and environment management.
|
|
14
14
|
|
|
15
15
|
## Overview
|
|
16
16
|
|
|
17
|
-
The CLI (`
|
|
17
|
+
The CLI (`cg` command) provides interactive, user-friendly access to ComfyGit's environment management system. It wraps the `comfygit-core` library with:
|
|
18
18
|
|
|
19
19
|
- **Smart tab completion** - Context-aware shell completion for bash/zsh
|
|
20
20
|
- **Interactive resolution** - User-guided dependency resolution for ambiguous cases
|
|
@@ -40,15 +40,15 @@ pip install comfydock-cli
|
|
|
40
40
|
The CLI provides smart shell completion that understands your workspace context:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
cg use <TAB> # Lists all environments
|
|
44
|
+
cg -e prod node remove <TAB> # Lists installed nodes in 'prod'
|
|
45
|
+
cg workflow resolve <TAB> # Prioritizes unresolved workflows
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
**Setup:**
|
|
49
49
|
```bash
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
cg completion install # One-time setup (bash/zsh)
|
|
51
|
+
cg completion status # Check installation
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
The installer:
|
|
@@ -124,13 +124,13 @@ Every command is logged to environment-specific files:
|
|
|
124
124
|
└── workspace.log # Workspace-level operations (init, import, etc)
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
View logs:
|
|
127
|
+
View debug logs:
|
|
128
128
|
```bash
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
cg debug # Last 200 lines of active env
|
|
130
|
+
cg debug -n 500 # Last 500 lines
|
|
131
|
+
cg debug --full # All logs (no limit)
|
|
132
|
+
cg debug --level ERROR # Only errors
|
|
133
|
+
cg debug --workspace # Workspace logs instead of env
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
Logs include:
|
|
@@ -153,10 +153,10 @@ Core library errors are translated into actionable CLI commands:
|
|
|
153
153
|
|
|
154
154
|
Suggested actions:
|
|
155
155
|
1. Track existing directory as development node
|
|
156
|
-
→
|
|
156
|
+
→ cg node add ComfyUI-Manager --dev
|
|
157
157
|
2. Remove and reinstall from registry
|
|
158
|
-
→
|
|
159
|
-
→
|
|
158
|
+
→ cg node remove ComfyUI-Manager
|
|
159
|
+
→ cg node add comfyui-manager
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
## Command Reference
|
|
@@ -164,7 +164,7 @@ Suggested actions:
|
|
|
164
164
|
### Global Options
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
|
-
|
|
167
|
+
cg [options] <command> [args]
|
|
168
168
|
|
|
169
169
|
Options:
|
|
170
170
|
-e, --env NAME Target specific environment (uses active if not specified)
|
|
@@ -178,54 +178,54 @@ Commands that operate at the workspace level (no environment needed):
|
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
180
|
# Initialize workspace (one-time setup)
|
|
181
|
-
|
|
181
|
+
cg init [PATH]
|
|
182
182
|
--models-dir PATH Point to existing models directory
|
|
183
183
|
--yes, -y Use all defaults, no prompts
|
|
184
184
|
|
|
185
185
|
# List all environments
|
|
186
|
-
|
|
186
|
+
cg list
|
|
187
187
|
|
|
188
188
|
# Import environment from tarball or git
|
|
189
|
-
|
|
189
|
+
cg import [PATH|URL]
|
|
190
190
|
--name NAME Environment name (skips prompt)
|
|
191
191
|
--branch, -b REF Git branch/tag/commit
|
|
192
192
|
--torch-backend BACKEND PyTorch backend (auto/cpu/cu128/rocm6.3/xpu)
|
|
193
193
|
--use Set as active environment after import
|
|
194
194
|
|
|
195
195
|
# Export environment to tarball
|
|
196
|
-
|
|
196
|
+
cg export [PATH]
|
|
197
197
|
--allow-issues Skip confirmation if models lack source URLs
|
|
198
198
|
|
|
199
199
|
# Configuration
|
|
200
|
-
|
|
200
|
+
cg config
|
|
201
201
|
--civitai-key KEY Set CivitAI API key (empty string to clear)
|
|
202
202
|
--show Show current configuration
|
|
203
203
|
|
|
204
204
|
# Registry management
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
cg registry status # Show registry cache status
|
|
206
|
+
cg registry update # Update registry data from GitHub
|
|
207
207
|
|
|
208
208
|
# Model index (workspace-wide)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
cg model index find QUERY # Find models by hash/filename
|
|
210
|
+
cg model index list # List all indexed models
|
|
211
|
+
cg model index show IDENTIFIER # Show detailed model info
|
|
212
|
+
cg model index status # Show index status
|
|
213
|
+
cg model index sync # Scan models directory
|
|
214
|
+
cg model index dir PATH # Set models directory
|
|
215
215
|
|
|
216
216
|
# Model download (to workspace models directory)
|
|
217
|
-
|
|
217
|
+
cg model download URL
|
|
218
218
|
--path PATH Target path relative to models dir
|
|
219
219
|
-c, --category TYPE Model category for auto-path (checkpoints/loras/vae)
|
|
220
220
|
-y, --yes Skip path confirmation
|
|
221
221
|
|
|
222
222
|
# Model source management
|
|
223
|
-
|
|
223
|
+
cg model add-source [MODEL] [URL] # Interactive if args omitted
|
|
224
224
|
|
|
225
225
|
# Tab completion
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
cg completion install # Install completion for your shell
|
|
227
|
+
cg completion uninstall # Remove completion
|
|
228
|
+
cg completion status # Show installation status
|
|
229
229
|
```
|
|
230
230
|
|
|
231
231
|
### Environment Management
|
|
@@ -234,7 +234,7 @@ Commands that operate ON environments:
|
|
|
234
234
|
|
|
235
235
|
```bash
|
|
236
236
|
# Create new environment
|
|
237
|
-
|
|
237
|
+
cg create NAME
|
|
238
238
|
--template PATH Template manifest
|
|
239
239
|
--python VERSION Python version (default: 3.11)
|
|
240
240
|
--comfyui VERSION ComfyUI version
|
|
@@ -242,18 +242,18 @@ cfd create NAME
|
|
|
242
242
|
--use Set as active environment
|
|
243
243
|
|
|
244
244
|
# Set active environment
|
|
245
|
-
|
|
245
|
+
cg use NAME
|
|
246
246
|
|
|
247
247
|
# Delete environment
|
|
248
|
-
|
|
248
|
+
cg delete NAME
|
|
249
249
|
-y, --yes Skip confirmation
|
|
250
250
|
|
|
251
251
|
# Show environment status
|
|
252
|
-
|
|
252
|
+
cg status
|
|
253
253
|
-v, --verbose Show full details
|
|
254
254
|
|
|
255
255
|
# Repair environment to match pyproject.toml
|
|
256
|
-
|
|
256
|
+
cg repair
|
|
257
257
|
-y, --yes Skip confirmation
|
|
258
258
|
--models MODE Model download strategy (all/required/skip)
|
|
259
259
|
```
|
|
@@ -264,11 +264,11 @@ Commands that operate IN environments (require `-e` or active environment):
|
|
|
264
264
|
|
|
265
265
|
```bash
|
|
266
266
|
# Run ComfyUI
|
|
267
|
-
|
|
267
|
+
cg run [COMFYUI_ARGS...]
|
|
268
268
|
--no-sync Skip environment sync before running
|
|
269
269
|
|
|
270
|
-
# View logs
|
|
271
|
-
|
|
270
|
+
# View debug logs
|
|
271
|
+
cg debug
|
|
272
272
|
-n, --lines N Number of lines (default: 200)
|
|
273
273
|
--level LEVEL Filter by log level (DEBUG/INFO/WARNING/ERROR)
|
|
274
274
|
--full Show all logs (no line limit)
|
|
@@ -281,21 +281,24 @@ Git-based versioning for environments:
|
|
|
281
281
|
|
|
282
282
|
```bash
|
|
283
283
|
# Commit current state
|
|
284
|
-
|
|
284
|
+
cg commit
|
|
285
285
|
-m, --message MSG Commit message (auto-generated if not provided)
|
|
286
286
|
--auto Auto-resolve issues without interaction
|
|
287
287
|
--allow-issues Allow committing workflows with unresolved issues
|
|
288
288
|
|
|
289
289
|
# View commit history
|
|
290
|
-
|
|
290
|
+
cg log
|
|
291
|
+
-n, --limit N Number of commits to show (default: 20)
|
|
291
292
|
-v, --verbose Show full details
|
|
292
293
|
|
|
293
|
-
#
|
|
294
|
-
|
|
295
|
-
# No version: Discard uncommitted changes
|
|
296
|
-
# With version (e.g., v1, v2): Restore that commit
|
|
294
|
+
# Discard uncommitted changes
|
|
295
|
+
cg reset --hard
|
|
297
296
|
-y, --yes Skip confirmation
|
|
298
|
-
|
|
297
|
+
|
|
298
|
+
# Restore to a previous commit
|
|
299
|
+
cg checkout <ref>
|
|
300
|
+
-y, --yes Skip confirmation for uncommitted changes
|
|
301
|
+
--force Force checkout, discarding uncommitted changes
|
|
299
302
|
```
|
|
300
303
|
|
|
301
304
|
### Git Integration
|
|
@@ -304,18 +307,18 @@ Sync environments via git remotes:
|
|
|
304
307
|
|
|
305
308
|
```bash
|
|
306
309
|
# Remote management
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
+
cg remote add NAME URL # Add git remote
|
|
311
|
+
cg remote remove NAME # Remove git remote
|
|
312
|
+
cg remote list # List all remotes
|
|
310
313
|
|
|
311
314
|
# Pull from remote
|
|
312
|
-
|
|
315
|
+
cg pull
|
|
313
316
|
-r, --remote NAME Remote name (default: origin)
|
|
314
317
|
--models MODE Model download strategy (all/required/skip)
|
|
315
318
|
--force Discard uncommitted changes
|
|
316
319
|
|
|
317
320
|
# Push to remote
|
|
318
|
-
|
|
321
|
+
cg push
|
|
319
322
|
-r, --remote NAME Remote name (default: origin)
|
|
320
323
|
--force Force push using --force-with-lease
|
|
321
324
|
```
|
|
@@ -324,7 +327,7 @@ cfd push
|
|
|
324
327
|
|
|
325
328
|
```bash
|
|
326
329
|
# Add custom node
|
|
327
|
-
|
|
330
|
+
cg node add IDENTIFIER [IDENTIFIER...]
|
|
328
331
|
# IDENTIFIER can be:
|
|
329
332
|
# - Registry ID: comfyui-manager
|
|
330
333
|
# - GitHub URL: https://github.com/user/repo
|
|
@@ -336,14 +339,14 @@ cfd node add IDENTIFIER [IDENTIFIER...]
|
|
|
336
339
|
--force Force overwrite existing directory
|
|
337
340
|
|
|
338
341
|
# Remove custom node
|
|
339
|
-
|
|
342
|
+
cg node remove IDENTIFIER [IDENTIFIER...]
|
|
340
343
|
--dev Remove development node specifically
|
|
341
344
|
|
|
342
345
|
# List installed nodes
|
|
343
|
-
|
|
346
|
+
cg node list
|
|
344
347
|
|
|
345
348
|
# Update node
|
|
346
|
-
|
|
349
|
+
cg node update IDENTIFIER
|
|
347
350
|
-y, --yes Auto-confirm updates
|
|
348
351
|
--no-test Skip dependency resolution test
|
|
349
352
|
```
|
|
@@ -352,10 +355,10 @@ cfd node update IDENTIFIER
|
|
|
352
355
|
|
|
353
356
|
```bash
|
|
354
357
|
# List workflows with status
|
|
355
|
-
|
|
358
|
+
cg workflow list
|
|
356
359
|
|
|
357
360
|
# Resolve workflow dependencies
|
|
358
|
-
|
|
361
|
+
cg workflow resolve NAME
|
|
359
362
|
--auto Auto-resolve without interaction
|
|
360
363
|
--install Auto-install missing nodes
|
|
361
364
|
--no-install Skip node installation prompt
|
|
@@ -365,21 +368,21 @@ cfd workflow resolve NAME
|
|
|
365
368
|
|
|
366
369
|
```bash
|
|
367
370
|
# Add Python package
|
|
368
|
-
|
|
371
|
+
cg py add [PACKAGE...]
|
|
369
372
|
-r, --requirements FILE Add from requirements.txt
|
|
370
373
|
--upgrade Upgrade existing packages
|
|
371
374
|
|
|
372
375
|
# Remove Python package
|
|
373
|
-
|
|
376
|
+
cg py remove PACKAGE [PACKAGE...]
|
|
374
377
|
|
|
375
378
|
# List dependencies
|
|
376
|
-
|
|
379
|
+
cg py list
|
|
377
380
|
--all Show all including dependency groups
|
|
378
381
|
|
|
379
382
|
# Manage constraints (UV constraint dependencies)
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
+
cg constraint add PACKAGE [PACKAGE...] # e.g., torch==2.4.1
|
|
384
|
+
cg constraint list
|
|
385
|
+
cg constraint remove PACKAGE [PACKAGE...]
|
|
383
386
|
```
|
|
384
387
|
|
|
385
388
|
## Common Workflows
|
|
@@ -388,37 +391,37 @@ cfd constraint remove PACKAGE [PACKAGE...]
|
|
|
388
391
|
|
|
389
392
|
```bash
|
|
390
393
|
# 1. Initialize workspace (one-time)
|
|
391
|
-
|
|
394
|
+
cg init
|
|
392
395
|
|
|
393
396
|
# During init, you'll be prompted to set up models directory:
|
|
394
397
|
# - Point to existing ComfyUI models directory (recommended)
|
|
395
398
|
# - Or use the default empty directory
|
|
396
399
|
|
|
397
400
|
# 2. Create and activate environment
|
|
398
|
-
|
|
401
|
+
cg create my-project --use
|
|
399
402
|
|
|
400
403
|
# 3. Add custom nodes
|
|
401
|
-
|
|
402
|
-
|
|
404
|
+
cg node add comfyui-manager
|
|
405
|
+
cg node add https://github.com/ltdrdata/ComfyUI-Impact-Pack
|
|
403
406
|
|
|
404
407
|
# 4. Run ComfyUI and build your workflow
|
|
405
|
-
|
|
408
|
+
cg run
|
|
406
409
|
|
|
407
410
|
# 5. Commit your work
|
|
408
|
-
|
|
411
|
+
cg commit -m "Initial setup with Impact Pack"
|
|
409
412
|
|
|
410
413
|
# 6. Export for sharing
|
|
411
|
-
|
|
414
|
+
cg export my-project-v1.tar.gz
|
|
412
415
|
```
|
|
413
416
|
|
|
414
417
|
### Importing a Shared Project
|
|
415
418
|
|
|
416
419
|
```bash
|
|
417
420
|
# Import from tarball
|
|
418
|
-
|
|
421
|
+
cg import workflow-pack.tar.gz --name imported-project --use
|
|
419
422
|
|
|
420
423
|
# Or import from git
|
|
421
|
-
|
|
424
|
+
cg import https://github.com/user/comfyui-project.git --name team-project --use
|
|
422
425
|
|
|
423
426
|
# The import process will:
|
|
424
427
|
# 1. Download missing nodes
|
|
@@ -426,49 +429,49 @@ cfd import https://github.com/user/comfyui-project.git --name team-project --use
|
|
|
426
429
|
# 3. Set up Python environment
|
|
427
430
|
# 4. Prepare ComfyUI for running
|
|
428
431
|
|
|
429
|
-
|
|
432
|
+
cg run
|
|
430
433
|
```
|
|
431
434
|
|
|
432
435
|
### Team Collaboration via Git
|
|
433
436
|
|
|
434
437
|
```bash
|
|
435
438
|
# On machine 1: Set up and share
|
|
436
|
-
|
|
437
|
-
|
|
439
|
+
cg create team-workflow --use
|
|
440
|
+
cg node add comfyui-animatediff
|
|
438
441
|
# ... build workflow ...
|
|
439
|
-
|
|
442
|
+
cg commit -m "Initial animation workflow"
|
|
440
443
|
|
|
441
444
|
# Add GitHub/GitLab remote
|
|
442
|
-
|
|
443
|
-
|
|
445
|
+
cg remote add origin https://github.com/team/comfy-project.git
|
|
446
|
+
cg push
|
|
444
447
|
|
|
445
448
|
# On machine 2: Clone and work
|
|
446
|
-
|
|
449
|
+
cg import https://github.com/team/comfy-project.git --name team-workflow --use
|
|
447
450
|
# ... make changes ...
|
|
448
|
-
|
|
449
|
-
|
|
451
|
+
cg commit -m "Added refiners"
|
|
452
|
+
cg push
|
|
450
453
|
|
|
451
454
|
# Back on machine 1: Pull updates
|
|
452
|
-
|
|
453
|
-
|
|
455
|
+
cg pull
|
|
456
|
+
cg run
|
|
454
457
|
```
|
|
455
458
|
|
|
456
459
|
### Managing Models Across Environments
|
|
457
460
|
|
|
458
461
|
```bash
|
|
459
462
|
# Check what models you have
|
|
460
|
-
|
|
463
|
+
cg model index status
|
|
461
464
|
# Output: 124 models indexed in /home/user/models
|
|
462
465
|
|
|
463
466
|
# Find specific model
|
|
464
|
-
|
|
467
|
+
cg model index find "sd_xl"
|
|
465
468
|
# Shows matches with hash, size, file path
|
|
466
469
|
|
|
467
470
|
# Download new model
|
|
468
|
-
|
|
471
|
+
cg model download https://civitai.com/models/133005
|
|
469
472
|
|
|
470
473
|
# Update index after manually adding models
|
|
471
|
-
|
|
474
|
+
cg model index sync
|
|
472
475
|
|
|
473
476
|
# Models are automatically symlinked into environments
|
|
474
477
|
# No duplication, shared across all environments
|
|
@@ -478,7 +481,7 @@ cfd model index sync
|
|
|
478
481
|
|
|
479
482
|
```bash
|
|
480
483
|
# Load a workflow with missing nodes/models
|
|
481
|
-
|
|
484
|
+
cg workflow resolve my-animation
|
|
482
485
|
|
|
483
486
|
# The CLI will:
|
|
484
487
|
# 1. Analyze the workflow
|
|
@@ -488,29 +491,29 @@ cfd workflow resolve my-animation
|
|
|
488
491
|
# 5. Update environment to match
|
|
489
492
|
|
|
490
493
|
# For non-interactive use:
|
|
491
|
-
|
|
494
|
+
cg workflow resolve my-animation --auto --install
|
|
492
495
|
```
|
|
493
496
|
|
|
494
497
|
### Experimenting Without Breaking Production
|
|
495
498
|
|
|
496
499
|
```bash
|
|
497
500
|
# Create experimental environment
|
|
498
|
-
|
|
501
|
+
cg create experimental --use
|
|
499
502
|
|
|
500
503
|
# Install risky nodes
|
|
501
|
-
|
|
504
|
+
cg node add some-experimental-node
|
|
502
505
|
|
|
503
506
|
# If things break:
|
|
504
|
-
|
|
507
|
+
cg reset --hard # Discard uncommitted changes
|
|
505
508
|
|
|
506
|
-
# Or commit and
|
|
507
|
-
|
|
509
|
+
# Or commit and revert later:
|
|
510
|
+
cg commit -m "Testing experimental node"
|
|
508
511
|
# ... test ...
|
|
509
|
-
|
|
512
|
+
cg revert HEAD # Create new commit that undoes the last commit
|
|
510
513
|
|
|
511
514
|
# When ready to merge changes back to production:
|
|
512
|
-
|
|
513
|
-
|
|
515
|
+
cg export experimental.tar.gz
|
|
516
|
+
cg use production
|
|
514
517
|
# Manually review and selectively add nodes from experimental
|
|
515
518
|
```
|
|
516
519
|
|
|
@@ -518,23 +521,23 @@ cfd use production
|
|
|
518
521
|
|
|
519
522
|
### Using Logs
|
|
520
523
|
|
|
521
|
-
|
|
524
|
+
Debug logs are your friend when things go wrong:
|
|
522
525
|
|
|
523
526
|
```bash
|
|
524
527
|
# View recent logs
|
|
525
|
-
|
|
528
|
+
cg debug
|
|
526
529
|
|
|
527
530
|
# View all logs
|
|
528
|
-
|
|
531
|
+
cg debug --full
|
|
529
532
|
|
|
530
533
|
# Filter by error level
|
|
531
|
-
|
|
534
|
+
cg debug --level ERROR
|
|
532
535
|
|
|
533
536
|
# View more lines
|
|
534
|
-
|
|
537
|
+
cg debug -n 1000
|
|
535
538
|
|
|
536
539
|
# View workspace logs (for init, import, export issues)
|
|
537
|
-
|
|
540
|
+
cg debug --workspace
|
|
538
541
|
```
|
|
539
542
|
|
|
540
543
|
**Log locations:**
|
|
@@ -554,44 +557,44 @@ Logs rotate automatically at 10MB with 5 backups kept.
|
|
|
554
557
|
**"No workspace found"**
|
|
555
558
|
```bash
|
|
556
559
|
# Make sure you've initialized
|
|
557
|
-
|
|
560
|
+
cg init
|
|
558
561
|
|
|
559
|
-
# Or set
|
|
560
|
-
export
|
|
562
|
+
# Or set COMFYGIT_HOME to point to existing workspace
|
|
563
|
+
export COMFYGIT_HOME=/path/to/workspace
|
|
561
564
|
```
|
|
562
565
|
|
|
563
566
|
**"No active environment"**
|
|
564
567
|
```bash
|
|
565
568
|
# List environments
|
|
566
|
-
|
|
569
|
+
cg list
|
|
567
570
|
|
|
568
571
|
# Set active environment
|
|
569
|
-
|
|
572
|
+
cg use <name>
|
|
570
573
|
|
|
571
574
|
# Or use -e flag
|
|
572
|
-
|
|
575
|
+
cg -e <name> status
|
|
573
576
|
```
|
|
574
577
|
|
|
575
578
|
**Node installation fails**
|
|
576
579
|
```bash
|
|
577
580
|
# Check the logs
|
|
578
|
-
|
|
581
|
+
cg debug --level ERROR
|
|
579
582
|
|
|
580
583
|
# Try repairing the environment
|
|
581
|
-
|
|
584
|
+
cg repair -y
|
|
582
585
|
|
|
583
586
|
# View Python dependency conflicts
|
|
584
|
-
|
|
587
|
+
cg py list
|
|
585
588
|
```
|
|
586
589
|
|
|
587
590
|
**Tab completion not working**
|
|
588
591
|
```bash
|
|
589
592
|
# Check status
|
|
590
|
-
|
|
593
|
+
cg completion status
|
|
591
594
|
|
|
592
595
|
# Reinstall if needed
|
|
593
|
-
|
|
594
|
-
|
|
596
|
+
cg completion uninstall
|
|
597
|
+
cg completion install
|
|
595
598
|
|
|
596
599
|
# Reload shell
|
|
597
600
|
source ~/.bashrc # or ~/.zshrc
|
|
@@ -599,14 +602,14 @@ source ~/.bashrc # or ~/.zshrc
|
|
|
599
602
|
|
|
600
603
|
## Environment Variables
|
|
601
604
|
|
|
602
|
-
- `
|
|
603
|
-
- `
|
|
604
|
-
- `CIVITAI_API_KEY` - CivitAI API key (or use `
|
|
605
|
+
- `COMFYGIT_HOME` - Override default workspace location (`~/comfygit`)
|
|
606
|
+
- `COMFYGIT_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
|
|
607
|
+
- `CIVITAI_API_KEY` - CivitAI API key (or use `cg config --civitai-key`)
|
|
605
608
|
|
|
606
609
|
Example:
|
|
607
610
|
```bash
|
|
608
|
-
export
|
|
609
|
-
|
|
611
|
+
export COMFYGIT_HOME=/mnt/storage/comfygit
|
|
612
|
+
cg init
|
|
610
613
|
```
|
|
611
614
|
|
|
612
615
|
## For Library Users
|