{"id":13682910,"url":"https://github.com/uetchy/create-create-app","last_synced_at":"2025-04-08T03:11:25.392Z","repository":{"id":38210145,"uuid":"213143160","full_name":"uetchy/create-create-app","owner":"uetchy","description":"⚡️ Create your own `create-something` app.","archived":false,"fork":false,"pushed_at":"2024-03-16T06:55:26.000Z","size":13404,"stargazers_count":99,"open_issues_count":24,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T18:19:41.256Z","etag":null,"topics":["app-template","command-line","create-app"],"latest_commit_sha":null,"homepage":"","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/uetchy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2019-10-06T09:46:38.000Z","updated_at":"2025-02-26T11:34:57.000Z","dependencies_parsed_at":"2024-06-18T15:28:30.567Z","dependency_job_id":"98766efa-afc9-4c4b-b285-fba5e461bb7c","html_url":"https://github.com/uetchy/create-create-app","commit_stats":{"total_commits":183,"total_committers":8,"mean_commits":22.875,"dds":0.07103825136612019,"last_synced_commit":"69a87e3b0282d79d88b4d69c2811ee1c5aa82371"},"previous_names":["uetchy/create-whatever"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uetchy%2Fcreate-create-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uetchy%2Fcreate-create-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uetchy%2Fcreate-create-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uetchy%2Fcreate-create-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uetchy","download_url":"https://codeload.github.com/uetchy/create-create-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"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":["app-template","command-line","create-app"],"created_at":"2024-08-02T13:01:55.323Z","updated_at":"2025-04-08T03:11:25.372Z","avatar_url":"https://github.com/uetchy.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","command-line"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003e✨ Create Create App\u003c/h1\u003e\n\u003ch6\u003eCreate your own `create-something` app.\u003c/h6\u003e\n\u003cbr/\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/uetchy/create-create-app/master/.github/assets/ss1.png\" alt=\"screenshot\"/\u003e\n\u003cbr/\u003e\u003cbr/\u003e\n\u003ca href=\"https://npmjs.org/package/create-create-app\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/create-create-app.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://npmjs.org/package/create-create-app\"\u003e\u003cimg src=\"https://badgen.net/npm/dt/create-create-app\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/uetchy/create-create-app/actions?workflow=test\"\u003e\u003cimg src=\"https://github.com/uetchy/create-create-app/workflows/test/badge.svg\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Why?\n\n- ⚖️ **Built-in License selector** No need to worry about license things.\n- 🎩 **Template engine** You can use template strings in text files, file names, and folder names.\n- 💄 **Highly customizable** Can change caveat text, add extra command-line options.\n\n## Table of contents\n\n\u003c!-- START mdmod {use: 'toc'} --\u003e\n\n\n- [✨ Create Create App](#-create-create-app)\n  - [Why?](#why)\n  - [Table of contents](#table-of-contents)\n  - [Quick Start](#quick-start)\n    - [1. Bootstrap your project](#1-bootstrap-your-project)\n    - [2. Add and edit template files](#2-add-and-edit-template-files)\n    - [3. Build the app (TypeScript only)](#3-build-the-app-typescript-only)\n    - [4. Publish package to npm](#4-publish-package-to-npm)\n    - [5. PROFIT](#5-profit)\n  - [Template](#template)\n    - [Advanced: Multiple templates](#advanced-multiple-templates)\n    - [Helper functions](#helper-functions)\n      - [`upper`](#upper)\n      - [`lower`](#lower)\n      - [`capital`](#capital)\n      - [`camel`](#camel)\n      - [`snake`](#snake)\n      - [`kebab`](#kebab)\n      - [`space`](#space)\n      - [`uuid`](#uuid)\n  - [Config](#config)\n    - [templateRoot (required)](#templateroot-required)\n    - [modifyName (default: `undefined`)](#modifyname-default-undefined)\n    - [extra (default: `undefined`)](#extra-default-undefined)\n    - [defaultDescription (default: `description`)](#defaultdescription-default-description)\n    - [defaultAuthor (default: `user.name` in `~/.gitconfig` otherwise `Your name`)](#defaultauthor-default-username-in-gitconfig-otherwise-your-name)\n    - [defaultEmail (default: `user.email` in `~/.gitconfig` otherwise `Your email`)](#defaultemail-default-useremail-in-gitconfig-otherwise-your-email)\n    - [defaultTemplate (default: `default`)](#defaulttemplate-default-default)\n    - [defaultLicense (default: `MIT`)](#defaultlicense-default-mit)\n    - [defaultPackageManager (default: `undefined`)](#defaultpackagemanager-default-undefined)\n    - [promptForDescription (default: `true`)](#promptfordescription-default-true)\n    - [promptForAuthor (default: `true`)](#promptforauthor-default-true)\n    - [promptForEmail (default: `true`)](#promptforemail-default-true)\n    - [promptForTemplate (default: `false`)](#promptfortemplate-default-false)\n    - [promptForLicense (default: `true`)](#promptforlicense-default-true)\n    - [promptForPackageManager (default: `false`)](#promptforpackagemanager-default-false)\n    - [skipGitInit (default: `false`)](#skipgitinit-default-false)\n    - [skipNpmInstall (default: `false`)](#skipnpminstall-default-false)\n    - [after (default: `undefined`)](#after-default-undefined)\n    - [caveat (default: `undefined`)](#caveat-default-undefined)\n    - [`AfterHookOptions`](#afterhookoptions)\n  - [Showcase](#showcase)\n  - [Contribution](#contribution)\n    - [Contributors ✨](#contributors-)\n\n\u003c!-- END mdmod --\u003e\n\n## Quick Start\n\nLet's create `create-greet` package in five steps.\n\n### 1. Bootstrap your project\n\n```shell\nnpx create-create-app greet  # simplest route\nnpm init create-app greet    # requires npm 6+\nyarn create create-app greet # requires Yarn 0.25+\n```\n\nYou will then be asked about your project.\n\n![screenshot](https://raw.githubusercontent.com/uetchy/create-create-app/master/.github/assets/ss1.png)\n\n### 2. Add and edit template files\n\n```shell\ncd create-greet\n```\n\nThen you can see the `templates/default` folder where the actual template files go.\n\nNote that `.gitignore` files should be named `gitignore` to avoid being ignored on publishing.\n\n### 3. Build the app (TypeScript only)\n\nRun `npm run build` or `yarn build` to transpile TypeScript code into JavaScript. If you chose the default template, this step is not necessary.\n\n### 4. Publish package to npm\n\nRun `npm publish` or `yarn publish` to publish your `create-greet` app to npm.\n\n### 5. PROFIT\n\n```bash\nnpx create-greet ohayo\nnpm init greet ohayo\nyarn create greet ohayo\n```\n\n![screenshot](https://raw.githubusercontent.com/uetchy/create-create-app/master/.github/assets/ss2.png)\n\n## Template\n\nEdit files inside `templates/default`. Every file name, directory name, and a text file will be processed through Handlebars template engine to replace all template strings with the respective value.\n\nBuilt-in variables are:\n\n- `{{name}}` package name (e.g. `ohayo`)\n- `{{description}}` package description\n- `{{author}}` author name (e.g. `John Doe`)\n- `{{email}}` author email (e.g. `john@example.com`)\n- `{{contact}}` author name formatted with `{{name}} \u003c{{email}}\u003e`. If email is missing, simply `{{name}}`\n- `{{license}}` package license (e.g. `MIT`)\n- `{{year}}` current year (e.g. `2021`)\n- `{{template}} selected template name (e.g. `typescript`)\n- `{{packageManager}} package manager (e.g. `yarn`)\n\n### Advanced: Multiple templates\n\nCreates a new directory in the location defined by `templateRoot`. It can be accessed via `--template` flag (e.g. `create-something \u003cname\u003e --template \u003ctemplate\u003e`).\nYou might want to set `promptForTemplate` to `true` to explicitly ask the user to choose a template during the initialization phase. If `promptForTemplate` is `false`, which is the default behavior, `default` template will be used unless the user explicitly selects a template via `--template` cli flag.\n\n### Helper functions\n\nIn the following example, we assume that the variable `name` is `create-react-app`.\n\n#### `upper`\n\nConvert text to UPPERCASE.\n\n`{{upper name}}` becomes `CREATE-REACT-APP`.\n\n#### `lower`\n\nConvert text to lowercase.\n\n`{{lower name}}` becomes `create-react-app`.\n\n#### `capital`\n\nConvert text to CapitalCase.\n\n- `{{capital name}}` becomes `CreateReactApp`\n- `{{capital name space=true}}` becomes `Create React App`.\n\n#### `camel`\n\nConvert text to camelCase.\n\n`{{camel name}}` becomes `createReactApp`.\n\n#### `snake`\n\nConvert text to snake_case.\n\n`{{snake name}}` becomes `create_react_app`.\n\n#### `kebab`\n\nConvert text to kebab-case.\n\n`{{kebab name}}` becomes `create-react-app`.\n\n#### `space`\n\nReplace all word separators with single space.\n\n`{{space name}}` becomes `create react app`\n\n#### `uuid`\n\nGenerates unique UUID string.\n\n```\n{{uuid}} // =\u003e a5df7100-da46-47a6-907e-afe861f48b39\n{{upper (uuid)}} // =\u003e A5DF7100-DA46-47A6-907E-AFE861F48B39\n```\n\n## Config\n\nThe app configuration can be found in `src/cli.js` (or `src/cli.ts` if you choose the `typescript` template).\n\n```ts\nimport { resolve } from 'path';\nimport { create } from 'create-create-app';\n\ncreate('create-greet', {\n  templateRoot: resolve(__dirname, '..', 'templates'),\n  extra: {\n    language: {\n      type: 'input',\n      describe: 'greeting language',\n      default: 'en',\n      prompt: 'if-no-arg',\n    },\n  },\n  modifyName: (name) =\u003e `package-prefix-${name}`,\n  after: async ({ installNpmPackage }) =\u003e {\n    console.log('Installing additional packages');\n    await installNpmPackage('chalk');\n  },\n  caveat: `Your app has been created successfully!`,\n});\n```\n\n### templateRoot (required)\n\n`templateRoot` is set to `path.resolve(__dirname, '../templates')`. You can change this to any location you like.\n\n### modifyName (default: `undefined`)\n\n`(name: string) =\u003e string | Promise\u003cstring\u003e`\n\nModify `name` property.\n\n```js\n{\n  modifyName: (name) =\u003e (name.startsWith('create-') ? name : `create-${name}`);\n}\n```\n\n### extra (default: `undefined`)\n\n`object | undefined`\n\nAdditional questions can be defined. These options will be available as CLI flags, interactive questions, and template strings. In the example above, `--language` flag and the `{{language}}` template string will be enabled in the app.\n\nAll possible options can be found in the [yargs-interactive documentation](https://github.com/nanovazquez/yargs-interactive#options).\n\n### defaultDescription (default: `description`)\n\nDefault value for a package description.\n\n### defaultAuthor (default: `user.name` in `~/.gitconfig` otherwise `Your name`)\n\nDefault value for a package author.\n\n### defaultEmail (default: `user.email` in `~/.gitconfig` otherwise `Your email`)\n\nDefault value for a package author email.\n\n### defaultTemplate (default: `default`)\n\nDefault value for a template.\n\n### defaultLicense (default: `MIT`)\n\nDefault value for license.\n\n### defaultPackageManager (default: `undefined`)\n\nDefault value for package manager. `npm`, `yarn` and `pnpm` are available. `undefined` to auto detect package manager.\n\n### promptForDescription (default: `true`)\n\nInteractively asks users for a package description.\n\n### promptForAuthor (default: `true`)\n\nInteractively asks users for a package author.\n\n### promptForEmail (default: `true`)\n\nInteractively asks users for a package author email.\n\n### promptForTemplate (default: `false`)\n\nInteractively asks users to select a template. If there are no multiple templates in the `templates` directory, it won't display a prompt anyways.\n\nEven if `promptForTemplate` is set to `false`, users can still specify a template via a command line flag `--template \u003ctemplate\u003e`.\n\n```\ncreate-something \u003cname\u003e --template \u003ctemplate\u003e\n```\n\n### promptForLicense (default: `true`)\n\nInteractively asks users for a package license.\n\n### promptForPackageManager (default: `false`)\n\nInteractively asks users for a package manager to use for installing packages from npm.\n\n### skipGitInit (default: `false`)\n\nSkip initializing a git repository at a creation time.\n\n### skipNpmInstall (default: `false`)\n\nSkip installing package dependencies at a creation time.\n\n### after (default: `undefined`)\n\n`(options: AfterHookOptions) =\u003e void`\n\nDefine after-hook script to be executed right after the initialization process.\n\n### caveat (default: `undefined`)\n\n`string | ((options: AfterHookOptions) =\u003e string | void) | undefined`\n\nThe caveat message will be shown after the entire process is completed.\n\n```js\ncreate('create-greet', {\n  caveat: 'Happy coding!',\n});\n```\n\n```js\ncreate('create-greet', {\n  caveat: ({ answers }) =\u003e `Run -\u003e cd ${answers.name} \u0026\u0026 make`,\n});\n```\n\n```js\ncreate('create-greet', {\n  extra: {\n    plugin: {\n      type: 'input',\n      describe: 'plugin to be used in your project',\n      default: 'some-plugin',\n      prompt: 'if-no-arg',\n    },\n  },\n  after: async ({ installNpmPackage, answers }) =\u003e {\n    const plugin = answers.plugin;\n    console.log(`Installing additional package: ${plugin}`);\n    await installNpmPackage(plugin);\n  },\n  caveat: ({ packageDir }) =\u003e {\n    console.log('Next step:');\n    console.log(`cd ${packageDir} \u0026\u0026 npm start`);\n  },\n});\n```\n\n### `AfterHookOptions`\n\n```typescript\n{\n  // variables\n  name: string; // e.g. \"create-greet\"\n  template: string; // e.g. \"default\"\n  packageDir: string; // e.g. \"/path/to/ohayo\"\n  templateDir: string; // e.g. \"/path/to/create-greet/templates/default\"\n  year: number; // e.g. 2020\n  answers: {\n    name: string; // package name passed through `modifyName`\n    description: string; // description\n    author: string; // e.g. \"John Doe\"\n    email: string; // e.g. \"john@example.com\"\n    contact: string; // e.g. \"John Doe \u003cjohn@example.com\u003e\"\n    license: string; // e.g. \"MIT\"\n    [key: string]: string | number | boolean | any[]; // any values defined in the `extra` field.\n  };\n\n  // helper functions\n  run: (command: string, options?: CommonOptions\u003cstring\u003e) =\u003e ExecaChildProcess\u003cstring\u003e; // execute shell commands in the package dir\n  installNpmPackage: (packageName: string | [string], isDev?: boolean) =\u003e Promise\u003cvoid\u003e; // install npm package. uses package manager specified by --node-pm CLI param (default: auto-detect)\n}\n```\n\n## Showcase\n\nList of amazing projects built with `create-create-app`.\n\n- [create-create-app](https://github.com/uetchy/create-create-app) - Yes, `create-create-app` uses `create-create-app` itself to generate `create-\u003capp\u003e` template!\n- [create-book](https://github.com/vivliostyle/create-book) - Fast \u0026 frictionless book template generator.\n- [create-vivliostyle-theme](https://github.com/vivliostyle/themes/tree/master/packages/create-vivliostyle-theme) - Create Vivliostyle theme at ease.\n- [create-alfred-workflow](https://github.com/uetchy/create-alfred-workflow) - Create Alfred Workflow.\n- [create-catalyst](https://github.com/dvalinotti/create-catalyst) - NPM create-app command for scaffolding a new Web Components project with GitHub's Catalyst.\n- [create-lit](https://github.com/litelement-dev/create-lit) - Create simple-starter-kit `lit` applications.\n- [create-vscode-extension](https://github.com/heybereket/create-vscode-extension) - Create Visual Studio Code extensions in one command\n- [create-express-app](https://github.com/rocambille/create-express-app) - Set up a modern express app by running one command.\n- [tsnt](https://github.com/alii/tsnt) - 🚀An ESM node package template with ESLint, Prettier \u0026 TypeScript built in. Powered by esbuild.\n- [create-strawberry](https://github.com/strawberry-discord/create-strawberry) - npm template initializer for strawberry.js\n\n\u003e Missing your project? Send a PR :)\n\n## Contribution\n\nPRs are always welcomed.\n\n### Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://uechi.io/\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/431808?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003euetchy\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=uetchy\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=uetchy\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://vivliostyle.org/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/3324737?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eShinyu Murakami\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=MurakamiShinyu\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://twitter.com/takahashim\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/10401?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMasayoshi Takahashi\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=takahashim\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://alexanderliu.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/41758627?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexander Liu\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=alexanderl19\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://vilja.me\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/24564003?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVilja\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=iVilja\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://lucaslabs.tech/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/12949236?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLucas Colombo\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/uetchy/create-create-app/commits?author=lucas-labs\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuetchy%2Fcreate-create-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuetchy%2Fcreate-create-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuetchy%2Fcreate-create-app/lists"}