@guchenyo/create-temp
v0.0.14
Published
Project scaffolding CLI (templates pulled from GitHub)
Readme
create-temp
Local template scaffolding CLI for this repository. It reads the template index from GitHub and uses sparse checkout to fetch only the selected template.
Usage
npm link
create-tempOr pass args directly:
create-temp backend/Node/express my-api
create-temp backend/Node/fastify my-fastify-api
create-temp backend/Node/koa my-koa-api
create-temp backend/Node/hono my-hono-api
create-temp backend/Node/nest/express my-nest-api
create-temp backend/Node/nest/fastify my-fastify-api
create-temp "backend/Java/Spring Boot/4.0.6" my-spring-api com.example
create-temp backend/Java/Vert.x/5.1.1 my-vertx-api com.example
create-temp backend/Go/Gin my-gin-api
create-temp backend/Go/Echo my-echo-api
create-temp backend/Go/Fiber my-fiber-api
create-temp backend/Go/gozero my-gozero-api
create-temp backend/Go/Hertz my-hertz-api
create-temp backend/Go/Kratos my-kratos-api
create-temp backend/Go/fasthttp my-fasthttp-api
create-temp backend/Rust/actix-web my-actix-api
create-temp backend/Rust/axum my-axum-api
create-temp backend/Rust/ntex my-ntex-api
create-temp backend/Rust/poem my-poem-api
create-temp backend/Rust/rocket my-rocket-api
create-temp backend/Rust/salvo my-salvo-api
create-temp backend/Python/fastapi my-fastapi-api
create-temp backend/Python/Django my-django-api
create-temp backend/Python/Flask my-flask-api
create-temp backend/Python/Falcon my-falcon-api
create-temp backend/Python/Litestar my-litestar-api
create-temp backend/Python/Sanic my-sanic-api
create-temp backend/Python/Starlette my-starlette-api
create-temp backend/Python/aiohttp my-aiohttp-api
create-temp front/web/react/js my-react-app
create-temp front/web/react/ts my-react-ts-app
create-temp front/web/SSG/vitepress my-vitepress-site
create-temp front/web/SSR/next-react/js my-next-app
create-temp front/web/SSR/next-react/ts my-next-ts-app
create-temp front/web/SSR/nuxt-vue/minimal my-nuxt-app
create-temp front/web/SSR/nuxt-vue/content my-content-app
create-temp front/web/SSR/svelteKit/minimal-ts my-sveltekit-app
create-temp front/web/SSR/astro/basic my-astro-app
create-temp front/web/SSR/astro/minimal my-astro-minimal
create-temp front/web/SSR/astro/blog my-astro-blog
create-temp front/web/SSR/astro/docs my-astro-docs
create-temp front/web/vue3/vue3-no-ts my-web
create-temp front/pc/tauri/react-js my-desktop-react
create-temp front/pc/tauri/react-ts my-desktop-react-ts
create-temp front/pc/tauri/vue-js my-desktop-vue
create-temp front/pc/tauri/vue-ts my-desktop-vue-ts
create-temp front/pc/flutter my-desktop-flutter com.example
create-temp front/pc/wails my-wails-app
create-temp front/pc/slint my-slint-app
create-temp front/pc/qt/console my-qt-console
create-temp front/pc/qt/widgets my-qt-widgets
create-temp front/pc/qt/quick my-qt-quick
create-temp front/mobile/uniapp/vue my-uniapp
create-temp front/mobile/uniapp/nvue my-nvue-app
create-temp front/mobile/uniapp/uvue my-uvue-app
create-temp front/mobile/taro/react-js-vite my-taro-react
create-temp front/mobile/taro/react-ts-vite my-taro-react-ts
create-temp front/mobile/taro/vue-js-vite my-taro-vue
create-temp front/mobile/taro/vue-ts-vite my-taro-vue-ts
create-temp front/mobile/flutter my-mobile-app com.exampleFlutter templates accept an optional third argument as the package prefix. For
example, my-mobile-app com.example generates Dart package name my_mobile_app
and native package ids such as Android com.example.my_mobile_app or desktop
bundle ids such as com.example.mydesktopflutter.
Java Maven templates also accept the optional third package-prefix argument; it
rewrites Maven groupId and Java package names.
Go templates rewrite go.mod module path and internal imports to the generated
project slug.
Rust templates rewrite Cargo.toml and Cargo.lock package metadata to the
generated project slug.
Python templates with pyproject.toml rewrite project metadata to the generated
project slug.
Use with npm create:
npm create @guchenyo/temp@latest -- backend/Node/express my-apiInteractive selection (TUI):
npm create @guchenyo/temp@latestWhen a selected template has optional packages configured, the CLI shows a
multi-select dependency step. For example, React web templates under
front/web/react/ can select react-router, zustand,
@reduxjs/toolkit, and react-redux.
Express templates under backend/Node/express can select database, auth,
validation, upload, rate limit, cache, queue, mail, logger, and utility
packages.
Fastify templates under backend/Node/fastify can select Fastify plugins,
database, auth, validation, upload, rate limit, cache, queue, mail, logger, and
utility packages.
Koa templates under backend/Node/koa can select Koa middleware, database,
auth, validation, upload, rate limit, cache, queue, mail, logger, and utility
packages.
Hono templates under backend/Node/hono can select Hono validators, auth,
database, cache, queue, mail, logger, and utility packages.
NestJS templates under backend/Node/nest/ can select validation, Swagger,
auth, database, cache, queue, schedule, logger, and HTTP client packages.
Gin templates under backend/Go/Gin are clean Go API templates. They do not use
the npm optional package system.
Echo templates under backend/Go/Echo are clean Go API templates. They do not
use the npm optional package system.
Fiber templates under backend/Go/Fiber are clean Go API templates. They do
not use the npm optional package system.
Go-Zero templates under backend/Go/gozero are clean Go API templates following
goctl API project conventions. They do not use the npm optional package system.
Hertz templates under backend/Go/Hertz are clean CloudWeGo Hertz API
templates. They do not use the npm optional package system.
Kratos templates under backend/Go/Kratos are clean Kratos HTTP/gRPC API
templates. fasthttp templates under backend/Go/fasthttp are clean low-level
Go API templates. They do not use the npm optional package system.
Rust templates under backend/Rust/ are clean Rust API templates for Actix Web,
Axum, Ntex, Poem, Rocket, and Salvo. They do not use the npm optional package
system.
FastAPI templates under backend/Python/fastapi are clean Python API templates.
They do not use the npm optional package system.
Django templates under backend/Python/Django are clean Django REST Framework
API templates. They do not use the npm optional package system.
Flask templates under backend/Python/Flask are clean Flask API templates.
Falcon templates under backend/Python/Falcon are clean Falcon ASGI API
templates.
Litestar templates under backend/Python/Litestar are clean Litestar ASGI API
templates. Sanic templates under backend/Python/Sanic are clean Sanic API
templates. Starlette templates under backend/Python/Starlette are clean ASGI
API templates. aiohttp templates under backend/Python/aiohttp are clean
aiohttp API templates. They do not use the npm optional package system.
Vue3 web templates under front/web/vue3/ can select axios, vue-i18n,
@vueuse/core, zod, dayjs, pinia-plugin-persistedstate, sass, and
eslint.
VitePress SSG templates under front/web/SSG/vitepress can select
@vueuse/core, medium-zoom, mermaid, dayjs, and sass.
React Native templates under front/mobile/react-native can select request,
state, storage, i18n, image, validation, and date utility packages.
Nuxt Vue SSR templates under front/web/SSR/nuxt-vue/ can select
@pinia/nuxt, pinia, @nuxtjs/i18n, @vueuse/nuxt, zod, and dayjs.
Astro SSR templates under front/web/SSR/astro/ can select @astrojs/mdx,
@astrojs/rss, @astrojs/sitemap, SSR deployment adapters, and sharp.
SvelteKit SSR templates under front/web/SSR/svelteKit/ can select SvelteKit
adapters, @tanstack/svelte-query, svelte-i18n, zod, and dayjs.
Tauri React templates under front/pc/tauri/react-* can select routing, query,
state management, i18n, validation, UI feedback, icon, and utility packages.
Tauri Vue templates under front/pc/tauri/vue-* can select routing, Pinia,
Vue Query, i18n, VueUse, validation, UI feedback, icon, style, and utility
packages.
Qt desktop templates under front/pc/qt/ are clean CMake-based Qt templates for
Console, Widgets, and Quick applications. They do not use the npm optional
package system.
front/mobile/uniapp/vue can
select uni-app compatible packages such as sass, dayjs, mitt, qs,
luch-request, pinia, @dcloudio/uni-ui, wot-design-uni, lodash-es, and
zod. front/mobile/uniapp/nvue has a narrower App-focused list, while
front/mobile/uniapp/uvue does not expose ordinary npm choices by default
because uni-app x App targets compile UTS instead of running JavaScript npm
modules. Selected packages are written into the generated project's
package.json; unselected packages are not installed.
Taro React templates under front/mobile/taro/react- can select React state
management and common utility packages. Taro Vue templates under
front/mobile/taro/vue- can select Pinia and common utility packages.
Requirements
- Git installed and available in PATH
- Access to
https://github.com/GuChena/template.git(or overrideTEMPLATE_REPO_URL) - A
templates.jsonfile in the template repository root
Publish
npm publish --access public