Split large XML files into smaller, version-control–friendly pieces and reassemble them back into the original file.
Built for deeply nested XML such as Salesforce metadata (permission sets, profiles, flows, bots), where a single file can run to tens of thousands of lines and every change produces a noisy diff.
Breaking change in 0.12.0: support for JSON, JSON5, JSONC, YAML, TOON, TOML, and INI input files was removed. Those formats are far simpler to split and merge than XML, and the project now focuses on XML. The
json,json5,jsonc,yaml,toon,toml, andinisubcommands and thedisassemble,reassemble,format, andmetalibrary modules no longer exist. If you need them, pinconfig-disassembler = "0.11". XML can still be split into JSON, JSON5, or YAML files with--format.
cargo install config-disassemblerSplit an XML file:
config-disassembler xml disassemble flow.xml --unique-id-elements name,idResult:
flow/
├── assignments/
├── decisions/
├── screens/
└── flow-meta.xml
Rebuild it:
config-disassembler xml reassemble flowThe output matches the original flow.xml.
config-disassembler xml <command> [options]
Commands:
disassemble <path> Split an XML file, or every XML file under a directory
reassemble <path> Rebuild the original XML file from a disassembled directory
Run config-disassembler xml --help for every option.
| Option | Description |
|---|---|
--unique-id-elements <list> |
Fields used to name split files |
--strategy <name> |
unique-id (default) or grouped-by-tag |
--format <fmt> |
Split-file format: xml (default), json, json5, yaml |
--ignore-path <path> |
Ignore file path (default .cdignore) |
--prepurge |
Remove existing output before writing |
--postpurge |
Remove input after success |
XML can be split into XML, JSON, JSON5, or YAML files and is always reassembled back into XML.
See docs/xml.md for every option, plus:
- unique-id and grouped-by-tag strategies
- split tags
- multi-level disassembly
- sidecar elements
- round-trip verification
Directory disassembly supports .gitignore-style filtering using .cdignore.
Example:
**/generated/
**/Legacy_*.permissionset-meta.xml
Usage:
config-disassembler xml disassemble force-app/main/default/permissionsetsuse config_disassembler::xml::{
DisassembleXmlFileHandler, ReassembleXmlFileHandler,
verify_roundtrip, RoundtripStatus, VerifyOptions,
};See docs/xml.md for round-trip verification.
Node.js support is available via napi-rs bindings: config-disassembler-node
See CONTRIBUTING.md.