Text Search
Grep-in-a-node for your ComfyUI folders
- STRING
This one's exactly what it says: it searches your files for a bit of text and gives you back what it found, as a string, from inside a ComfyUI graph. Think grep, wearing a node costume. It's the most "why is this even a node" entry in a pack whose own tagline is "dumb shit to make life a lil more comfy" - and yet if you've ever kept a sprawling folder of wildcard lists, prompt snippets, or workflow JSON and wanted to find which file mentions a phrase without leaving the canvas, you get why it exists.
The honest framing up front: this isn't an image node, a model node, or anything to do with diffusion. It's a filesystem convenience. You reach for it when you've got text scattered across files on disk and you'd rather query it in place than alt-tab to a terminal.
How it works
You give it a search string and a location on disk. It walks the files under that location, and for each file whose type you've enabled, it checks whether your text appears - in the file's contents, in its filename, or both. Matches come back concatenated into a single STRING output that you can feed into a text encode, a display/preview node, or anything else that takes text.
The inputs and outputs that matter
text- the string you're hunting for.location- the folder (or path) it searches under. This is where it looks, so point it somewhere real.search_in_files(default on) - match against the contents of files.search_in_filenames(default off) - match against the names of files instead of, or as well as, their contents.
Then there's a row of file-type toggles - txt, py, md, yaml, yml, json, js - all off by default. These are the filter for which files get searched. That default matters: with every extension left off, there's nothing for the search to look inside, so turn on the type(s) you actually care about or it comes back empty. Searching your prompt library? Enable txt. Poking through workflow files? json. Digging in node source? py.
The single output is STRING - the search result as text.
How to install it
- ComfyUI Manager - search ComfyUI-kewky_tools, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/KewkLW/ComfyUI-kewky_tools.git, then restart.
Pure Python, no dependencies, no model downloads. It loads instantly.
Common issues & troubleshooting
It returns nothing. The overwhelmingly likely cause: you didn't enable a file type. Every extension toggle (txt, py, md, yaml, yml, json, js) defaults to off, and with none on there's nothing in scope. Switch on the type you're searching and try again. Second most likely: location points somewhere that doesn't contain what you think it does - double-check the path.
Only matching filenames, not contents (or vice versa). That's the search_in_files / search_in_filenames split. Contents-matching is on by default; filename-matching is off. If you're trying to find files named something rather than files containing something, flip search_in_filenames on.
It's slow or heavy on a huge tree. It's reading files off disk, so pointing it at an enormous directory with a lot of enabled types is real I/O work. Aim it at the specific folder you care about rather than the whole ComfyUI root.
Should you even use a node for this? If you're comfortable in a terminal, grep -r does the same job faster and with more power. Text Search earns its keep only when you specifically want the result inside a workflow - piped into a prompt, a display node, or a conditional branch - without leaving ComfyUI. Outside of that, it's a novelty, and that's fine; the pack never pretended otherwise.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | β | |
| location | STRING | β | |
| search_in_files | BOOLEAN | true | β |
| search_in_filenames | BOOLEAN | false | β |
| txtopt | BOOLEAN | false | β |
| pyopt | BOOLEAN | false | β |
| mdopt | BOOLEAN | false | β |
| yamlopt | BOOLEAN | false | β |
| ymlopt | BOOLEAN | false | β |
| jsonopt | BOOLEAN | false | β |
| jsopt | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | β |