{"id":35524076,"url":"https://github.com/wasilibs/go-prettier","last_synced_at":"2026-06-02T03:00:57.518Z","repository":{"id":241708381,"uuid":"807466676","full_name":"wasilibs/go-prettier","owner":"wasilibs","description":"A \"go run\"able version of prettier, great for markdown and yaml","archived":false,"fork":false,"pushed_at":"2026-06-01T02:47:52.000Z","size":36316,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-01T04:17:13.779Z","etag":null,"topics":["formatting","markdown","prettier","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wasilibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-29T06:50:48.000Z","updated_at":"2026-06-01T02:47:55.000Z","dependencies_parsed_at":"2024-06-19T03:56:38.088Z","dependency_job_id":"9ccf6b49-d2f6-444e-94e9-b2324373607f","html_url":"https://github.com/wasilibs/go-prettier","commit_stats":null,"previous_names":["wasilibs/go-prettier"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/wasilibs/go-prettier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilibs%2Fgo-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilibs%2Fgo-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilibs%2Fgo-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilibs%2Fgo-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasilibs","download_url":"https://codeload.github.com/wasilibs/go-prettier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilibs%2Fgo-prettier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33803734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["formatting","markdown","prettier","yaml"],"created_at":"2026-01-04T00:28:23.964Z","updated_at":"2026-06-02T03:00:57.512Z","avatar_url":"https://github.com/wasilibs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-prettier\n\ngo-prettier is a distribution of [prettier][1], that can be built with Go. It does not actually reimplement core\nfunctionality of prettier in Go (though does reimplement the CLI), instead packaging it with the lightweight JS\nruntime [QuickJS][3], and executing with the pure Go Wasm runtime [wazero][2]. This means that `go install` or `go run`\ncan be used to execute it, with no need to rely on separate package managers such as pnpm, on any platform that Go\nsupports.\n\nPrettier can format files like YAML and Markdown which are commonly used in Go projects, and integrates well\nwith IDEs like VSCode. This project is primarily designed for Go, or other non-JS projects, that would like to\nstill use prettier to format such non-logic files.\n\n## Include prettier plugins\n\nExternal plugins are not supported because the entire bundle must be compiled to Wasm. We currently bundle all\nstandard prettier plugins (e.g., JS, YAML, Markdown) along with the following third-party plugins:\n\n- [prettier-plugin-sh][4]: shell, Dockerfile, properties, etc\n- prettier-plugin-go: a custom plugin included in this bundle which formats Go code using `gofmt`. Not intended\n  to be used to format Go source files but will allow snippets in markdown files to be formatted.\n\n## Behavior differences\n\n- If `.gitignore` is specified as an ignore path (included by default), all `.gitignore` files found searching\n  up to a `.git` directory will be used. Prettier only looks in the current directory. We have changed the\n  behavior since it seems most intuitive for `.gitignore` to be applied in the same way as git. This will\n  generally result in less files to process without changing the result on actual source-controlled files.\n  `.prettierignore` or any other ignore file will only be resolved against the current directory.\n- External plugins are not supported.\n- Caching is not supported.\n- Config must be JSON, YAML, or TOML. JS configs are not supported.\n- Formatting options via CLI flags are not supported. Use a prettier config to make sure it is reflected\n  in IDE integrations.\n- Performance is worse for many files. The intent is to format a few yaml or markdown type files\n  in a Go repository but not to replace formatting in a full NodeJS project. It is recommended to specify globs\n  for the files that should be formatted rather than relying on auto-detection on a large directory.\n- Other minor features, mostly for editor integration, are not supported. Check the CLI usage for what flags\n  are supported.\n\n## Installation\n\n_Due to [potential build breakage](https://github.com/golang/go/issues/71192) unrelated to this project, `go tool` is not supported.\nMost popular CLIs don't support `go tool` so just avoid it._\n\nPrecompiled binaries are available in the [releases](https://github.com/wasilibs/go-prettier/releases).\nAlternatively, install the plugin you want using `go install`.\n\n```bash\ngo install github.com/wasilibs/go-prettier/cmd/prettier@latest\n```\n\nTo avoid installation entirely, it can be convenient to use `go run`\n\n```bash\ngo run github.com/wasilibs/go-prettier/cmd/prettier@latest -o formatted.md unformatted.md\n```\n\n[1]: https://github.com/prettier/prettier\n[2]: https://wazero.io/\n[3]: https://bellard.org/quickjs/\n[4]: https://github.com/un-ts/prettier/tree/master/packages/sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasilibs%2Fgo-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasilibs%2Fgo-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasilibs%2Fgo-prettier/lists"}