From 2be52c153ee0213954a3599592987a58c8179413 Mon Sep 17 00:00:00 2001 From: Yoland Y <4950057+yoland68@users.noreply.github.com> Date: Wed, 1 May 2024 14:23:20 -0700 Subject: [PATCH] WIP: add documentation for dev readme --- DEV_README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/DEV_README.md b/DEV_README.md index 1214879..8bc04c3 100644 --- a/DEV_README.md +++ b/DEV_README.md @@ -28,18 +28,18 @@ env and reinstalling the package (`pip install -e .`) ## Add New Command -- Register it under `comfy/cmdline.py` +- Register it under `comfy_cli/cmdline.py` -If it's contains subcommand, create folder under comfy/command/[new_command] and +If it's contains subcommand, create folder under comfy_cli/command/[new_command] and add the following boilerplate -`comfy/command/[new_command]/__init__.py` +`comfy_cli/command/[new_command]/__init__.py` ``` from .command import app ``` -`comfy/command/[new_command]command.py` +`comfy_cli/command/[new_command]command.py` ``` import typer @@ -59,6 +59,14 @@ def remove(name: str): ``` +## Code explainer: + +- `comfy_cli/cmdline.py` is the entry point of the CLI +- `comfy_cli/command/` contains definition for some commands (e.g. `node`, + `model`, etc) +- `comfy_cli/config_manager.py` implements ConfigManager class that handles + comfy_cli configuration (config.ini) file reading and writing + ## Guide