Command-line for creating projects from templates.
npm i -g @sxzz/create
# Or use [p]npx
npx @sxzz/create
create [path]
# e.g: create hello-world
# edit the configuration via VSCode, Vim, or Zed.
create edit
create from <url>
# e.g: create from https://raw.githubusercontent.com/sxzz/create/main/example.yaml
# or for short
create from <owner>/<repo>/<branch>/<path>
# e.g: create from sxzz/create/main/example.yaml
Most formats of configuration are supported.
The configuration file is located in $HOME/.config/create.config.[js,mjs,ts,mts,json,yml,yaml]
URL format: repo[/subpath][#ref]
. See examples.
Run create config
to modify config.
git:
init: true # optional, defaults to true
templates:
- name: Library # must be unique
# color: '#008800' # optional
children:
- name: TypeScript
color: '#3178c6'
url: sxzz/node-lib-starter # remote URL or local path
- name: Web App
url: xxxxx
git:
init: false # overwrite global config