Skip to content

Global Commands

Workspace-level commands that operate on the entire ComfyGit workspace.

init

Usage:

cg init [-h] [--models-dir MODELS_DIR] [--yes] [path]

Arguments:

  • path - Workspace directory (default: ~/comfygit) (optional)

Options:

  • --models-dir - Path to existing models directory to index
  • --yes, -y - Use all defaults, no interactive prompts (default: False)

list

Usage:

cg list [-h]

import

Usage:

cg import [-h] [--name NAME] [--branch BRANCH]
                 [--torch-backend BACKEND] [--use] [-y]
                 [path]

Arguments:

  • path - Path to .tar.gz file or git repository URL (use #subdirectory for subdirectory imports) (optional)

Options:

  • --name - Name for imported environment (skip prompt)
  • --branch, -b - Git branch, tag, or commit to import (git imports only)
  • --torch-backend - PyTorch backend. Examples: auto (detect GPU), cpu, cu128 (CUDA 12.8), cu126, cu124, rocm6.3 (AMD), xpu (Intel). Default: auto (default: auto)
  • --use - Set imported environment as active (default: False)
  • -y, --yes - Skip confirmation prompts, use defaults for workspace initialization (default: False)

export

Usage:

cg export [-h] [--allow-issues] [path]

Arguments:

  • path - Path to output file (optional)

Options:

  • --allow-issues - Skip confirmation if models are missing source URLs (default: False)

model

Usage:

cg model [-h] {index,download,add-source} ...

Subcommands

index

Usage:

cg model index [-h] {find,list,show,status,sync,dir} ...

Subcommands

find

Usage:

cg model index find [-h] query

Arguments:

  • query - Search query (hash prefix or filename)

list

Usage:

cg model index list [-h] [--duplicates]

Options:

  • --duplicates - Show only models with multiple locations (default: False)

show

Usage:

cg model index show [-h] identifier

Arguments:

  • identifier - Model hash, hash prefix, filename, or path

status

Usage:

cg model index status [-h]

sync

Usage:

cg model index sync [-h]

dir

Usage:

cg model index dir [-h] path

Arguments:

  • path - Path to models directory

download

Usage:

cg model download [-h] [--path PATH] [-c CATEGORY] [-y] url

Arguments:

  • url - Model download URL (Civitai, HuggingFace, or direct)

Options:

  • --path - Target path relative to models directory (e.g., checkpoints/model.safetensors)
  • -c, --category - Model category for auto-path (e.g., checkpoints, loras, vae)
  • -y, --yes - Skip path confirmation prompt (default: False)

add-source

Usage:

cg model add-source [-h] [model] [url]

Arguments:

  • model - Model filename or hash (omit for interactive mode) (optional)
  • url - Download URL (optional)

registry

Usage:

cg registry [-h] {status,update} ...

Subcommands

status

Usage:

cg registry status [-h]

update

Usage:

cg registry update [-h]

config

Usage:

cg config [-h] [--civitai-key CIVITAI_KEY] [--uv-cache UV_CACHE] [--show]

Options:

  • --civitai-key - Set Civitai API key (use empty string to clear)
  • --uv-cache - Set external UV cache path (use empty string to clear)
  • --show - Show current configuration (default: False)

debug

Usage:

cg debug [-h] [-n LINES] [--level {DEBUG,INFO,WARNING,ERROR}] [--full]
                [--workspace]

Options:

  • -n, --lines - Number of lines to show (default: 200) (default: 200)
  • --level - Filter by log level (choices: DEBUG, INFO, WARNING, ERROR)
  • --full - Show all logs (no line limit) (default: False)
  • --workspace - Show workspace logs instead of environment logs (default: False)

orch (alias: orchestrator)

Manage the ComfyUI orchestrator process.

Usage:

cg orch [-h] {status,restart,kill,clean,logs} ...

Subcommands

status

Show orchestrator status.

Usage:

cg orch status [-h] [--json]

Options:

  • --json - Output as JSON (default: False)

restart

Restart ComfyUI.

Usage:

cg orch restart [-h] [--wait]

Options:

  • --wait - Wait for restart to complete (default: False)

kill

Shutdown orchestrator.

Usage:

cg orch kill [-h] [--force]

Options:

  • --force - Force kill (bypass command queue) (default: False)

clean

Clean orchestrator state.

Usage:

cg orch clean [-h] [--dry-run] [--force] [--kill]

Options:

  • --dry-run - Show what would be deleted (default: False)
  • --force - Skip confirmation (default: False)
  • --kill - Also kill orchestrator process (default: False)

logs

Show orchestrator logs.

Usage:

cg orch logs [-h] [-f] [-n LINES]

Options:

  • -f, --follow - Follow logs in real-time (default: False)
  • -n, --lines - Number of lines to show (default: 50) (default: 50)

workspace

Workspace management operations.

Usage:

cg workspace [-h] {cleanup} ...

Subcommands

cleanup

Remove legacy workspace artifacts.

Usage:

cg workspace cleanup [-h] [--force]

Options:

  • --force - Skip verification and force cleanup (default: False)