A little tool to download a snapshot of a Github repo and use it as a starting point for a new project.
Intended for people who use a lot of boilerplates and starter kits.
> npm install -g startfrom # or, if you prefer yarn: > yarn global add startfrom
How to use
Go into an empty directory, then run
startfrom with a GitHub repo identifier. For example:
> startfrom google/web-starter-kit # ...or just paste the whole GitHub URL, if it's easier: > startfrom https://github.com/google/web-starter-kit
What it does
- Downloads a snapshot of the specified repo to your current working directory. (Just a snapshot – no git history.)
git add .and
git commit. (Your original startfrom command is used as the commit message.)
- If there's a package.json, runs
It will also ask for confirmation of which files you want to include. By default, things like
docs are deselected, but you can change the selection if you want.
Start from a specific branch/tag/commit reference
# symbol, for example:
> startfrom mxstbr/react-boilerplate#v2.5.0
Start from a subdirectory of a repo
Sometimes you just want a subdirectory. For example, with HTML5 Boilerplate you probably just want its
Specify your desired subdirectory as a second argument:
> startfrom h5bp/html5-boilerplate dist
Skipping the interactive prompt
If you don't want startfrom to prompt you to confirm which files you want, use the
--confirm flag to auto-confirm it. Useful for automation.
MIT © Callum Locke