# comfy-codesearch Search code across ComfyUI repositories from the terminal using [cs.comfy.org](https://cs.comfy.org). ## When to Use Use this skill when you need to: - Find code examples, implementations, or patterns across ComfyUI ecosystem repos - Look up how a specific function, class, or API is used in ComfyUI - Search for node definitions, custom node implementations, or workflow patterns - Find which repository contains specific code - Understand how ComfyUI internals work by searching the source ## Commands ### Code Search (default) ```bash comfy-codesearch "" comfy-codesearch search "" ``` ### Repository Search ```bash comfy-codesearch repo "" ``` ## Flags | Flag | Alias | Description | |------|-------|-------------| | `--count ` | `-c` | Max results (default: 100). Only for `search`. | | `--format ` | `-f` | `yaml` (default) or `json` | ## Query Syntax Queries support inline filters. The most useful one is `repo:` to scope searches to a specific repository. ```bash # Search within a specific repo comfy-codesearch "repo:Comfy-Org/ComfyUI " # Search across all indexed repos comfy-codesearch "" # Control result count inline or via flag comfy-codesearch "count:50 " comfy-codesearch "" --count 50 ``` ## Usage Tips - **Use `--format json`** when you need to parse the output programmatically or pipe it to `jq`. - **Use `--format yaml`** (default) when reading results directly — it's more compact and readable. - **Scope with `repo:`** to reduce noise when you know which repository to search. - **Keep `--count` low** (e.g. 10-20) when you only need a few examples to save time. - Results include file paths, line numbers, and matching code snippets. ## Examples ```bash # Find how last_node_id is used in the main ComfyUI repo comfy-codesearch "repo:Comfy-Org/ComfyUI last_node_id" # Search for video/audio transcription code across all repos comfy-codesearch "video audio transcription" # Get top 10 results as JSON comfy-codesearch "PromptServer" --count 10 --format json # Find repos related to comfy comfy-codesearch repo "comfy" # Search for a Python class definition comfy-codesearch "class CLIPTextEncode" # Find workflow API usage patterns comfy-codesearch "repo:Comfy-Org/ComfyUI /prompt" --count 20 ```