{"id":17049871,"url":"https://github.com/jackspirou/pretty","last_synced_at":"2026-05-15T21:39:32.261Z","repository":{"id":74510679,"uuid":"49021092","full_name":"jackspirou/pretty","owner":"jackspirou","description":"A  CLI tool that automatically identifies and formats JSON or XML.","archived":false,"fork":false,"pushed_at":"2016-01-11T19:47:36.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T17:48:58.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackspirou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-04T20:26:13.000Z","updated_at":"2018-02-21T20:31:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"1059f443-6474-4ed2-845a-6742e7085f24","html_url":"https://github.com/jackspirou/pretty","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jackspirou/pretty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fpretty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fpretty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fpretty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fpretty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackspirou","download_url":"https://codeload.github.com/jackspirou/pretty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackspirou%2Fpretty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33080779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T09:55:35.408Z","updated_at":"2026-05-15T21:39:32.246Z","avatar_url":"https://github.com/jackspirou.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pretty [![Go Report Card](http://goreportcard.com/badge/jackspirou/pretty)](http://goreportcard.com/report/jackspirou/pretty)\nA CLI tool that automatically identifies and formats JSON or XML.\nIt is written in Go, is simple, and it has no third party dependencies.\n\n- JSON formatting was tested against a 189.8 MB file, no crashing resulted.\n- XML formatting was tested against a 71.1 MB file, no crashing resulted.\n\n## Install\n### go get\n`$ go get -u github.com/jackspirou/pretty`\n\n### releases\nYou can download a prebuilt binary [here](https://github.com/jackspirou/pretty/releases).\n\n## JSON\nHere is an example of a messy `.json` file:\n```bash\n$ cat messy.json\n{\"type\":\"text\",\"$t\":\"day: Monday, menu: Paninis, baguettes, spaghetti / Chicken curry\"}\n```\n\nLet's make it pretty:\n```bash\n$ cat messy.json | pretty\n{\n\t\"type\": \"text\",\n\t\"$t\": \"day: Monday, menu: Paninis, baguettes, spaghetti / Chicken curry\"\n}\n```\n\nIf you wanted to do something other than print the pretty result to the terminal, pipe it to somewhere:\n```bash\n$ cat messy.json | pretty | somewhere\n```\n\n## XML\nHere is an example of a messy `.xml` file:\n```bash\n$ cat messy.xml\n\u003cconfig\u003e\u003cdiagnostics\u003e\u003cpath\u003eC:\\temp\u003c/path\u003e\n\u003cproxy usedefault=\"true\"/\u003e\u003c/diagnostics\u003e\u003c/config\u003e\n```\n\nLet's make it pretty:\n```bash\n$ cat messy.xml | pretty\n\u003cconfig\u003e\n\t\u003cdiagnostics\u003e\n\t\t\u003cpath\u003eC:\\temp\u003c/path\u003e\n\t\t\u003cproxy usedefault=\"true\"\u003e\u003c/proxy\u003e\n\t\u003c/diagnostics\u003e\n\u003c/config\u003e%\n```\n\nIf you wanted to do something other than print the pretty result to the terminal, pipe it to somewhere:\n```bash\n$ cat messy.xml | pretty | somewhere\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackspirou%2Fpretty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackspirou%2Fpretty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackspirou%2Fpretty/lists"}