{"id":15691395,"url":"https://github.com/anandchowdhary/carpent","last_synced_at":"2025-04-30T14:42:22.299Z","repository":{"id":38175047,"uuid":"272042307","full_name":"AnandChowdhary/carpent","owner":"AnandChowdhary","description":"🔨 Bootstrap and configure any project using its template","archived":false,"fork":false,"pushed_at":"2024-06-17T20:33:15.000Z","size":11567,"stargazers_count":3,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T22:25:39.960Z","etag":null,"topics":["bootstrapping","cli","node-ts","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://anandchowdhary.github.io/carpent/","language":"TypeScript","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/AnandChowdhary.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":"2020-06-13T16:08:43.000Z","updated_at":"2022-07-03T11:04:16.000Z","dependencies_parsed_at":"2024-10-23T23:08:18.235Z","dependency_job_id":"caba7f07-aac9-4c8e-9714-9fa39147b985","html_url":"https://github.com/AnandChowdhary/carpent","commit_stats":{"total_commits":48,"total_committers":3,"mean_commits":16.0,"dds":"0.22916666666666663","last_synced_commit":"671cae44e8fcd8953d13117b3307b56e0af0b159"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"AnandChowdhary/node.ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fcarpent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fcarpent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fcarpent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fcarpent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnandChowdhary","download_url":"https://codeload.github.com/AnandChowdhary/carpent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251722839,"owners_count":21633025,"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":["bootstrapping","cli","node-ts","nodejs","typescript"],"created_at":"2024-10-03T18:21:21.794Z","updated_at":"2025-04-30T14:42:22.264Z","avatar_url":"https://github.com/AnandChowdhary.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔨 Carpent\n\nBootstrap and configure any project using its template -- clone a repository, update data using variables, and more.\n\n[![Node CI](https://img.shields.io/github/workflow/status/AnandChowdhary/carpent/Node%20CI?label=GitHub%20CI\u0026logo=github)](https://github.com/AnandChowdhary/carpent/actions)\n[![Travis CI](https://img.shields.io/travis/AnandChowdhary/carpent?label=Travis%20CI\u0026logo=travis%20ci\u0026logoColor=%23fff)](https://travis-ci.org/AnandChowdhary/carpent)\n[![Coverage](https://coveralls.io/repos/github/AnandChowdhary/carpent/badge.svg?branch=master\u0026v=2)](https://coveralls.io/github/AnandChowdhary/carpent?branch=master)\n[![Dependencies](https://img.shields.io/librariesio/release/npm/carpent)](https://libraries.io/npm/carpent)\n[![License](https://img.shields.io/npm/l/carpent)](https://github.com/AnandChowdhary/carpent/blob/master/LICENSE)\n[![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/carpent.svg)](https://snyk.io/test/npm/carpent)\n[![Based on Carpent](https://img.shields.io/badge/based%20on-node.ts-brightgreen)](https://github.com/AnandChowdhary/node.ts)\n[![npm type definitions](https://img.shields.io/npm/types/carpent.svg)](https://unpkg.com/browse/carpent/dist/index.d.ts)\n[![npm package](https://img.shields.io/npm/v/carpent.svg)](https://www.npmjs.com/package/node.ts)\n[![npm downloads](https://img.shields.io/npm/dw/carpent)](https://www.npmjs.com/package/node.ts)\n[![Contributors](https://img.shields.io/github/contributors/AnandChowdhary/carpent)](https://github.com/AnandChowdhary/carpent/graphs/contributors)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n[![npm](https://nodei.co/npm/carpent.png)](https://www.npmjs.com/package/carpent)\n\n## 💡 Usage\n\nIf you want to quickly bootstrap a project, use `npx`:\n\n```bash\nnpx carpent\n```\n\n![Example screen recording](./assets/carpent.gif)\n\nAlternately, you can install the package globally from [npm](https://www.npmjs.com/package/carpent):\n\n```bash\nnpm install --global carpent\n```\n\nUse the CLI:\n\n```bash\ncarpet\n```\n\nOr, import and use the API:\n\n```ts\nimport { carpet } from \"carpet\";\n\ncarpet({\n  repo: \"https://github.com/AnandChowdhary/carpet\",\n  // ...all configuration options here (see API Configuration)\n});\n```\n\n### Setting up Carpent with your template\n\nIf you're building a template repository that others can use, you can add Carpent by creating a `.carpentrc` file in the root with the following schema:\n\n```json\n{\n  \"questions\": [], // Configuration questions to ask\n  \"deleteFiles\": [], // List of files to delete\n  \"beforeAll\": [], // Scripts to run before process\n  \"afterAll\": [] // Scripts to run after process\n}\n```\n\nFor example:\n\n```json\n{\n  \"deleteFiles\": [\".carpentrc\"], // Delete the .carpentrc file\n  \"questions\": [\n    {\n      \"name\": \"name\", // `name` is required in each input\n      \"type\": \"input\", // Let users type an input response\n      \"message\": \"Project name\", // Ask them this question\n      \"files\": [\"package.json\"], // Update the package.json file\n      \"jsonKey\": \"name\" // Change the `name` key in package.json\n    }\n  ],\n  \"afterAll\": [\"echo 'Completed!'\"] // Run this script at the end\n}\n```\n\nEach question under `questions` support the following properties:\n\n| Property             | Description                                                                     |\n| -------------------- | ------------------------------------------------------------------------------- |\n| `name` (required)    | Internal name for question                                                      |\n| `type` (required)    | One of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js)'s question types |\n| `message` (required) | Question to ask the user                                                        |\n| `default`            | Default value for this answer                                                   |\n| `choices`            | Let users select one of these options                                           |\n| `files`              | Update these files                                                              |\n| `jsonKey`            | Update this JSON key                                                            |\n| `find`               | Find this value for replacing                                                   |\n| `replace`            | Repace with this value                                                          |\n\n### API Configuration\n\nYou can specify a key-value pair as the API parameter with the following properties:\n\n| Property            | Description                   | Default       |\n| ------------------- | ----------------------------- | ------------- |\n| `repo`              | Git repository URL            | _Required_    |\n| `dir`               | Path to directory to create   | `\"carpent\"`   |\n| `license`           | License                       | `MIT License` |\n| `licenseName`       | Full name for license         |               |\n| `initializeNewRepo` | Initialize new git repository | `false`       |\n\n## 👩‍💻 Development\n\nBuild TypeScript:\n\n```bash\nnpm run build\n```\n\nRun unit tests and view coverage:\n\n```bash\nnpm run test-without-reporting\n```\n\n## 📄 License\n\n[MIT](./LICENSE) © [Anand Chowdhary](https://anandchowdhary.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fcarpent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandchowdhary%2Fcarpent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fcarpent/lists"}