{"id":21803991,"url":"https://github.com/tylerlong/kickstart","last_synced_at":"2025-04-13T19:32:42.671Z","repository":{"id":57289246,"uuid":"116255985","full_name":"tylerlong/kickstart","owner":"tylerlong","description":"Kick start a project by generating code according to boilerplate.","archived":false,"fork":false,"pushed_at":"2018-01-18T08:44:06.000Z","size":232,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T10:11:54.680Z","etag":null,"topics":["boilerplate","generator","kick-start","kickstart","scaffolding","yeoman"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tylerlong.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}},"created_at":"2018-01-04T12:10:35.000Z","updated_at":"2018-01-22T02:31:26.000Z","dependencies_parsed_at":"2022-09-04T09:31:45.355Z","dependency_job_id":null,"html_url":"https://github.com/tylerlong/kickstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fkickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fkickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fkickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tylerlong%2Fkickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tylerlong","download_url":"https://codeload.github.com/tylerlong/kickstart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768067,"owners_count":21158581,"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":["boilerplate","generator","kick-start","kickstart","scaffolding","yeoman"],"created_at":"2024-11-27T11:52:36.649Z","updated_at":"2025-04-13T19:32:42.646Z","avatar_url":"https://github.com/tylerlong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kickstart\n\nKick start a project by generating code according to template. Defined a template project and reuse it again and again to kick start new projects. All kinds of projects are supported no matter what programming languages they use.\n\nIt's a much simpler alternative to [Yeoman](http://yeoman.io/).\n\n### [Awesome kickstart](https://github.com/tylerlong/awesome-kickstart)\n\n\n## Install\n\n```\nyarn global add kickstart-cli\n```\n\n\n## Usage\n\n```\nks -k kickstart-project -o output-directory\n```\n\nA new project will be created at `output-directory`, using `kickstart-project` as template.\n\n`-o output-directory` is optional. By default it is `.`, a.k.a. the current directory.\n\n\n## Features\n\n- Support projects in all programming languages.\n- Support any project to be used as template, even they are not created for scaffolding purpose.\n- Support templating, thanks to [nunjucks](https://mozilla.github.io/nunjucks/templating.html).\n\n\n## Why?\n\nLots of projects look similar. For example, when I start a new JavaScript projects, I always created the following files: `README.md`, `package.json`, `.gitignore`, `.editorconfig`, `.babelrc`...etc.\n\nI wanted a command line utility to create those files for me. I checked the popular [Yeoman](http://yeoman.io/) project but failed to comprehend its authoring workflow. I decided to create a new tool which is both flexible and straightforward.\n\n\n## Q \u0026 A\n\n- Is kickstart for JavaScript projects only?\n    - Nope, it is for all kinds of projects no matter what programming languages they use.\n- Does kickstart support template projects with nested directory structure?\n    - Yes. Template project can have deeply nested directory strucutre.\n- What's the main differences between Yeoman and kickstart?\n    - A template project for Yeoman (they call it a generator project) must be a Node.js module. Kickstart doesn't have this requirement.\n        - Yeoman could generate projects for all kinds of languages but the template/generator project must be Node based. So developers who don't write JavaScript might have difficulty authoring a template/generator project.\n    - Kickstart is much simpler than Yeoman. On the other hand, it doesn't have as many features as Yeoman. Kickstart is pretty new and it is still under development.\n- Why is kickstart better than `cp -r source-project target-directory` ?\n    - kickstart won't copy `.git/`\n    - kickstart won't copy files/directories specified in `.gitignore`\n    - kickstart supports configuration and templating.\n\n\n## How it works\n\nFirst of all, ask yourself: do I or my users create similar projects again and again? If the answer is no, you probably don't need kickstart and you can stop reading on.\n\nIf the answer is yes, create a template project for those similar projects to abstract the things that they have in common. For strings that each project might have a different value, define them as `{{ variable }}`.\n\nFor example, I can define a template for JavaScript projects with the following directory structure:\n\n```\nkickstart-javascript\n    - README.md\n    - package.json\n    - .gitignore\n    - kickstart.yml\n```\n\nPlease note that, a template project usually has a `kickstart.yml` file in its root directory. If no `kickstart.yml` file is found, an empty one will be used instead. Thus allows any project to be used as a template project.\n\nA sample `package.json` file:\n\n```json\n{\n  \"name\": \"{{ name }}\",\n  \"version\": \"{{ version }}\",\n  \"license\": \"{{ license }}\",\n}\n```\n\nA sample `kickstart.yml` file:\n\n```yml\nname: my-app\nversion: 0.1.0\nlicense: MIT\n```\n\nRun the following command to generate a new project:\n\n```\nmkdir my-awesome-project \u0026\u0026 cd my-awesome-project\nks -k /path/to/kickstart-javascript/\n```\n\nThe generated project:\n\n```\nmy-awesome-project\n    - README.md\n    - package.json\n    - .gitignore\n```\n\nGenerated `package.json` file has the following content:\n\n```json\n{\n  \"name\": \"my-app\",\n  \"version\": \"0.1.0\",\n  \"license\": \"MIT\",\n}\n```\n\nYou can also edit the `kickstart.yml` file as below before executing the `ks` command:\n\n```yml\nname: cool-project\nversion: 0.2.0\nlicense: MIT\n```\n\nIn such case the generated `package.json` file is:\n\n```json\n{\n  \"name\": \"cool-project\",\n  \"version\": \"0.2.0\",\n  \"license\": \"MIT\",\n}\n```\n\n\n## Advanced templating\n\n[Nunjucks](https://github.com/mozilla/nunjucks) is the underlying templating engine.\n\nYou can use some of its [adanvaced features](https://mozilla.github.io/nunjucks/templating.html). Sample:\n\n`kickstart.yml`:\n\n```yml\nfood:\n  ketchup: 5 tbsp\n  mustard: 1 tbsp\n  pickle: 0 tbsp\n```\n\nTemplate:\n\n```\n{% for ingredient, amount in food %}\n  Use {{ amount }} of {{ ingredient }}\n{% endfor %}\n```\n\n\n### Templating in directory/file name\n\nYou can use templating in directory/file name.\n\nFor example:\n\n```\nsrc/{{ serviceName }}/handler.js\n```\n\n\n### Comments\n\nYou can write comments as `{# comments #}` which will be omitted when generating code.\n\n\n## Todo\n\n- Each template project must be a runnable project itself\n- Toml + regex as config file\n    - Just use string match, no regex\n    - Then how to support `if`, `for`...etc?\n        - Can we give up these adavanced templating features?\n            - Then no more `nunjucks`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlong%2Fkickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftylerlong%2Fkickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftylerlong%2Fkickstart/lists"}