{"id":13561805,"url":"https://github.com/mdgriffith/elm-codegen","last_synced_at":"2025-05-16T04:04:10.758Z","repository":{"id":41853097,"uuid":"366409784","full_name":"mdgriffith/elm-codegen","owner":"mdgriffith","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-30T19:39:07.000Z","size":8328,"stargazers_count":140,"open_issues_count":29,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-11T23:52:39.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://package.elm-lang.org/packages/mdgriffith/elm-codegen/latest/","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdgriffith.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":"2021-05-11T14:26:18.000Z","updated_at":"2025-05-09T12:33:10.000Z","dependencies_parsed_at":"2024-03-31T16:43:50.701Z","dependency_job_id":null,"html_url":"https://github.com/mdgriffith/elm-codegen","commit_stats":{"total_commits":602,"total_committers":11,"mean_commits":54.72727272727273,"dds":0.1843853820598007,"last_synced_commit":"f9c596e804101cf9abf44539b23277475a3cea4d"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdgriffith%2Felm-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdgriffith","download_url":"https://codeload.github.com/mdgriffith/elm-codegen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464891,"owners_count":22075570,"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":[],"created_at":"2024-08-01T13:01:01.382Z","updated_at":"2025-05-16T04:04:10.741Z","avatar_url":"https://github.com/mdgriffith.png","language":"Elm","funding_links":[],"categories":["Elm","Code generators"],"sub_categories":["Individual Podcast episodes"],"readme":"# Elm CodeGen\n\nElm CodeGen is an **Elm package** and **CLI tool** for generating Elm code.\n\n- [Here we are on NPM](https://www.npmjs.com/package/elm-codegen)\n- [And the code docs on the Elm package website](https://package.elm-lang.org/packages/mdgriffith/elm-codegen/latest/)\n\nThe goal is to be easier to write and more maintainable than that string template you have lying around. 😏\n\nHere's what this tool does for you in order to make generating code simpler.\n\n1. **Automatic imports** — Import declarations are calculated.\n2. **Built in type inference** — The types for your generated code are inferred, which means generated things can figure out their own type signatures.\n3. **Use existing packages easily** — For generating code that uses a specific _library_ such as [`elm-ui`](https://package.elm-lang.org/packages/mdgriffith/elm-ui/latest/), the `elm-codegen` CLI can create some Elm code to help you out.\n   Check out the [Using packages](https://github.com/mdgriffith/elm-codegen/tree/main/guide/UsingHelpers.md) guide to get a better idea of what this looks like!\n\nTo get started, here's a small example to give you an idea of what the code looks like!\n\n```elm\nElm.declaration \"anExample\"\n    (Elm.record\n        [ (\"name\", Elm.string \"a fancy string!\")\n        , (\"fancy\", Elm.bool True)\n        ]\n    )\n    |\u003e Elm.ToString.declaration\n```\n\nThe above will generate the following string:\n\n```elm\nanExample : { name : String, fancy : Bool }\nanExample =\n    { name = \"a fancy string!\"\n    , fancy = True\n    }\n```\n\n## Check out the guide!\n\n- [Getting started](https://github.com/mdgriffith/elm-codegen/tree/main/guide/GettingStarted.md)\n- [Writing a generator](https://github.com/mdgriffith/elm-codegen/tree/main/guide/WritingAGenerator.md)\n- [Using packages/helpers](https://github.com/mdgriffith/elm-codegen/tree/main/guide/UsingHelpers.md)\n- [Running via TypeScript](https://github.com/mdgriffith/elm-codegen/tree/main/guide/UsingElmCodeGenInTypeScript.md)\n\nAnd finally, the [elm-codegen package documentation](https://package.elm-lang.org/packages/mdgriffith/elm-codegen/latest/).\n\n## Using the CLI\n\n```\nnpm install -g elm-codegen\n```\n\nThen you can start a codegen project using:\n\n```\nelm-codegen init\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdgriffith%2Felm-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdgriffith%2Felm-codegen/lists"}