Add --uv-compile flag to reinstall, update, fix, restore-snapshot, restore-dependencies, and install-deps commands. Each skips per-node pip installs and runs batch uv pip compile after all operations. Change CollectedDeps.sources type to dict[str, list[tuple[str, str]]] to store (pack_path, pkg_spec) per requester. On resolution failure, _run_unified_resolve() cross-references conflict packages with sources using word-boundary regex and displays which node packs requested each conflicting package. Update EN/KO user docs and DESIGN/PRD developer docs to cover the expanded commands and conflict attribution output. Strengthen unit tests for sources tuple format and compile failure attribution. Bump version to 4.1b3.
9.0 KiB
cm-cli: ComfyUI-Manager CLI
cm-cli is a tool that allows you to use various functions of ComfyUI-Manager from the command line without launching ComfyUI.
-= ComfyUI-Manager CLI (V2.24) =-
cm-cli [OPTIONS]
OPTIONS:
[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[install|reinstall|update|fix] node_name ... ?[--uv-compile]
[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[update|fix] all ?[--uv-compile]
[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]
save-snapshot ?[--output <snapshot .json/.yaml>]
restore-snapshot <snapshot .json/.yaml> ?[--pip-non-url] ?[--pip-non-local-url] ?[--pip-local-url] ?[--uv-compile]
restore-dependencies ?[--uv-compile]
install-deps <deps.json> ?[--channel <channel name>] ?[--mode [remote|local|cache]] ?[--uv-compile]
uv-compile
clear
How To Use?
- You can execute it via the
cm-clicommand. - For example, if you want to update all custom nodes:
cm-cli update all
Prerequisite
- It must be run in the same Python environment as the one running ComfyUI.
- If using a venv, you must run it with the venv activated.
- If using a portable version, and you are in the directory with the run_nvidia_gpu.bat file, you should execute the command as follows:
.\python_embeded\python.exe -m cm_cli update all
- The path for ComfyUI must be set with the
COMFYUI_PATHenvironment variable.
Features
1. --channel, --mode
- For viewing information and managing custom nodes, you can set the information database through --channel and --mode.
- For instance, executing the command
cm-cli update all --channel recent --mode remotewill operate based on the latest information from remote rather than local data embedded in the current ComfyUI-Manager repo and will only target the list in the recent channel. - --channel, --mode are only available with the commands
simple-show, show, install, uninstall, update, disable, enable, fix.
2. Viewing Management Information
[simple-show|show] [installed|enabled|not-installed|disabled|all|snapshot|snapshot-list] ?[--channel <channel name>] ?[--mode [remote|local|cache]]
[show|simple-show]-showprovides detailed information, whilesimple-showdisplays information more simply.
Executing a command like cm-cli show installed will display detailed information about the installed custom nodes.
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
[ ENABLED ] ComfyUI-Manager (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Impact-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI-Inspire-Pack (author: Dr.Lt.Data)
[ ENABLED ] ComfyUI_experiments (author: comfyanonymous)
[ ENABLED ] ComfyUI-SAI_API (author: Stability-AI)
[ ENABLED ] stability-ComfyUI-nodes (author: Stability-AI)
[ ENABLED ] comfyui_controlnet_aux (author: Fannovel16)
[ ENABLED ] ComfyUI-Frame-Interpolation (author: Fannovel16)
[ DISABLED ] ComfyUI-Loopchain (author: Fannovel16)
Using a command like cm-cli simple-show installed will simply display information about the installed custom nodes.
-= ComfyUI-Manager CLI (V2.24) =-
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
ComfyUI-Manager
ComfyUI-Impact-Pack
ComfyUI-Inspire-Pack
ComfyUI_experiments
ComfyUI-SAI_API
stability-ComfyUI-nodes
comfyui_controlnet_aux
ComfyUI-Frame-Interpolation
ComfyUI-Loopchain
[installed|enabled|not-installed|disabled|all|snapshot|snapshot-list]
enabled,disabled: Shows nodes that have been enabled or disabled among the installed custom nodes.installed: Shows all nodes that have been installed, regardless of whether they are enabled or disabled.not-installed: Shows a list of custom nodes that have not been installed.all: Shows a list of all custom nodes.snapshot: Displays snapshot information of the currently installed custom nodes. When viewed withshow, it is displayed in JSON format, and withsimple-show, it is displayed simply, along with the commit hash.snapshot-list: Shows a list of snapshot files stored in ComfyUI-Manager/snapshots.
3. Managing Custom Nodes
[install|reinstall|uninstall|update|disable|enable|fix] node_name ... ?[--channel <channel name>] ?[--mode [remote|local|cache]]
- You can apply management functions by listing the names of custom nodes, such as
cm-cli install ComfyUI-Impact-Pack ComfyUI-Inspire-Pack ComfyUI_experiments. - The names of the custom nodes are as shown by
showand are the names of the git repositories. (Plans are to update the use of nicknames in the future.)
[update|disable|enable|fix] all ?[--channel <channel name>] ?[--mode [remote|local|cache]]
-
The
update, disable, enable, fixfunctions can be specified for all. -
Detailed Operations
install: Installs the specified custom nodes.reinstall: Removes and then reinstalls the specified custom nodes.uninstall: Uninstalls the specified custom nodes.update: Updates the specified custom nodes.disable: Disables the specified custom nodes.enable: Enables the specified custom nodes.fix: Attempts to fix dependencies for the specified custom nodes.
--uv-compile flag (install, reinstall, update, fix)
When --uv-compile is specified, per-node pip installs are skipped during node operations.
After all operations complete, uv pip compile resolves the full dependency graph in one batch.
- Requires
uvto be installed. - Prevents dependency conflicts between multiple node packs.
- On resolution failure, displays conflicting packages and which node packs requested them.
reinstall --uv-compileis mutually exclusive with--no-deps.
cm-cli install ComfyUI-Impact-Pack ComfyUI-Inspire-Pack --uv-compile
cm-cli update all --uv-compile
cm-cli fix ComfyUI-Impact-Pack --uv-compile
4. Snapshot Management
cm-cli save-snapshot [--output <snapshot .json/.yaml>]: Saves the current snapshot.- With
--output, you can save a file in .yaml format to any specified path.
- With
cm-cli restore-snapshot <snapshot .json/.yaml>: Restores to the specified snapshot.- If a file exists at the snapshot path, that snapshot is loaded.
- If no file exists at the snapshot path, it is implicitly assumed to be in ComfyUI-Manager/snapshots.
--pip-non-url: Restore for pip packages registered on PyPI.--pip-non-local-url: Restore for pip packages registered at web URLs.--pip-local-url: Restore for pip packages specified by local paths.--user-directory: Set the user directory.--restore-to: The path where the restored custom nodes will be installed. (When this option is applied, only the custom nodes installed in the target path are recognized as installed.)
5. Dependency Restoration
restore-dependencies ?[--uv-compile]
- This command can be used if custom nodes are installed under the
ComfyUI/custom_nodespath but their dependencies are not installed. - It is useful when starting a new cloud instance, like Colab, where dependencies need to be reinstalled and installation scripts re-executed.
- It can also be utilized if ComfyUI is reinstalled and only the custom_nodes path has been backed up and restored.
- Use
--uv-compileto skip per-node pip installs and resolve all dependencies in one batch instead.
6. Install from Dependency File
install-deps <deps.json> ?[--channel <channel name>] ?[--mode [remote|local|cache]] ?[--uv-compile]
- Installs custom nodes specified in a dependency spec file (
.json) or workflow file (.png/.json). - Use
--uv-compileto batch-resolve all dependencies after installation instead of per-node pip.
7. uv-compile
uv-compile ?[--user-directory <path>]
- Batch-resolves and installs all custom node pack dependencies using
uv pip compile. - Useful for environment recovery or initial setup without starting ComfyUI.
- Requires
uvto be installed.
cm-cli uv-compile
cm-cli uv-compile --user-directory /path/to/comfyui
8. Clear
In the GUI, installations, updates, or snapshot restorations are scheduled to execute the next time ComfyUI is launched. The clear command clears this scheduled state, ensuring no pre-execution actions are applied.