Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Morphix

Morphix is a Rust-native universal document transformation engine.

It formats, validates, edits, queries, compares, and converts structured documents while preserving source comments and layout where the formats allow it.

Commands

morphix fmt config.yaml
morphix format config.yaml
morphix fix config.json
morphix check .
morphix validate config.yaml

morphix convert config.yaml --to toml
morphix migrate config.yaml --to toml

morphix diff old.yaml new.yaml
morphix query config.yaml server.port
morphix set config.toml server.port 9090
morphix delete config.json logging.debug

Use - to read standard input and --from <format> when stdin has no filename:

cat config.yaml | morphix convert - --from yaml --to json
cat records.jsonl | morphix fmt - --from jsonl

Converted documents are written to stdout. Loss reports and metadata diagnostics are written to stderr, keeping pipelines safe.

Supported formats

Morphix currently includes adapters for:

JSON       JSONL      JSON5      JSONC
YAML       TOML       RON        HCL
XML        SVG        HTML       Markdown
CSV        TSV        INI        Properties
dotenv     SQL        GraphQL    Dockerfile
nginx

JSONL formatting, validation, and JSONL-to-JSONL conversion use streaming paths for files and stdin.

Comments and conversion loss

Conversion supports four comment policies:

--comments preserve
--comments drop
--comments error
--comments metadata

Use --report-loss to emit a semantic conversion report on stderr. Formats with incompatible models may receive an explicit fallback projection; the report describes the resulting loss.

Development

cargo build
cargo test
cargo run -- fmt golden/input.yaml
cargo run -- validate golden

Golden inputs and expected outputs live in golden/. The integration suite launches the real Morphix executable and compares its output against those fixtures.

License

Not yet selected.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages