09 ZMongo Content Pack Alias Editor
Rename, relabel, retype, or drop fields — ZMongo 09 Content Pack Alias Editor
- content_pack
- content_pack
- manifest_json
- preview_markdown
- aliases
- data_types
- indexed
- success
09 Content Pack Alias Editor is the cleanup node for ZMongo content packs. It takes a ZMONGO_CONTENT_PACK and lets you rename fields (aliases), change their labels, override their data types, and drop fields you don't want - all in one pass. It's the "tidy up the bundle before you save it" node.
Content packs accumulate fields as you chain Add nodes together: Add Image drops in hero_image, Add Images adds image00…, some other node adds text and numbers. Before you save the pack to the database or ship it to a project, you'll often want the aliases to match your conventions - hero_image should be cover, image00 should be frame_01, and that leftover debug field should be gone. That's exactly what this node does, declaratively, with JSON maps instead of manual editing.
How it works
You pass the pack plus four optional JSON/CSV inputs:
alias_map_json- rename fields. A JSON object mapping existing alias (or source path) to a new alias, e.g.{"hero_image": "cover"}.label_map_json- relabel:{"hero_image": "Cover Image"}. Missing labels get re-derived from the alias.type_overrides_json- force a field's type:{"cover": "STRING"}. This is how you retype a field to match what downstream nodes expect.drop_fields_csv- a comma-separated list of aliases or source paths to remove.
Aliases are deduplicated (_unique_alias ensures renames can't collide), so you can't accidentally end up with two fields named the same. The output pack is a deep copy - your input pack isn't mutated, which is nice for repeatable pipelines.
Outputs: the edited content_pack, manifest_json, preview_markdown, aliases, data_types, indexed, and success.
The inputs that matter
content_pack- required. If you feed a non-pack, you getsuccess: falseand a "No valid content pack" preview.alias_map_json- the one you'll use most.drop_fields_csv- for slimming packs down.
Everything else defaults to {} or empty, meaning "make no change."
Install
Standard:
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
cd ComfyUI-ZMongo
pip install -r requirements.txt
or ComfyUI Manager → "ComfyUI-ZMongo" → restart. No session or model downloads - pure in-memory work.
Troubleshooting
success: false/ "No valid content pack" - the input isn't a pack. Chain it from another pack node.- Renames silently didn't apply - the map keys must match the existing aliases (or source paths) exactly. Check
aliasesoutput against youralias_map_jsonkeys; a typo means "no match, no change." - Dropped field still there -
drop_fields_csvmatches alias or source path; if neither matches, nothing is dropped. Confirm the exact alias. - Duplicate-looking aliases after a rename - the editor dedupes and renames collisions, so you may see a suffix appear. That's the dedupe working, not a bug.
Alias Editor is the "polish before publish" step in the content-pack pipeline - the difference between a bundle that's usable as-is and one that forces you to remember a stranger's naming. Cheap, fast, worth having in the chain before 09 Content Pack Save.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — | |
| alias_map_jsonopt | STRING | {} | — |
| label_map_jsonopt | STRING | {} | — |
| type_overrides_jsonopt | STRING | {} | — |
| drop_fields_csvopt | STRING | — | |
| refresh_tokenopt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — |
| manifest_json | STRING | — |
| preview_markdown | STRING | — |
| aliases | * | — |
| data_types | * | — |
| indexed | STRING | — |
| success | BOOLEAN | — |