comfygit 0.2.0__tar.gz → 0.3.6__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.
Files changed (70) hide show
  1. {comfygit-0.2.0 → comfygit-0.3.6}/CLAUDE.md +10 -10
  2. {comfygit-0.2.0 → comfygit-0.3.6}/PKG-INFO +10 -10
  3. {comfygit-0.2.0 → comfygit-0.3.6}/README.md +8 -8
  4. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/cli.py +68 -1
  5. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/cli_utils.py +1 -1
  6. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/completers.py +1 -1
  7. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/env_commands.py +413 -72
  8. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/global_commands.py +367 -19
  9. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/logging/environment_logger.py +5 -5
  10. comfygit-0.3.6/comfygit_cli/strategies/conflict_resolver.py +113 -0
  11. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/utils/civitai_errors.py +1 -1
  12. comfygit-0.3.6/comfygit_cli/utils/orchestrator.py +252 -0
  13. {comfygit-0.2.0 → comfygit-0.3.6}/docs/codebase-map.md +14 -14
  14. {comfygit-0.2.0 → comfygit-0.3.6}/pyproject.toml +2 -2
  15. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_batch_node_remove.py +69 -2
  16. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_branch_commands.py +23 -15
  17. comfygit-0.3.6/tests/test_conflict_resolver.py +220 -0
  18. comfygit-0.3.6/tests/test_init_system_nodes.py +126 -0
  19. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_logging_structure.py +8 -8
  20. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_manifest_command.py +53 -1
  21. comfygit-0.3.6/tests/test_preview_display.py +280 -0
  22. comfygit-0.3.6/tests/test_status_disabled_nodes_display.py +95 -0
  23. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_status_path_sync_display.py +6 -0
  24. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_status_suggestions.py +4 -4
  25. {comfygit-0.2.0 → comfygit-0.3.6}/.github/workflows/publish_pypi.yml +0 -0
  26. {comfygit-0.2.0 → comfygit-0.3.6}/.gitignore +0 -0
  27. {comfygit-0.2.0 → comfygit-0.3.6}/.python-version +0 -0
  28. {comfygit-0.2.0 → comfygit-0.3.6}/LICENSE.txt +0 -0
  29. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/__init__.py +0 -0
  30. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/__main__.py +0 -0
  31. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/completion_commands.py +0 -0
  32. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/formatters/__init__.py +0 -0
  33. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/formatters/error_formatter.py +0 -0
  34. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/interactive/__init__.py +0 -0
  35. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/logging/compressed_handler.py +0 -0
  36. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/logging/log_compressor.py +0 -0
  37. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/logging/logging_config.py +0 -0
  38. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/resolution_strategies.py +0 -0
  39. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/strategies/__init__.py +0 -0
  40. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/strategies/interactive.py +0 -0
  41. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/strategies/rollback.py +0 -0
  42. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/utils/__init__.py +0 -0
  43. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/utils/pagination.py +0 -0
  44. {comfygit-0.2.0 → comfygit-0.3.6}/comfygit_cli/utils/progress.py +0 -0
  45. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/README_REGISTRY.md +0 -0
  46. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/augment_mappings.py +0 -0
  47. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/build_global_mappings.py +0 -0
  48. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/build_registry_cache.py +0 -0
  49. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/extract_builtin_nodes.py +0 -0
  50. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/extract_node_modules.py +0 -0
  51. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/get_hash.py +0 -0
  52. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/global-node-mappings.md +0 -0
  53. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/registry.py +0 -0
  54. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/registry_client.py +0 -0
  55. {comfygit-0.2.0 → comfygit-0.3.6}/scripts/test_concurrent_api.py +0 -0
  56. {comfygit-0.2.0 → comfygit-0.3.6}/tests/conftest.py +0 -0
  57. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_batch_node_add.py +0 -0
  58. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_completers.py +0 -0
  59. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_completion_commands.py +0 -0
  60. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_detached_head_display.py +0 -0
  61. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_error_formatter.py +0 -0
  62. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_log_command.py +0 -0
  63. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_pagination.py +0 -0
  64. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_py_commands.py +0 -0
  65. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_py_remove_group_commands.py +0 -0
  66. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_status_displays_uninstalled_nodes.py +0 -0
  67. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_status_real_bug_scenario.py +0 -0
  68. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_status_uninstalled_reporting.py +0 -0
  69. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_update_workflow_model_paths.py +0 -0
  70. {comfygit-0.2.0 → comfygit-0.3.6}/tests/test_workflow_model_importance.py +0 -0
@@ -1,7 +1,7 @@
1
- # ComfyDock CLI Package
1
+ # ComfyGit CLI Package
2
2
 
3
3
  ## Overview
4
- CLI interface for ComfyDock, providing command-line tools for workspace and environment management.
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/comfydock_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/comfydock_cli/
22
+ uv run pyright packages/cli/comfygit_cli/
23
23
 
24
24
  # Run both together
25
- uv run mypy packages/cli/comfydock_cli/ && uv run pyright packages/cli/comfydock_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,7 +79,7 @@ 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=comfydock_cli
82
+ uv run pytest packages/cli/tests/ --cov=comfygit_cli
83
83
  ```
84
84
 
85
85
  ## Code Style
@@ -128,8 +128,8 @@ except Exception as e:
128
128
 
129
129
  Before committing CLI changes:
130
130
 
131
- 1. ✅ Run `uv run mypy packages/cli/comfydock_cli/`
132
- 2. ✅ Run `uv run pyright packages/cli/comfydock_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
134
  4. ✅ Test manually with `uv run cfd <command>`
135
135
  5. ✅ Check no red squiggles in IDE
@@ -155,7 +155,7 @@ uv run ruff check --fix packages/cli/
155
155
 
156
156
  ## Dependencies
157
157
 
158
- - **comfydock-core**: Core library (DO NOT couple with CLI specifics)
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
- comfydock_cli/
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.2.0
3
+ Version: 0.3.6
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>=0.2.0
8
+ Requires-Dist: comfygit-core==0.3.6
9
9
  Description-Content-Type: text/markdown
10
10
 
11
- # ComfyDock CLI
11
+ # ComfyGit CLI
12
12
 
13
- Command-line interface for ComfyDock workspace and environment management.
13
+ Command-line interface for ComfyGit workspace and environment management.
14
14
 
15
15
  ## Overview
16
16
 
17
- The CLI (`cfd` command) provides interactive, user-friendly access to ComfyDock's environment management system. It wraps the `comfydock-core` library with:
17
+ The CLI (`cfd` 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
@@ -556,8 +556,8 @@ Logs rotate automatically at 10MB with 5 backups kept.
556
556
  # Make sure you've initialized
557
557
  cfd init
558
558
 
559
- # Or set COMFYDOCK_HOME to point to existing workspace
560
- export COMFYDOCK_HOME=/path/to/workspace
559
+ # Or set COMFYGIT_HOME to point to existing workspace
560
+ export COMFYGIT_HOME=/path/to/workspace
561
561
  ```
562
562
 
563
563
  **"No active environment"**
@@ -599,13 +599,13 @@ source ~/.bashrc # or ~/.zshrc
599
599
 
600
600
  ## Environment Variables
601
601
 
602
- - `COMFYDOCK_HOME` - Override default workspace location (`~/comfydock`)
603
- - `COMFYDOCK_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
602
+ - `COMFYGIT_HOME` - Override default workspace location (`~/comfygit`)
603
+ - `COMFYGIT_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
604
604
  - `CIVITAI_API_KEY` - CivitAI API key (or use `cfd config --civitai-key`)
605
605
 
606
606
  Example:
607
607
  ```bash
608
- export COMFYDOCK_HOME=/mnt/storage/comfydock
608
+ export COMFYGIT_HOME=/mnt/storage/comfygit
609
609
  cfd init
610
610
  ```
611
611
 
@@ -1,10 +1,10 @@
1
- # ComfyDock CLI
1
+ # ComfyGit CLI
2
2
 
3
- Command-line interface for ComfyDock workspace and environment management.
3
+ Command-line interface for ComfyGit workspace and environment management.
4
4
 
5
5
  ## Overview
6
6
 
7
- The CLI (`cfd` command) provides interactive, user-friendly access to ComfyDock's environment management system. It wraps the `comfydock-core` library with:
7
+ The CLI (`cfd` command) provides interactive, user-friendly access to ComfyGit's environment management system. It wraps the `comfygit-core` library with:
8
8
 
9
9
  - **Smart tab completion** - Context-aware shell completion for bash/zsh
10
10
  - **Interactive resolution** - User-guided dependency resolution for ambiguous cases
@@ -546,8 +546,8 @@ Logs rotate automatically at 10MB with 5 backups kept.
546
546
  # Make sure you've initialized
547
547
  cfd init
548
548
 
549
- # Or set COMFYDOCK_HOME to point to existing workspace
550
- export COMFYDOCK_HOME=/path/to/workspace
549
+ # Or set COMFYGIT_HOME to point to existing workspace
550
+ export COMFYGIT_HOME=/path/to/workspace
551
551
  ```
552
552
 
553
553
  **"No active environment"**
@@ -589,13 +589,13 @@ source ~/.bashrc # or ~/.zshrc
589
589
 
590
590
  ## Environment Variables
591
591
 
592
- - `COMFYDOCK_HOME` - Override default workspace location (`~/comfydock`)
593
- - `COMFYDOCK_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
592
+ - `COMFYGIT_HOME` - Override default workspace location (`~/comfygit`)
593
+ - `COMFYGIT_DEV_COMPRESS_LOGS` - Enable compressed logging (dev feature: `true`/`1`/`yes`)
594
594
  - `CIVITAI_API_KEY` - CivitAI API key (or use `cfd config --civitai-key`)
595
595
 
596
596
  Example:
597
597
  ```bash
598
- export COMFYDOCK_HOME=/mnt/storage/comfydock
598
+ export COMFYGIT_HOME=/mnt/storage/comfygit
599
599
  cfd init
600
600
  ```
601
601
 
@@ -65,7 +65,7 @@ def _check_for_old_docker_installation() -> None:
65
65
 
66
66
 
67
67
  def main() -> None:
68
- """Main entry point for ComfyDock CLI."""
68
+ """Main entry point for ComfyGit CLI."""
69
69
  # Enable readline for input() line editing (arrow keys, history)
70
70
  # Unix/Linux/macOS: provides full editing capability
71
71
  # Windows: gracefully falls back to native console editing
@@ -156,6 +156,7 @@ def _add_global_commands(subparsers: argparse._SubParsersAction) -> None:
156
156
  init_parser.add_argument("path", type=Path, nargs="?", help="Workspace directory (default: ~/comfygit)")
157
157
  init_parser.add_argument("--models-dir", type=Path, help="Path to existing models directory to index")
158
158
  init_parser.add_argument("--yes", "-y", action="store_true", help="Use all defaults, no interactive prompts")
159
+ init_parser.add_argument("--bare", action="store_true", help="Create workspace without system nodes (comfygit-manager)")
159
160
  init_parser.set_defaults(func=global_cmds.init)
160
161
 
161
162
  # list - List all environments
@@ -185,6 +186,11 @@ def _add_global_commands(subparsers: argparse._SubParsersAction) -> None:
185
186
  ),
186
187
  )
187
188
  import_parser.add_argument("--use", action="store_true", help="Set imported environment as active")
189
+ import_parser.add_argument(
190
+ "--models",
191
+ choices=["all", "required", "skip"],
192
+ help="Model download strategy: all (default with --yes), required only, or skip"
193
+ )
188
194
  import_parser.add_argument("-y", "--yes", action="store_true", help="Skip confirmation prompts, use defaults for workspace initialization")
189
195
  import_parser.set_defaults(func=global_cmds.import_env)
190
196
 
@@ -287,6 +293,45 @@ def _add_global_commands(subparsers: argparse._SubParsersAction) -> None:
287
293
  completion_status_parser = completion_subparsers.add_parser("status", help="Show tab completion installation status")
288
294
  completion_status_parser.set_defaults(func=completion_cmds.status)
289
295
 
296
+ # Orchestrator management subcommands
297
+ orch_parser = subparsers.add_parser(
298
+ "orch",
299
+ aliases=["orchestrator"],
300
+ help="Monitor and control orchestrator"
301
+ )
302
+ orch_subparsers = orch_parser.add_subparsers(
303
+ dest="orch_command",
304
+ help="Orchestrator commands"
305
+ )
306
+
307
+ # orch status
308
+ orch_status_parser = orch_subparsers.add_parser("status", help="Show orchestrator status")
309
+ orch_status_parser.add_argument("--json", action="store_true", help="Output as JSON")
310
+ orch_status_parser.set_defaults(func=global_cmds.orch_status)
311
+
312
+ # orch restart
313
+ orch_restart_parser = orch_subparsers.add_parser("restart", help="Restart ComfyUI")
314
+ orch_restart_parser.add_argument("--wait", action="store_true", help="Wait for restart to complete")
315
+ orch_restart_parser.set_defaults(func=global_cmds.orch_restart)
316
+
317
+ # orch kill
318
+ orch_kill_parser = orch_subparsers.add_parser("kill", help="Shutdown orchestrator")
319
+ orch_kill_parser.add_argument("--force", action="store_true", help="Force kill (bypass command queue)")
320
+ orch_kill_parser.set_defaults(func=global_cmds.orch_kill)
321
+
322
+ # orch clean
323
+ orch_clean_parser = orch_subparsers.add_parser("clean", help="Clean orchestrator state")
324
+ orch_clean_parser.add_argument("--dry-run", action="store_true", help="Show what would be deleted")
325
+ orch_clean_parser.add_argument("--force", action="store_true", help="Skip confirmation")
326
+ orch_clean_parser.add_argument("--kill", action="store_true", help="Also kill orchestrator process")
327
+ orch_clean_parser.set_defaults(func=global_cmds.orch_clean)
328
+
329
+ # orch logs
330
+ orch_logs_parser = orch_subparsers.add_parser("logs", help="Show orchestrator logs")
331
+ orch_logs_parser.add_argument("-f", "--follow", action="store_true", help="Follow logs in real-time")
332
+ orch_logs_parser.add_argument("-n", "--lines", type=int, default=50, help="Number of lines to show (default: 50)")
333
+ orch_logs_parser.set_defaults(func=global_cmds.orch_logs)
334
+
290
335
 
291
336
  def _add_env_commands(subparsers: argparse._SubParsersAction) -> None:
292
337
  """Add environment-specific commands."""
@@ -341,6 +386,7 @@ def _add_env_commands(subparsers: argparse._SubParsersAction) -> None:
341
386
  manifest_parser = subparsers.add_parser("manifest", help="Show environment manifest (pyproject.toml)")
342
387
  manifest_parser.add_argument("--pretty", action="store_true", help="Output as YAML instead of TOML")
343
388
  manifest_parser.add_argument("--section", type=str, help="Show specific section (e.g., tool.comfygit.nodes)")
389
+ manifest_parser.add_argument("--ide", nargs="?", const="auto", metavar="CMD", help="Open in editor (uses $EDITOR if no command given)")
344
390
  manifest_parser.set_defaults(func=env_cmds.manifest)
345
391
 
346
392
  # repair - Repair environment drift (manual edits or git operations)
@@ -402,6 +448,16 @@ def _add_env_commands(subparsers: argparse._SubParsersAction) -> None:
402
448
  merge_parser = subparsers.add_parser("merge", help="Merge branch into current")
403
449
  merge_parser.add_argument("branch", help="Branch to merge")
404
450
  merge_parser.add_argument("-m", "--message", help="Merge commit message")
451
+ merge_parser.add_argument(
452
+ "--preview",
453
+ action="store_true",
454
+ help="Preview changes without applying (read-only diff with conflict detection)"
455
+ )
456
+ merge_parser.add_argument(
457
+ "--auto-resolve",
458
+ choices=["mine", "theirs"],
459
+ help="Auto-resolve conflicts: 'mine' keeps local, 'theirs' takes incoming"
460
+ )
405
461
  merge_parser.set_defaults(func=env_cmds.merge)
406
462
 
407
463
  # revert - Revert commits
@@ -430,6 +486,16 @@ def _add_env_commands(subparsers: argparse._SubParsersAction) -> None:
430
486
  action="store_true",
431
487
  help="Discard uncommitted changes and force pull"
432
488
  )
489
+ pull_parser.add_argument(
490
+ "--preview",
491
+ action="store_true",
492
+ help="Preview changes without applying (read-only fetch and diff)"
493
+ )
494
+ pull_parser.add_argument(
495
+ "--auto-resolve",
496
+ choices=["mine", "theirs"],
497
+ help="Auto-resolve conflicts: 'mine' keeps local, 'theirs' takes incoming"
498
+ )
433
499
  pull_parser.set_defaults(func=env_cmds.pull)
434
500
 
435
501
  # push - Push commits to remote
@@ -508,6 +574,7 @@ def _add_env_commands(subparsers: argparse._SubParsersAction) -> None:
508
574
  node_remove_parser = node_subparsers.add_parser("remove", help="Remove custom node(s)")
509
575
  node_remove_parser.add_argument("node_names", nargs="+", help="Node registry ID(s) or name(s)").completer = installed_node_completer # type: ignore[attr-defined]
510
576
  node_remove_parser.add_argument("--dev", action="store_true", help="Remove development node specifically")
577
+ node_remove_parser.add_argument("--untrack", action="store_true", help="Only remove from tracking, leave filesystem unchanged")
511
578
  node_remove_parser.set_defaults(func=env_cmds.node_remove)
512
579
 
513
580
  # node prune
@@ -1,4 +1,4 @@
1
- """Utility functions for ComfyDock CLI."""
1
+ """Utility functions for ComfyGit CLI."""
2
2
 
3
3
  import sys
4
4
  from typing import TYPE_CHECKING
@@ -1,4 +1,4 @@
1
- """Custom argcomplete completers for ComfyDock CLI."""
1
+ """Custom argcomplete completers for ComfyGit CLI."""
2
2
  import argparse
3
3
  from typing import Any
4
4