Skip to content

Commit

Permalink
WIP: add documentation for dev readme
Browse files Browse the repository at this point in the history
  • Loading branch information
yoland68 committed May 1, 2024
1 parent 74d5dc9 commit 2be52c1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions DEV_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 2be52c1

Please sign in to comment.