comfygit 0.4.2__tar.gz → 0.6.0__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 (44) hide show
  1. {comfygit-0.4.2 → comfygit-0.6.0}/PKG-INFO +4 -4
  2. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/cli.py +19 -0
  3. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/cli_utils.py +6 -10
  4. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/completers.py +7 -10
  5. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/env_commands.py +553 -422
  6. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/formatters/error_formatter.py +1 -1
  7. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/global_commands.py +90 -76
  8. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/resolution_strategies.py +1 -2
  9. comfygit-0.6.0/comfygit_cli/strategies/confirmation.py +26 -0
  10. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/strategies/conflict_resolver.py +1 -1
  11. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/strategies/interactive.py +4 -7
  12. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/update_commands.py +0 -1
  13. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/__init__.py +2 -0
  14. comfygit-0.6.0/comfygit_cli/utils/formatting.py +10 -0
  15. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/orchestrator.py +3 -1
  16. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/progress.py +8 -4
  17. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/update_checker.py +4 -3
  18. {comfygit-0.4.2 → comfygit-0.6.0}/pyproject.toml +5 -4
  19. comfygit-0.4.2/comfygit_cli/serve_executor.py +0 -1000
  20. comfygit-0.4.2/comfygit_cli/serve_runtime.py +0 -2948
  21. comfygit-0.4.2/comfygit_cli/serve_state.py +0 -905
  22. comfygit-0.4.2/comfygit_cli/studio_static/assets/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
  23. comfygit-0.4.2/comfygit_cli/studio_static/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
  24. comfygit-0.4.2/comfygit_cli/studio_static/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
  25. comfygit-0.4.2/comfygit_cli/studio_static/assets/index-AxBlFaca.js +0 -17
  26. comfygit-0.4.2/comfygit_cli/studio_static/assets/index-BDmIh9tA.css +0 -1
  27. comfygit-0.4.2/comfygit_cli/studio_static/index.html +0 -14
  28. {comfygit-0.4.2 → comfygit-0.6.0}/.gitignore +0 -0
  29. {comfygit-0.4.2 → comfygit-0.6.0}/LICENSE.txt +0 -0
  30. {comfygit-0.4.2 → comfygit-0.6.0}/README.md +0 -0
  31. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/__init__.py +0 -0
  32. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/__main__.py +0 -0
  33. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/completion_commands.py +0 -0
  34. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/formatters/__init__.py +0 -0
  35. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/interactive/__init__.py +0 -0
  36. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/logging/compressed_handler.py +0 -0
  37. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/logging/environment_logger.py +0 -0
  38. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/logging/log_compressor.py +0 -0
  39. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/logging/logging_config.py +0 -0
  40. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/strategies/__init__.py +0 -0
  41. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/strategies/rollback.py +0 -0
  42. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/civitai_errors.py +0 -0
  43. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/pagination.py +0 -0
  44. {comfygit-0.4.2 → comfygit-0.6.0}/comfygit_cli/utils/update_notice.py +0 -0
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfygit
3
- Version: 0.4.2
3
+ Version: 0.6.0
4
4
  Summary: ComfyGit - Git-based environment management for ComfyUI
5
5
  Project-URL: Documentation, https://docs.comfygit.org/
6
6
  Project-URL: Repository, https://github.com/comfygit-ai/comfygit
7
7
  Project-URL: Issues, https://github.com/comfygit-ai/comfygit/issues
8
8
  License-File: LICENSE.txt
9
9
  Requires-Python: >=3.10
10
- Requires-Dist: aiohttp>=3.13.4
11
10
  Requires-Dist: argcomplete>=3.5.0
12
- Requires-Dist: comfygit-core==0.4.2
13
- Requires-Dist: requests>=2.33.0
11
+ Requires-Dist: comfygit-core==0.6.0
12
+ Requires-Dist: comfygit-studio==0.6.0
13
+ Requires-Dist: requests>=2.32.4
14
14
  Description-Content-Type: text/markdown
15
15
 
16
16
  # ComfyGit CLI
@@ -2,6 +2,7 @@
2
2
  # PYTHON_ARGCOMPLETE_OK
3
3
 
4
4
  import argparse
5
+ import os
5
6
  import sys
6
7
  from collections.abc import Callable
7
8
  from importlib.metadata import PackageNotFoundError, version
@@ -75,8 +76,25 @@ def _check_for_old_docker_installation() -> None:
75
76
  warning_flag.touch()
76
77
 
77
78
 
79
+ def _configure_stdio_encoding() -> None:
80
+ """Avoid Windows terminal encoding crashes for Unicode status output."""
81
+ if os.name != "nt":
82
+ return
83
+
84
+ for stream in (sys.stdout, sys.stderr):
85
+ reconfigure = getattr(stream, "reconfigure", None)
86
+ if reconfigure is None:
87
+ continue
88
+ try:
89
+ reconfigure(errors="replace")
90
+ except (OSError, ValueError):
91
+ continue
92
+
93
+
78
94
  def main() -> None:
79
95
  """Main entry point for ComfyGit CLI."""
96
+ _configure_stdio_encoding()
97
+
80
98
  # Enable readline for input() line editing (arrow keys, history)
81
99
  # Unix/Linux/macOS: provides full editing capability
82
100
  # Windows: gracefully falls back to native console editing
@@ -374,6 +392,7 @@ def _add_global_commands(subparsers: argparse._SubParsersAction) -> None:
374
392
 
375
393
  # Legacy flags - still supported at root level for backward compatibility
376
394
  config_parser.add_argument("--civitai-key", type=str, help="Set Civitai API key (use empty string to clear)")
395
+ config_parser.add_argument("--huggingface-token", type=str, help="Set Hugging Face token for gated model downloads (use empty string to clear)")
377
396
  config_parser.add_argument("--github-token", type=str, help="Set GitHub token for private git repository access (use empty string to clear)")
378
397
  config_parser.add_argument("--uv-cache", type=str, help="Set external UV cache path (use empty string to clear)")
379
398
  config_parser.add_argument("--show", action="store_true", help="Show current configuration")
@@ -1,21 +1,17 @@
1
1
  """Utility functions for ComfyGit CLI."""
2
2
 
3
3
  import sys
4
- from typing import TYPE_CHECKING
5
4
 
6
- from comfygit_core.factories.workspace_factory import WorkspaceFactory
7
- from comfygit_core.models.exceptions import CDWorkspaceNotFoundError
5
+ from comfygit_core import Workspace
6
+ from comfygit_core.models import CDWorkspaceNotFoundError
8
7
 
9
8
  from .logging.environment_logger import WorkspaceLogger
10
9
 
11
- if TYPE_CHECKING:
12
- from comfygit_core.core.workspace import Workspace
13
10
 
14
-
15
- def get_workspace_or_exit() -> "Workspace":
11
+ def get_workspace_or_exit() -> Workspace:
16
12
  """Get workspace or exit with error message."""
17
13
  try:
18
- workspace = WorkspaceFactory.find()
14
+ workspace = Workspace.open()
19
15
  # Initialize workspace logging
20
16
  WorkspaceLogger.set_workspace_path(workspace.path)
21
17
  return workspace
@@ -23,10 +19,10 @@ def get_workspace_or_exit() -> "Workspace":
23
19
  print("✗ No workspace initialized. Run 'cg init' first.")
24
20
  sys.exit(1)
25
21
 
26
- def get_workspace_optional() -> "Workspace | None":
22
+ def get_workspace_optional() -> Workspace | None:
27
23
  """Get workspace if it exists."""
28
24
  try:
29
- workspace = WorkspaceFactory.find()
25
+ workspace = Workspace.open()
30
26
  # Initialize workspace logging
31
27
  WorkspaceLogger.set_workspace_path(workspace.path)
32
28
  return workspace
@@ -3,10 +3,8 @@ import argparse
3
3
  from typing import Any
4
4
 
5
5
  from argcomplete.io import warn
6
- from comfygit_core.core.environment import Environment
7
- from comfygit_core.core.workspace import Workspace
8
- from comfygit_core.factories.workspace_factory import WorkspaceFactory
9
- from comfygit_core.models.exceptions import CDWorkspaceNotFoundError
6
+ from comfygit_core import Environment, Workspace
7
+ from comfygit_core.models import CDWorkspaceNotFoundError
10
8
 
11
9
  # ============================================================================
12
10
  # Shared Utilities
@@ -15,7 +13,7 @@ from comfygit_core.models.exceptions import CDWorkspaceNotFoundError
15
13
  def get_workspace_safe() -> Workspace | None:
16
14
  """Get workspace or return None if not initialized."""
17
15
  try:
18
- return WorkspaceFactory.find()
16
+ return Workspace.open()
19
17
  except CDWorkspaceNotFoundError:
20
18
  return None
21
19
  except Exception as e:
@@ -161,9 +159,8 @@ def branch_completer(prefix: str, parsed_args: argparse.Namespace, **kwargs: Any
161
159
  return []
162
160
 
163
161
  try:
164
- # Get branches (returns list of (name, is_current) tuples)
165
162
  branches = env.list_branches()
166
- names = [name for name, _ in branches]
163
+ names = [branch.name for branch in branches]
167
164
  return filter_by_prefix(names, prefix)
168
165
 
169
166
  except Exception as e:
@@ -193,7 +190,7 @@ def commit_hash_completer(prefix: str, parsed_args: argparse.Namespace, **kwargs
193
190
  history = env.get_commit_history(limit=50)
194
191
 
195
192
  # Return only hashes for clean completion
196
- hashes = [commit['hash'] for commit in history]
193
+ hashes = [commit.hash for commit in history]
197
194
  return filter_by_prefix(hashes, prefix)
198
195
 
199
196
  except Exception as e:
@@ -224,11 +221,11 @@ def ref_completer(prefix: str, parsed_args: argparse.Namespace, **kwargs: Any) -
224
221
 
225
222
  # Priority 1: Branches (most common for checkout)
226
223
  branches = env.list_branches()
227
- candidates.extend([name for name, _ in branches])
224
+ candidates.extend([branch.name for branch in branches])
228
225
 
229
226
  # Priority 2: Recent commits
230
227
  history = env.get_commit_history(limit=50)
231
- candidates.extend([commit['hash'] for commit in history])
228
+ candidates.extend([commit.hash for commit in history])
232
229
 
233
230
  return filter_by_prefix(candidates, prefix)
234
231