Lathe icon

Lathe

Describe what to change in a rules file - Lathe applies it to your JSON, YAML, XML or .properties files, and can convert between formats along the way.

Key features

  • Four data formats Read and write JSON, YAML, XML and flat key=value files (.properties / .env) - in any combination.
  • Declarative rules Replace, set, add, remove, rename and move values, cast types and validate data - described once in a JSON rules file.
  • In-place edits keep comments Editing a JSON, YAML, .properties or .env file at its own path changes only the values your rules touch - comments, indentation and quoting stay as you wrote them. In-place runs back up the original first.
  • Preview before you write --diff, --dry-run and --check leave the disk untouched.
  • Built for pipelines --check exits 6 when a file is out of date - ideal for pre-commit hooks and CI gates.
  • Whole directories Process every file in a folder, recursively, and split or merge YAML document streams.

Example

One command turns string values into real types and renames the app:

Lathe config.json rules.json output.json
[
  { "path": "app.name", "action": "ReplaceValue", "newValue": "MyApp Pro" },
  { "path": "app.debug", "action": "CastValue", "transform": "boolean" },
  { "path": "database.port", "action": "CastValue", "transform": "number" }
]

At a glance

Platform
Windows command-line tool
Price
Free
Download
Lathe.zip (423 KB)
Formats
JSON, YAML, XML, .properties, .env
Package
Lathe.exe, README.md and sample input, rules and output files