{"id":43564328,"url":"https://github.com/ucpr/atlas-hcl-gen-go","last_synced_at":"2026-02-03T21:16:41.888Z","repository":{"id":183273658,"uuid":"669739058","full_name":"ucpr/atlas-hcl-gen-go","owner":"ucpr","description":"Generate Go code from atlas HCL schema","archived":false,"fork":false,"pushed_at":"2025-12-03T01:06:06.000Z","size":121,"stargazers_count":2,"open_issues_count":10,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T21:59:41.492Z","etag":null,"topics":["atlas","code-generation","go"],"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/ucpr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-23T09:15:42.000Z","updated_at":"2025-09-08T09:15:35.000Z","dependencies_parsed_at":"2023-12-12T18:20:01.050Z","dependency_job_id":"ce45d3c9-2f24-4372-98f4-2967022eb8ec","html_url":"https://github.com/ucpr/atlas-hcl-gen-go","commit_stats":null,"previous_names":["ucpr/atlas-hcl-gen-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ucpr/atlas-hcl-gen-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucpr%2Fatlas-hcl-gen-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucpr%2Fatlas-hcl-gen-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucpr%2Fatlas-hcl-gen-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucpr%2Fatlas-hcl-gen-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucpr","download_url":"https://codeload.github.com/ucpr/atlas-hcl-gen-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucpr%2Fatlas-hcl-gen-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29057369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: 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":["atlas","code-generation","go"],"created_at":"2026-02-03T21:16:41.081Z","updated_at":"2026-02-03T21:16:41.878Z","avatar_url":"https://github.com/ucpr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## atlas-hcl-gen-go\n\nThis is a command to generate Go struct from [Atlas HCL Schema](https://atlasgo.io/atlas-schema/hcl).\n\n## Usage\n\nInstall the command.\n\n```sh\ngo install github.com/ucpr/atlas-hcl-gen-go\n```\n\nGenerate Go struct from Atlas HCL Schema.\n\n```sh\natlas-hcl-gen-go -f schema.hcl -o output.go\n```\n\n## Example\n\nThe input data uses the schema written in HCL below.\n\n```hcl:schema.hcl\nschema \"market\" {}\n\ntable \"users\" {\n  schema = schema.market\n  column \"name\" {\n    type = text\n  }\n  column \"updated_at\" {\n    type = int\n  }\n  column \"created_at\" {\n    type = int\n  }\n}\n```\n\nExecute the command.\n\n```sh\natlas-hcl-gen-go -i schema.hcl -o output.go\n```\n\nThe following Go struct will be generated.\n\n```go:output.go\n// Code generated by github.com/ucpr/atlas-hcl-gen-go. DO NOT EDIT.\n// atlas-hcl-gen-go: 922707f-dirty\n// source: testdata/schema.hcl\n\npackage main\n\ntype Users struct {\n\tName      int `db:\"name\"`\n\tUpdatedAt int `db:\"updated_at\"`\n\tCreatedAt int `db:\"created_at\"`\n}\n```\n\n\n## TODO\n\n- [ ] Support some types\n- [x] Support some RDBMS schemas (MySQL, PostgreSQL, SQLite, ...)\n\n## Contributing\n\nContributions of any kind welcome!\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucpr%2Fatlas-hcl-gen-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucpr%2Fatlas-hcl-gen-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucpr%2Fatlas-hcl-gen-go/lists"}