{"id":26047975,"url":"https://github.com/codemod-com/codemod-template","last_synced_at":"2025-04-10T15:26:32.212Z","repository":{"id":270765448,"uuid":"910850139","full_name":"codemod-com/codemod-template","owner":"codemod-com","description":"An ease-of-life template repo for framework builders and codemod creators to host codemods and automate publishing to the codemod registry.","archived":false,"fork":false,"pushed_at":"2025-03-02T16:16:48.000Z","size":309,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T13:21:20.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/codemod-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-01T16:16:04.000Z","updated_at":"2025-03-02T16:16:52.000Z","dependencies_parsed_at":"2025-03-02T17:22:45.524Z","dependency_job_id":null,"html_url":"https://github.com/codemod-com/codemod-template","commit_stats":null,"previous_names":["codemod-com/codemod-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemod-com%2Fcodemod-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemod-com%2Fcodemod-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemod-com%2Fcodemod-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codemod-com%2Fcodemod-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codemod-com","download_url":"https://codeload.github.com/codemod-com/codemod-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243445,"owners_count":21071054,"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":"2025-03-07T23:40:51.004Z","updated_at":"2025-04-10T15:26:32.186Z","avatar_url":"https://github.com/codemod-com.png","language":"TypeScript","readme":"# Codemod Template\n\nCodemods, public or private, are preferred to reside in repositories owned by the main organization of their respective projects.\n\nThis repository serves as a template for codemod packages, allowing contributors to quickly whip up a repository for their published codemods.\n\nThis template repository comes pre-configured with a GitHub workflow that automatically publishes the latest version of your codemod, eliminating the need to [manually publish codemods](https://go.codemod.com/codemod-publish-doc) after making updates.\n\n## Preparing repository\n\n1. Click **Use this template**.\n\n   ![alt text](assets/use-template.png)\n2. Select **Create a new repository** and enter your new repository details.\n3. **Login** with [Codemod CLI](https://go.codemod.com/cli-docs): `codemod login`.\n4. Generate a **Codemod API key**: `codemod api-keys:create`.\n5. Place your API key in a **new repository secret** under `Settings \u003e Secrets and Variables \u003e Actions`.\n\n   ![alt text](assets/codemod-api-secret.png)\n6. [Create](https://go.codemod.com/build-codemod-docs) or move your codemod package(s) under the `codemods` directory. Note that your codemods should conform to the [required package structure](https://go.codemod.com/package-structure). Additionally, make sure that your `codemodrc.json` file is accurate ([reference](https://go.codemod.com/codemodrc-docs)).\n\nBy doing so, any change made to the `main` branch of your repository will automatically be published to [Codemod Registry](https://codemod.com/registry).\n\n## Running codemods\n\nTo run your codemods use [`codemod`](https://go.codemod.com/github) command below:\n\n```console\n$ npx codemod [codemod-name]\n```\n\n- `codemod-name` - name of transform. use the name of your codemod in [Codemod Registry](https://codemod.com/registry).\n\nSee the [codemod CLI doc](https://go.codemod.com/cli-docs) for a full list of available commands and options.\n\n\u003e [!IMPORTANT]\n\u003e After using this template, it's recommended that you update this README with:\n\u003e\n\u003e 1. details about what your codemod does (e.g. before/after code snippets)\n\u003e 2. a link to the published codemod in Codemod Registry\n\u003e 3. the accurate run command.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemod-com%2Fcodemod-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodemod-com%2Fcodemod-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodemod-com%2Fcodemod-template/lists"}