create app using specific npm package or git repository

Usage no npm install needed!

<script type="module">
  import vzhdiOxCreateApp from 'https://cdn.skypack.dev/@vzhdi/ox-create-app';



npm version node

create app using specific npm package or git repository


Using npm:

npm install --global @vzhdi/ox-create-app

or using yarn:

yarn global add @vzhdi/ox-creat-app



cd user-working-dir
ox-create-app -p template-package-name



template package name,support npm package or git repository or local file.

ox-create-app -p plugin
ox-create-app -p git+https://github.com/vzhdi/ox-template-plugin.git
ox-create-app -p ../external/template-package
ox-create-app -p file:D:/package/external/template-package

template package must has a template dir, or has a on-create dir with resolve-template.js to return a specific template dir.view detail


template package version,if package is git repository version can be branch/commit/tag,if package is local file version is invalid

ox-create-app -p plugin -v 1.0.2
ox-create-app -p git+https://github.com/vzhdi/ox-template-plugin.git -v 1.0.2


your app name,default is user working dir's basename

ox-create-app -p plugin -n your-plugin-name


ox-create-app -h

builtIn template package alias

Template Package Development

the package must return a valid template dir, it may be a static template dir in the package's root, or returned by the on-create/resolve-template.js

on-create hooks

please put the next hook files into the on-create dir in your package's root


accept the cwd and name option, and return an absolute template dir

* cwd : user working dir
* name: user app name. default:user working dir's basename
* git?: git repository if cwd is version controlled by git 
module.exports = async ({ cwd, name, git }) => {
  return 'absolute-template-dir';


called when files are copied from your template dir to user working dir (cwd)

* cwd : user working dir
module.exports = async ({ cwd }) => {};