{"id":15523348,"url":"https://github.com/maxcountryman/forma","last_synced_at":"2025-08-14T08:13:25.876Z","repository":{"id":37184499,"uuid":"260375925","full_name":"maxcountryman/forma","owner":"maxcountryman","description":"🐚 An opinionated SQL formatter.","archived":false,"fork":false,"pushed_at":"2023-01-20T22:32:02.000Z","size":1863,"stargazers_count":27,"open_issues_count":10,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-22T12:12:08.129Z","etag":null,"topics":["format-sql","formatter","pretty-printer","sql","sql-formatter"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxcountryman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["maxcountryman"]}},"created_at":"2020-05-01T04:03:35.000Z","updated_at":"2024-01-08T23:55:55.000Z","dependencies_parsed_at":"2023-02-12T06:16:34.040Z","dependency_job_id":null,"html_url":"https://github.com/maxcountryman/forma","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/maxcountryman/forma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Fforma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Fforma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Fforma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Fforma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxcountryman","download_url":"https://codeload.github.com/maxcountryman/forma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxcountryman%2Fforma/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385467,"owners_count":24574556,"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","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"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":["format-sql","formatter","pretty-printer","sql","sql-formatter"],"created_at":"2024-10-02T10:44:54.019Z","updated_at":"2025-08-14T08:13:25.740Z","avatar_url":"https://github.com/maxcountryman.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003e\nforma 🐚\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nAn opinionated SQL formatter.\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/maxcountryman/forma/actions?query=branch%3Amain+workflow%3AMain\"\u003e\n\u003cimg src=\"https://github.com/maxcountryman/forma/workflows/Main/badge.svg?branch=main\"/\u003e\n\u003c/a\u003e\n\u003ca href='https://coveralls.io/github/maxcountryman/forma?branch=master'\u003e\u003cimg src='https://coveralls.io/repos/github/maxcountryman/forma/badge.svg?branch=main' alt='Coverage Status' /\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/forma\"\u003e\n\u003cimg src=\"http://meritbadge.herokuapp.com/forma\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"http://docs.rs/formation\"\u003e\n\u003cimg src=\"https://docs.rs/formation/badge.svg\"/\u003e\n\u003c/a\u003e  \n\u003ca href=\"https://maxcountryman.github.io/forma\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/docs-master-green.svg\"/\u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## 📦 Install\n\nThe binary may be installed via `cargo`:\n\n```\n$ cargo install forma\n```\n\nFurther the companion library `formation` may be required as a dependency:\n\n```toml\n[dependencies]\nformation = \"0.3.0\"\n```\n\n## 🤸 Usage\n\n\u003e ⚠️ `forma` should be considered alpha quality, with several known, and many\nmore unknown deficiencies. **Use at your own risk!**\n\nGive `forma` some SQL via a file path or stdin and you'll get back formatted\nSQL.\n\n```\n$ echo \"SELECT * FROM users\" | forma\nselect * from users;\n```\n\nTo format a SQL file, simply give `forma` the file path.\n\n```\n$ forma path/to/some/sql/example.sql\n```\n\nAnd if you'd prefer to not actually format the SQL but know if formatting\nwould happen then use the `--check` flag.\n\nThe binary is a thin wrapper around the `formation` library, which can be used\nin your own applications to format SQL.\n\n```rust\nuse formation::format;\nlet sql = \"SELECT * FROM users;\";\nassert_eq!(\n    format(sql, false, 100).unwrap(),\n    vec![\"select * from users;\\n\".to_owned()]\n);\n```\n\n## 🚧 TODOs\n\n- [ ] Comprehensive `Statement` variant support (currently only `Query`)\n- [ ] Support for comments (these will be eaten by the formatter!)\n- [ ] Parameterized dialects\n","funding_links":["https://github.com/sponsors/maxcountryman"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcountryman%2Fforma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxcountryman%2Fforma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxcountryman%2Fforma/lists"}