comfygit 0.3.1__py3-none-any.whl
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.3.1.dist-info/METADATA +654 -0
- comfygit-0.3.1.dist-info/RECORD +30 -0
- comfygit-0.3.1.dist-info/WHEEL +4 -0
- comfygit-0.3.1.dist-info/entry_points.txt +3 -0
- comfygit-0.3.1.dist-info/licenses/LICENSE.txt +661 -0
- comfygit_cli/__init__.py +12 -0
- comfygit_cli/__main__.py +6 -0
- comfygit_cli/cli.py +704 -0
- comfygit_cli/cli_utils.py +32 -0
- comfygit_cli/completers.py +239 -0
- comfygit_cli/completion_commands.py +246 -0
- comfygit_cli/env_commands.py +2701 -0
- comfygit_cli/formatters/__init__.py +5 -0
- comfygit_cli/formatters/error_formatter.py +141 -0
- comfygit_cli/global_commands.py +1806 -0
- comfygit_cli/interactive/__init__.py +1 -0
- comfygit_cli/logging/compressed_handler.py +150 -0
- comfygit_cli/logging/environment_logger.py +554 -0
- comfygit_cli/logging/log_compressor.py +101 -0
- comfygit_cli/logging/logging_config.py +97 -0
- comfygit_cli/resolution_strategies.py +89 -0
- comfygit_cli/strategies/__init__.py +1 -0
- comfygit_cli/strategies/conflict_resolver.py +113 -0
- comfygit_cli/strategies/interactive.py +843 -0
- comfygit_cli/strategies/rollback.py +40 -0
- comfygit_cli/utils/__init__.py +12 -0
- comfygit_cli/utils/civitai_errors.py +9 -0
- comfygit_cli/utils/orchestrator.py +252 -0
- comfygit_cli/utils/pagination.py +82 -0
- comfygit_cli/utils/progress.py +128 -0
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: comfygit
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: ComfyGit - Git-based environment management for ComfyUI
|
|
5
|
+
License-File: LICENSE.txt
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: argcomplete>=3.5.0
|
|
8
|
+
Requires-Dist: comfygit-core>=0.3.1
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# ComfyGit CLI
|
|
12
|
+
|
|
13
|
+
Command-line interface for ComfyGit workspace and environment management.
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
The CLI (`cfd` command) provides interactive, user-friendly access to ComfyGit's environment management system. It wraps the `comfygit-core` library with:
|
|
18
|
+
|
|
19
|
+
- **Smart tab completion** - Context-aware shell completion for bash/zsh
|
|
20
|
+
- **Interactive resolution** - User-guided dependency resolution for ambiguous cases
|
|
21
|
+
- **Environment logging** - Automatic logging of all operations per environment
|
|
22
|
+
- **Error formatting** - Translates exceptions into actionable CLI commands
|
|
23
|
+
- **Progress display** - Download progress, ETA, and statistics
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
See the [root README](../../README.md#installation) for installation instructions.
|
|
28
|
+
|
|
29
|
+
TL;DR:
|
|
30
|
+
```bash
|
|
31
|
+
uv tool install comfydock-cli
|
|
32
|
+
# or
|
|
33
|
+
pip install comfydock-cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## CLI-Specific Features
|
|
37
|
+
|
|
38
|
+
### Tab Completion
|
|
39
|
+
|
|
40
|
+
The CLI provides smart shell completion that understands your workspace context:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cfd use <TAB> # Lists all environments
|
|
44
|
+
cfd -e prod node remove <TAB> # Lists installed nodes in 'prod'
|
|
45
|
+
cfd workflow resolve <TAB> # Prioritizes unresolved workflows
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Setup:**
|
|
49
|
+
```bash
|
|
50
|
+
cfd completion install # One-time setup (bash/zsh)
|
|
51
|
+
cfd completion status # Check installation
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The installer:
|
|
55
|
+
1. Detects your shell (.bashrc or .zshrc)
|
|
56
|
+
2. Installs argcomplete if needed (via UV tool)
|
|
57
|
+
3. Adds completion lines to your shell config
|
|
58
|
+
4. Prompts you to reload shell
|
|
59
|
+
|
|
60
|
+
### Interactive Resolution
|
|
61
|
+
|
|
62
|
+
When workflows contain unknown nodes or missing models, the CLI enters interactive mode:
|
|
63
|
+
|
|
64
|
+
**Node Resolution:**
|
|
65
|
+
```
|
|
66
|
+
⚠️ Node not found in registry: MyCustomNode
|
|
67
|
+
🔍 Searching for: MyCustomNode
|
|
68
|
+
|
|
69
|
+
Found 3 potential matches:
|
|
70
|
+
|
|
71
|
+
1. user/my-custom-node (installed)
|
|
72
|
+
A custom node for doing XYZ...
|
|
73
|
+
|
|
74
|
+
2. other-user/custom-node-pack
|
|
75
|
+
Collection of utility nodes
|
|
76
|
+
|
|
77
|
+
3. another/node-collection
|
|
78
|
+
No description
|
|
79
|
+
|
|
80
|
+
[1-5] - Select package to install
|
|
81
|
+
[r] - Refine search
|
|
82
|
+
[m] - Manually enter package ID
|
|
83
|
+
[o] - Mark as optional (workflow works without it)
|
|
84
|
+
[s] - Skip (leave unresolved)
|
|
85
|
+
|
|
86
|
+
Choice [1]/r/m/o/s:
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Model Resolution:**
|
|
90
|
+
```
|
|
91
|
+
⚠️ Model not found: checkpoints/sd_xl_base.safetensors
|
|
92
|
+
in node #12 (CheckpointLoaderSimple)
|
|
93
|
+
|
|
94
|
+
🔍 Searching for: sd_xl_base.safetensors
|
|
95
|
+
|
|
96
|
+
Found 2 matches:
|
|
97
|
+
|
|
98
|
+
1. checkpoints/sd_xl_base_1.0.safetensors (6.46 GB)
|
|
99
|
+
High confidence match
|
|
100
|
+
|
|
101
|
+
2. checkpoints/sd_xl_base_0.9.safetensors (6.17 GB)
|
|
102
|
+
Medium confidence match
|
|
103
|
+
|
|
104
|
+
[r] Refine search
|
|
105
|
+
[d] Download from URL
|
|
106
|
+
[o] Mark as optional
|
|
107
|
+
[s] Skip
|
|
108
|
+
|
|
109
|
+
Choice [1]/r/d/o/s:
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This only happens when the CLI can't automatically resolve dependencies. Most of the time, things "just work."
|
|
113
|
+
|
|
114
|
+
### Environment Logging
|
|
115
|
+
|
|
116
|
+
Every command is logged to environment-specific files:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
~/comfydock/
|
|
120
|
+
└── logs/
|
|
121
|
+
├── production/
|
|
122
|
+
│ ├── full.log # All operations in 'production'
|
|
123
|
+
│ └── full.log.1 # Rotated logs (10MB per file, 5 backups)
|
|
124
|
+
└── workspace.log # Workspace-level operations (init, import, etc)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
View logs:
|
|
128
|
+
```bash
|
|
129
|
+
cfd logs # Last 200 lines of active env
|
|
130
|
+
cfd logs -n 500 # Last 500 lines
|
|
131
|
+
cfd logs --full # All logs (no limit)
|
|
132
|
+
cfd logs --level ERROR # Only errors
|
|
133
|
+
cfd logs --workspace # Workspace logs instead of env
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Logs include:
|
|
137
|
+
- Command invocations
|
|
138
|
+
- Node installations and removals
|
|
139
|
+
- Model downloads and resolutions
|
|
140
|
+
- Git operations
|
|
141
|
+
- UV/Python dependency changes
|
|
142
|
+
- Error stack traces
|
|
143
|
+
|
|
144
|
+
### Error Formatting
|
|
145
|
+
|
|
146
|
+
Core library errors are translated into actionable CLI commands:
|
|
147
|
+
|
|
148
|
+
**Example:**
|
|
149
|
+
```
|
|
150
|
+
✗ Node conflict: Directory 'ComfyUI-Manager' already exists
|
|
151
|
+
Filesystem: https://github.com/ltdrdata/ComfyUI-Manager.git
|
|
152
|
+
Registry: https://github.com/ltdrdata/ComfyUI-Manager.git
|
|
153
|
+
|
|
154
|
+
Suggested actions:
|
|
155
|
+
1. Track existing directory as development node
|
|
156
|
+
→ cfd node add ComfyUI-Manager --dev
|
|
157
|
+
2. Remove and reinstall from registry
|
|
158
|
+
→ cfd node remove ComfyUI-Manager
|
|
159
|
+
→ cfd node add comfyui-manager
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Command Reference
|
|
163
|
+
|
|
164
|
+
### Global Options
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
cfd [options] <command> [args]
|
|
168
|
+
|
|
169
|
+
Options:
|
|
170
|
+
-e, --env NAME Target specific environment (uses active if not specified)
|
|
171
|
+
-v, --verbose Verbose output
|
|
172
|
+
-h, --help Show help
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Workspace Commands
|
|
176
|
+
|
|
177
|
+
Commands that operate at the workspace level (no environment needed):
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Initialize workspace (one-time setup)
|
|
181
|
+
cfd init [PATH]
|
|
182
|
+
--models-dir PATH Point to existing models directory
|
|
183
|
+
--yes, -y Use all defaults, no prompts
|
|
184
|
+
|
|
185
|
+
# List all environments
|
|
186
|
+
cfd list
|
|
187
|
+
|
|
188
|
+
# Import environment from tarball or git
|
|
189
|
+
cfd import [PATH|URL]
|
|
190
|
+
--name NAME Environment name (skips prompt)
|
|
191
|
+
--branch, -b REF Git branch/tag/commit
|
|
192
|
+
--torch-backend BACKEND PyTorch backend (auto/cpu/cu128/rocm6.3/xpu)
|
|
193
|
+
--use Set as active environment after import
|
|
194
|
+
|
|
195
|
+
# Export environment to tarball
|
|
196
|
+
cfd export [PATH]
|
|
197
|
+
--allow-issues Skip confirmation if models lack source URLs
|
|
198
|
+
|
|
199
|
+
# Configuration
|
|
200
|
+
cfd config
|
|
201
|
+
--civitai-key KEY Set CivitAI API key (empty string to clear)
|
|
202
|
+
--show Show current configuration
|
|
203
|
+
|
|
204
|
+
# Registry management
|
|
205
|
+
cfd registry status # Show registry cache status
|
|
206
|
+
cfd registry update # Update registry data from GitHub
|
|
207
|
+
|
|
208
|
+
# Model index (workspace-wide)
|
|
209
|
+
cfd model index find QUERY # Find models by hash/filename
|
|
210
|
+
cfd model index list # List all indexed models
|
|
211
|
+
cfd model index show IDENTIFIER # Show detailed model info
|
|
212
|
+
cfd model index status # Show index status
|
|
213
|
+
cfd model index sync # Scan models directory
|
|
214
|
+
cfd model index dir PATH # Set models directory
|
|
215
|
+
|
|
216
|
+
# Model download (to workspace models directory)
|
|
217
|
+
cfd model download URL
|
|
218
|
+
--path PATH Target path relative to models dir
|
|
219
|
+
-c, --category TYPE Model category for auto-path (checkpoints/loras/vae)
|
|
220
|
+
-y, --yes Skip path confirmation
|
|
221
|
+
|
|
222
|
+
# Model source management
|
|
223
|
+
cfd model add-source [MODEL] [URL] # Interactive if args omitted
|
|
224
|
+
|
|
225
|
+
# Tab completion
|
|
226
|
+
cfd completion install # Install completion for your shell
|
|
227
|
+
cfd completion uninstall # Remove completion
|
|
228
|
+
cfd completion status # Show installation status
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Environment Management
|
|
232
|
+
|
|
233
|
+
Commands that operate ON environments:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# Create new environment
|
|
237
|
+
cfd create NAME
|
|
238
|
+
--template PATH Template manifest
|
|
239
|
+
--python VERSION Python version (default: 3.11)
|
|
240
|
+
--comfyui VERSION ComfyUI version
|
|
241
|
+
--torch-backend BACKEND PyTorch backend (auto/cpu/cu128/rocm6.3/xpu)
|
|
242
|
+
--use Set as active environment
|
|
243
|
+
|
|
244
|
+
# Set active environment
|
|
245
|
+
cfd use NAME
|
|
246
|
+
|
|
247
|
+
# Delete environment
|
|
248
|
+
cfd delete NAME
|
|
249
|
+
-y, --yes Skip confirmation
|
|
250
|
+
|
|
251
|
+
# Show environment status
|
|
252
|
+
cfd status
|
|
253
|
+
-v, --verbose Show full details
|
|
254
|
+
|
|
255
|
+
# Repair environment to match pyproject.toml
|
|
256
|
+
cfd repair
|
|
257
|
+
-y, --yes Skip confirmation
|
|
258
|
+
--models MODE Model download strategy (all/required/skip)
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Environment Operations
|
|
262
|
+
|
|
263
|
+
Commands that operate IN environments (require `-e` or active environment):
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
# Run ComfyUI
|
|
267
|
+
cfd run [COMFYUI_ARGS...]
|
|
268
|
+
--no-sync Skip environment sync before running
|
|
269
|
+
|
|
270
|
+
# View logs
|
|
271
|
+
cfd logs
|
|
272
|
+
-n, --lines N Number of lines (default: 200)
|
|
273
|
+
--level LEVEL Filter by log level (DEBUG/INFO/WARNING/ERROR)
|
|
274
|
+
--full Show all logs (no line limit)
|
|
275
|
+
--workspace Show workspace logs instead of environment logs
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Version Control
|
|
279
|
+
|
|
280
|
+
Git-based versioning for environments:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Commit current state
|
|
284
|
+
cfd commit
|
|
285
|
+
-m, --message MSG Commit message (auto-generated if not provided)
|
|
286
|
+
--auto Auto-resolve issues without interaction
|
|
287
|
+
--allow-issues Allow committing workflows with unresolved issues
|
|
288
|
+
|
|
289
|
+
# View commit history
|
|
290
|
+
cfd commit log
|
|
291
|
+
-v, --verbose Show full details
|
|
292
|
+
|
|
293
|
+
# Rollback to previous state
|
|
294
|
+
cfd rollback [VERSION]
|
|
295
|
+
# No version: Discard uncommitted changes
|
|
296
|
+
# With version (e.g., v1, v2): Restore that commit
|
|
297
|
+
-y, --yes Skip confirmation
|
|
298
|
+
--force Force rollback, discard uncommitted changes
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Git Integration
|
|
302
|
+
|
|
303
|
+
Sync environments via git remotes:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Remote management
|
|
307
|
+
cfd remote add NAME URL # Add git remote
|
|
308
|
+
cfd remote remove NAME # Remove git remote
|
|
309
|
+
cfd remote list # List all remotes
|
|
310
|
+
|
|
311
|
+
# Pull from remote
|
|
312
|
+
cfd pull
|
|
313
|
+
-r, --remote NAME Remote name (default: origin)
|
|
314
|
+
--models MODE Model download strategy (all/required/skip)
|
|
315
|
+
--force Discard uncommitted changes
|
|
316
|
+
|
|
317
|
+
# Push to remote
|
|
318
|
+
cfd push
|
|
319
|
+
-r, --remote NAME Remote name (default: origin)
|
|
320
|
+
--force Force push using --force-with-lease
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Custom Nodes
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Add custom node
|
|
327
|
+
cfd node add IDENTIFIER [IDENTIFIER...]
|
|
328
|
+
# IDENTIFIER can be:
|
|
329
|
+
# - Registry ID: comfyui-manager
|
|
330
|
+
# - GitHub URL: https://github.com/user/repo
|
|
331
|
+
# - GitHub URL with ref: https://github.com/user/repo@v1.0
|
|
332
|
+
# - Directory name (with --dev): my-custom-node --dev
|
|
333
|
+
|
|
334
|
+
--dev Track existing directory as development node
|
|
335
|
+
--no-test Skip dependency resolution test
|
|
336
|
+
--force Force overwrite existing directory
|
|
337
|
+
|
|
338
|
+
# Remove custom node
|
|
339
|
+
cfd node remove IDENTIFIER [IDENTIFIER...]
|
|
340
|
+
--dev Remove development node specifically
|
|
341
|
+
|
|
342
|
+
# List installed nodes
|
|
343
|
+
cfd node list
|
|
344
|
+
|
|
345
|
+
# Update node
|
|
346
|
+
cfd node update IDENTIFIER
|
|
347
|
+
-y, --yes Auto-confirm updates
|
|
348
|
+
--no-test Skip dependency resolution test
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### Workflows
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
# List workflows with status
|
|
355
|
+
cfd workflow list
|
|
356
|
+
|
|
357
|
+
# Resolve workflow dependencies
|
|
358
|
+
cfd workflow resolve NAME
|
|
359
|
+
--auto Auto-resolve without interaction
|
|
360
|
+
--install Auto-install missing nodes
|
|
361
|
+
--no-install Skip node installation prompt
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Python Dependencies
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
# Add Python package
|
|
368
|
+
cfd py add [PACKAGE...]
|
|
369
|
+
-r, --requirements FILE Add from requirements.txt
|
|
370
|
+
--upgrade Upgrade existing packages
|
|
371
|
+
|
|
372
|
+
# Remove Python package
|
|
373
|
+
cfd py remove PACKAGE [PACKAGE...]
|
|
374
|
+
|
|
375
|
+
# List dependencies
|
|
376
|
+
cfd py list
|
|
377
|
+
--all Show all including dependency groups
|
|
378
|
+
|
|
379
|
+
# Manage constraints (UV constraint dependencies)
|
|
380
|
+
cfd constraint add PACKAGE [PACKAGE...] # e.g., torch==2.4.1
|
|
381
|
+
cfd constraint list
|
|
382
|
+
cfd constraint remove PACKAGE [PACKAGE...]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
## Common Workflows
|
|
386
|
+
|
|
387
|
+
### Setting Up a New Project
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
# 1. Initialize workspace (one-time)
|
|
391
|
+
cfd init
|
|
392
|
+
|
|
393
|
+
# During init, you'll be prompted to set up models directory:
|
|
394
|
+
# - Point to existing ComfyUI models directory (recommended)
|
|
395
|
+
# - Or use the default empty directory
|
|
396
|
+
|
|
397
|
+
# 2. Create and activate environment
|
|
398
|
+
cfd create my-project --use
|
|
399
|
+
|
|
400
|
+
# 3. Add custom nodes
|
|
401
|
+
cfd node add comfyui-manager
|
|
402
|
+
cfd node add https://github.com/ltdrdata/ComfyUI-Impact-Pack
|
|
403
|
+
|
|
404
|
+
# 4. Run ComfyUI and build your workflow
|
|
405
|
+
cfd run
|
|
406
|
+
|
|
407
|
+
# 5. Commit your work
|
|
408
|
+
cfd commit -m "Initial setup with Impact Pack"
|
|
409
|
+
|
|
410
|
+
# 6. Export for sharing
|
|
411
|
+
cfd export my-project-v1.tar.gz
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Importing a Shared Project
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
# Import from tarball
|
|
418
|
+
cfd import workflow-pack.tar.gz --name imported-project --use
|
|
419
|
+
|
|
420
|
+
# Or import from git
|
|
421
|
+
cfd import https://github.com/user/comfyui-project.git --name team-project --use
|
|
422
|
+
|
|
423
|
+
# The import process will:
|
|
424
|
+
# 1. Download missing nodes
|
|
425
|
+
# 2. Resolve models from your index (or download if available)
|
|
426
|
+
# 3. Set up Python environment
|
|
427
|
+
# 4. Prepare ComfyUI for running
|
|
428
|
+
|
|
429
|
+
cfd run
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Team Collaboration via Git
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
# On machine 1: Set up and share
|
|
436
|
+
cfd create team-workflow --use
|
|
437
|
+
cfd node add comfyui-animatediff
|
|
438
|
+
# ... build workflow ...
|
|
439
|
+
cfd commit -m "Initial animation workflow"
|
|
440
|
+
|
|
441
|
+
# Add GitHub/GitLab remote
|
|
442
|
+
cfd remote add origin https://github.com/team/comfy-project.git
|
|
443
|
+
cfd push
|
|
444
|
+
|
|
445
|
+
# On machine 2: Clone and work
|
|
446
|
+
cfd import https://github.com/team/comfy-project.git --name team-workflow --use
|
|
447
|
+
# ... make changes ...
|
|
448
|
+
cfd commit -m "Added refiners"
|
|
449
|
+
cfd push
|
|
450
|
+
|
|
451
|
+
# Back on machine 1: Pull updates
|
|
452
|
+
cfd pull
|
|
453
|
+
cfd run
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
### Managing Models Across Environments
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
# Check what models you have
|
|
460
|
+
cfd model index status
|
|
461
|
+
# Output: 124 models indexed in /home/user/models
|
|
462
|
+
|
|
463
|
+
# Find specific model
|
|
464
|
+
cfd model index find "sd_xl"
|
|
465
|
+
# Shows matches with hash, size, file path
|
|
466
|
+
|
|
467
|
+
# Download new model
|
|
468
|
+
cfd model download https://civitai.com/models/133005
|
|
469
|
+
|
|
470
|
+
# Update index after manually adding models
|
|
471
|
+
cfd model index sync
|
|
472
|
+
|
|
473
|
+
# Models are automatically symlinked into environments
|
|
474
|
+
# No duplication, shared across all environments
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Resolving Workflow Dependencies
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# Load a workflow with missing nodes/models
|
|
481
|
+
cfd workflow resolve my-animation
|
|
482
|
+
|
|
483
|
+
# The CLI will:
|
|
484
|
+
# 1. Analyze the workflow
|
|
485
|
+
# 2. Prompt for any unknown nodes (with search/suggestions)
|
|
486
|
+
# 3. Check models against your index
|
|
487
|
+
# 4. Offer to download missing models
|
|
488
|
+
# 5. Update environment to match
|
|
489
|
+
|
|
490
|
+
# For non-interactive use:
|
|
491
|
+
cfd workflow resolve my-animation --auto --install
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Experimenting Without Breaking Production
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# Create experimental environment
|
|
498
|
+
cfd create experimental --use
|
|
499
|
+
|
|
500
|
+
# Install risky nodes
|
|
501
|
+
cfd node add some-experimental-node
|
|
502
|
+
|
|
503
|
+
# If things break:
|
|
504
|
+
cfd rollback # Discard uncommitted changes
|
|
505
|
+
|
|
506
|
+
# Or commit and rollback later:
|
|
507
|
+
cfd commit -m "Testing experimental node"
|
|
508
|
+
# ... test ...
|
|
509
|
+
cfd rollback v1 # Go back to before the commit
|
|
510
|
+
|
|
511
|
+
# When ready to merge changes back to production:
|
|
512
|
+
cfd export experimental.tar.gz
|
|
513
|
+
cfd use production
|
|
514
|
+
# Manually review and selectively add nodes from experimental
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
## Debugging
|
|
518
|
+
|
|
519
|
+
### Using Logs
|
|
520
|
+
|
|
521
|
+
Logs are your friend when things go wrong:
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
# View recent logs
|
|
525
|
+
cfd logs
|
|
526
|
+
|
|
527
|
+
# View all logs
|
|
528
|
+
cfd logs --full
|
|
529
|
+
|
|
530
|
+
# Filter by error level
|
|
531
|
+
cfd logs --level ERROR
|
|
532
|
+
|
|
533
|
+
# View more lines
|
|
534
|
+
cfd logs -n 1000
|
|
535
|
+
|
|
536
|
+
# View workspace logs (for init, import, export issues)
|
|
537
|
+
cfd logs --workspace
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Log locations:**
|
|
541
|
+
```
|
|
542
|
+
~/comfydock/logs/
|
|
543
|
+
├── <env-name>/
|
|
544
|
+
│ ├── full.log # Current log
|
|
545
|
+
│ ├── full.log.1 # First rotation
|
|
546
|
+
│ └── full.log.2 # Second rotation
|
|
547
|
+
└── workspace.log # Workspace-level operations
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
Logs rotate automatically at 10MB with 5 backups kept.
|
|
551
|
+
|
|
552
|
+
### Common Issues
|
|
553
|
+
|
|
554
|
+
**"No workspace found"**
|
|
555
|
+
```bash
|
|
556
|
+
# Make sure you've initialized
|
|
557
|
+
cfd init
|
|
558
|
+
|
|
559
|
+
# Or set COMFYGIT_HOME to point to existing workspace
|
|
560
|
+
export COMFYGIT_HOME=/path/to/workspace
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
**"No active environment"**
|
|
564
|
+
```bash
|
|
565
|
+
# List environments
|
|
566
|
+
cfd list
|
|
567
|
+
|
|
568
|
+
# Set active environment
|
|
569
|
+
cfd use <name>
|
|
570
|
+
|
|
571
|
+
# Or use -e flag
|
|
572
|
+
cfd -e <name> status
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
**Node installation fails**
|
|
576
|
+
```bash
|
|
577
|
+
# Check the logs
|
|
578
|
+
cfd logs --level ERROR
|
|
579
|
+
|
|
580
|
+
# Try repairing the environment
|
|
581
|
+
cfd repair -y
|
|
582
|
+
|
|
583
|
+
# View Python dependency conflicts
|
|
584
|
+
cfd py list
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
**Tab completion not working**
|
|
588
|
+
```bash
|
|
589
|
+
# Check status
|
|
590
|
+
cfd completion status
|
|
591
|
+
|
|
592
|
+
# Reinstall if needed
|
|
593
|
+
cfd completion uninstall
|
|
594
|
+
cfd completion install
|
|
595
|
+
|
|
596
|
+
# Reload shell
|
|
597
|
+
source ~/.bashrc # or ~/.zshrc
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
## Environment Variables
|
|
601
|
+
|
|
602
|
+
- `COMFYGIT_HOME` - Override default workspace location (`~/comfygit`)
|
|
603
|
+
- `COMFYGIT_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
|
|
604
|
+
- `CIVITAI_API_KEY` - CivitAI API key (or use `cfd config --civitai-key`)
|
|
605
|
+
|
|
606
|
+
Example:
|
|
607
|
+
```bash
|
|
608
|
+
export COMFYGIT_HOME=/mnt/storage/comfygit
|
|
609
|
+
cfd init
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
## For Library Users
|
|
613
|
+
|
|
614
|
+
If you want programmatic access without the CLI, use `comfydock-core` directly:
|
|
615
|
+
|
|
616
|
+
```python
|
|
617
|
+
from comfydock_core.factories.workspace_factory import WorkspaceFactory
|
|
618
|
+
|
|
619
|
+
# Load workspace
|
|
620
|
+
workspace = WorkspaceFactory.find()
|
|
621
|
+
|
|
622
|
+
# Get environment
|
|
623
|
+
env = workspace.get_environment("my-project")
|
|
624
|
+
|
|
625
|
+
# Add node
|
|
626
|
+
env.add_node("comfyui-manager")
|
|
627
|
+
|
|
628
|
+
# Commit changes
|
|
629
|
+
env.commit("Added manager")
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
See [packages/core/README.md](../core/README.md) for core library documentation.
|
|
633
|
+
|
|
634
|
+
## Contributing
|
|
635
|
+
|
|
636
|
+
This is a MVP project run by a single developer. Contributions welcome!
|
|
637
|
+
|
|
638
|
+
**Note:** Contributors must sign our [Contributor License Agreement](../../CLA.md) to enable dual-licensing. See [CONTRIBUTING.md](../../CONTRIBUTING.md) for details.
|
|
639
|
+
|
|
640
|
+
**Adding a new command:**
|
|
641
|
+
1. Add command parser in `cli.py` (`_add_global_commands` or `_add_env_commands`)
|
|
642
|
+
2. Implement handler in `global_commands.py` or `env_commands.py`
|
|
643
|
+
3. Add completer in `completers.py` if needed
|
|
644
|
+
4. Update this README
|
|
645
|
+
|
|
646
|
+
**Project structure:**
|
|
647
|
+
- `cli.py` - Argument parser and command router
|
|
648
|
+
- `global_commands.py` - Workspace-level commands
|
|
649
|
+
- `env_commands.py` - Environment-level commands
|
|
650
|
+
- `completion_commands.py` - Tab completion management
|
|
651
|
+
- `strategies/` - Interactive resolution strategies
|
|
652
|
+
- `formatters/` - Error formatting for user-friendly output
|
|
653
|
+
- `logging/` - Environment-specific logging system
|
|
654
|
+
- `utils/` - Progress display, pagination, etc.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
comfygit_cli/__init__.py,sha256=5sMOWsFf9rbB3KXbLkO7t4j3ulg4qIGJq8E1-vBTl2Q,285
|
|
2
|
+
comfygit_cli/__main__.py,sha256=z_vOyb9BrabxD2itKn21Y-mNMHtOt2F1613Jrp0GenE,107
|
|
3
|
+
comfygit_cli/cli.py,sha256=aXNcklwbiZCXA7I7_9MLcpPugNOzvAZLMbT8a46nit4,34846
|
|
4
|
+
comfygit_cli/cli_utils.py,sha256=eief6tK7pWZXc0X8Ngq2qYH7pC1kjAseNS52u_15hj8,1080
|
|
5
|
+
comfygit_cli/completers.py,sha256=x8g09UZT0Rgo3PwU7qFfKHO4lJZNG-ZW82dHXXgubuk,7034
|
|
6
|
+
comfygit_cli/completion_commands.py,sha256=gySLy1Xhs13ZNWsChXqFjUJP8mv-NQ0IVa8p-R_nti0,9013
|
|
7
|
+
comfygit_cli/env_commands.py,sha256=57Ls1itdY7FSQ6cN96GwmehLvrI3or9CAXrIWDyHAxU,115645
|
|
8
|
+
comfygit_cli/global_commands.py,sha256=qhPw0-1AIG_dYlKOV4FgQkx550cH6Kuaad5un_8J9Zg,73438
|
|
9
|
+
comfygit_cli/resolution_strategies.py,sha256=zFz8nhbM3KdXRC0Qd5qILyhd9xlGc3iFnF4VhWZc9jU,2914
|
|
10
|
+
comfygit_cli/formatters/__init__.py,sha256=5S5f0jG2DiRfnGp90n3mvst47KYs6NXxhqN5RO3bGoU,108
|
|
11
|
+
comfygit_cli/formatters/error_formatter.py,sha256=Ipv1iLxvSv9bTBE00OaayL9-7J0s7-EWcMWX3tZ-SP8,4976
|
|
12
|
+
comfygit_cli/interactive/__init__.py,sha256=b5s7fz1N-lTGioDH1JaKJ8_eOhFA3Om1HSMsKqs2BIo,33
|
|
13
|
+
comfygit_cli/logging/compressed_handler.py,sha256=5JMzZMpcbVEFNuzAsLauR7y0D21emMgDIWoR8uqjP2U,5398
|
|
14
|
+
comfygit_cli/logging/environment_logger.py,sha256=TZBk9DaJDLZ74384Sm9LVltYYyBBNuUnCzewsDOrQJY,20274
|
|
15
|
+
comfygit_cli/logging/log_compressor.py,sha256=Kc5G5-m2wl_e7i3LaZ0ihvK9QzAXGUwHsLPNlmwtJuk,3473
|
|
16
|
+
comfygit_cli/logging/logging_config.py,sha256=eV32R-vWBHms54j_dn9NCtN04PQ9vhQTSlg6ouih8yU,3512
|
|
17
|
+
comfygit_cli/strategies/__init__.py,sha256=j_qNVclFQKYvSD0-VYMlLa_S-1GRfUYhGKrAUtJ30Yc,50
|
|
18
|
+
comfygit_cli/strategies/conflict_resolver.py,sha256=0d2KJy-krcVHkjlN71iEaJCTLY8bdVBCDtnZgr8D53A,3657
|
|
19
|
+
comfygit_cli/strategies/interactive.py,sha256=C7rtBtlSHELWdYYUrLQuZVnWukOCd7ZBVt5aCe_-e14,31083
|
|
20
|
+
comfygit_cli/strategies/rollback.py,sha256=kPrXbofqS7dLfsPlpBdj3q7j2bH9NTa95oUnUi5jHJI,1438
|
|
21
|
+
comfygit_cli/utils/__init__.py,sha256=x6tlpKtJa8RqBRCG8ULpjeTZLAl0u9DgflKzG3lrGQg,302
|
|
22
|
+
comfygit_cli/utils/civitai_errors.py,sha256=Cxpb0kB_-Et2LqSIe14W2TACwDMZSwZUYhpGnFnI31U,390
|
|
23
|
+
comfygit_cli/utils/orchestrator.py,sha256=jHNA8s5iHMDFhB2adD-eb2A20Ppr0TOu9735pTlpd48,6876
|
|
24
|
+
comfygit_cli/utils/pagination.py,sha256=NqUke1caumZdaE0TonDVZztlYxLwpbXPn7KzTYOwjs0,2320
|
|
25
|
+
comfygit_cli/utils/progress.py,sha256=8l3Wa6ISSFS_nvMfdjPVJn-A5rxf8dBRGdMJayyKvso,4794
|
|
26
|
+
comfygit-0.3.1.dist-info/METADATA,sha256=MMCtqzMjSA0T0kwhNt-Ud7I315MHAHg92yfhPKZ01RA,16704
|
|
27
|
+
comfygit-0.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
28
|
+
comfygit-0.3.1.dist-info/entry_points.txt,sha256=ZZ4JQRhf6kxfb6qdBXWQi8UyNK9NArY_mlK5Jh0V4pc,78
|
|
29
|
+
comfygit-0.3.1.dist-info/licenses/LICENSE.txt,sha256=ILBn-G3jdarm2w8oOrLmXeJNU3czuJvVhDLBASWdhM8,34522
|
|
30
|
+
comfygit-0.3.1.dist-info/RECORD,,
|