comfy-codesearch
Search code across ComfyUI repositories from the terminal using 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)
comfy-codesearch "<query>"
comfy-codesearch search "<query>"
Repository Search
comfy-codesearch repo "<query>"
Flags
| Flag | Alias | Description |
|---|---|---|
--count <n> | -c | Max results (default: 100). Only for search. |
--format <fmt> | -f | yaml (default) or json |
Query Syntax
Queries support inline filters. The most useful one is repo: to scope searches to a specific repository.
# Search within a specific repo
comfy-codesearch "repo:Comfy-Org/ComfyUI <search_term>"
# Search across all indexed repos
comfy-codesearch "<search_term>"
# Control result count inline or via flag
comfy-codesearch "count:50 <search_term>"
comfy-codesearch "<search_term>" --count 50
Usage Tips
- Use
--format jsonwhen you need to parse the output programmatically or pipe it tojq. - 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
--countlow (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
# 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