{"id":26889724,"url":"https://github.com/ahamlinman/xt","last_synced_at":"2025-05-09T01:46:39.360Z","repository":{"id":55803284,"uuid":"181240873","full_name":"ahamlinman/xt","owner":"ahamlinman","description":"Translate between JSON, MessagePack, TOML, and YAML","archived":false,"fork":false,"pushed_at":"2025-03-23T19:01:57.000Z","size":2971,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T01:46:35.164Z","etag":null,"topics":["json","messagepack","rust","serde","toml","yaml"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/xt","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahamlinman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-13T23:58:26.000Z","updated_at":"2025-03-23T19:02:01.000Z","dependencies_parsed_at":"2023-02-17T14:15:43.196Z","dependency_job_id":"376de921-e3aa-40f1-bc98-03c52afe949a","html_url":"https://github.com/ahamlinman/xt","commit_stats":{"total_commits":594,"total_committers":1,"mean_commits":594.0,"dds":0.0,"last_synced_commit":"a69982c28eb3949ae56a21a4a74fefc51175bb08"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamlinman%2Fxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamlinman%2Fxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamlinman%2Fxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamlinman%2Fxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahamlinman","download_url":"https://codeload.github.com/ahamlinman/xt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","messagepack","rust","serde","toml","yaml"],"created_at":"2025-03-31T21:19:20.415Z","updated_at":"2025-05-09T01:46:39.340Z","avatar_url":"https://github.com/ahamlinman.png","language":"Rust","readme":"# xt\n\nxt is a cross-format translator for JSON, MessagePack, TOML, and YAML.\n\nFor example, you can process a set of TOML files with [`jq`][jq]:\n\n```sh\n$ xt a/Cargo.lock b/Cargo.lock | jq -r '.package[].name' | sort -u\naho-corasick\nanes\nautocfg\n# etc.\n```\n\nOr transform a JSON configuration file into YAML for easier editing:\n\n```sh\n$ xt -t yaml config.json \u003e config.yaml\n```\n\nOr store an unbounded stream of JSON events as MessagePack to save space:\n\n```sh\n$ curl localhost:8001/apis/events.k8s.io/v1/events?watch | xt -tm \u003e events.msgpack\n```\n\n[jq]: https://jqlang.org/\n\n## Installation\n\nxt is written in [Rust][rust] to leverage the powerful [Serde][serde] ecosystem\nof data serialization and deserialization libraries.\n\nAfter [installing Rust][install rust] on your system, you can install xt\n[from crates.io][crate] using Cargo:\n\n```sh\ncargo install --locked xt\n```\n\n[rust]: https://www.rust-lang.org/\n[serde]: https://serde.rs/\n[install rust]: https://www.rust-lang.org/tools/install\n[crate]: https://crates.io/crates/xt\n\n### NetBSD\n\nOn NetBSD a pre-compiled binary is available from the official repositories. To install it, simply run:\n```sh\npkgin install xt-rs\n```\n\n### Homebrew\n\nOn Linux and macOS, the pre-compiled binaries in this repo's GitHub releases can be installed with [Homebrew][homebrew]:\n```sh\nbrew install ahamlinman/tap/xt\n```\n\n[homebrew]: https://brew.sh/\n\n## Usage and Features\n\n```\nxt [-f format] [-t format] [file ...]\n```\n\nOr, run `xt --help` for full usage information.\n\nxt is built to \"do one thing well,\" and tries to maintain a minimal interface\nand feature set. The most common options are `-t` to specify an output format\nother than JSON, and one or more files to read from rather than standard input.\n\nSome of xt's notable features include:\n\n### Automatic Format Detection\n\nWhen the input format is not specified with the `-f` option, xt can detect it\nautomatically by file extension, or by examining the content of the input stream\nitself.\n\n### Multi-Document Support\n\nWith most output formats, xt can translate multiple input files, each containing\none or more independent documents, to a single output stream. For example, a set\nof YAML files with documents separated by `---` markers can translate to a\nsingle stream of newline-delimited JSON objects. With format detection enabled,\nxt can even translate input files in different formats to a single output.\n\n### Streaming Translation\n\nxt can translate multi-document inputs from unbounded sources like shell pipes\nwith minimal buffering, while still supporting features like automatic format\ndetection. Streaming is enabled automatically whenever it's required.\n\n## License\n\nxt is released under the terms of the MIT License. See `LICENSE.txt` for more\ninformation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahamlinman%2Fxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahamlinman%2Fxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahamlinman%2Fxt/lists"}