create-vben-admin is an npm CLI that extracts a single UI template from the vue-vben-admin monorepo and scaffolds a standalone Vue 3 + Vite admin project you can install and maintain locally.
中文: README.md
| Field | Value |
|---|---|
| npm package | create-vben-admin |
| Upstream | vbenjs/vue-vben-admin |
| Stack | Vue 3 · Vite · TypeScript · pnpm workspace |
| Node | >= 20.11 |
vben-admin ships as a monorepo with multiple apps/web-* templates and shared packages/ / internal/ workspaces. If you only need one UI stack, you do not have to clone the entire upstream tree.
create-vben-admin is a vben admin scaffold generator:
- Fetch upstream at a git ref (default: latest GitHub release tag)
- Resolve the pnpm workspace dependency closure
- Keep only the chosen
apps/web-*app and its transitive deps - Emit a flat single-app repo (app code at repository root)
- Run
pnpm installand vendor stub automatically
| Good fit | Not a fit |
|---|---|
| One vben UI template (Ant Design Vue, Element Plus, Naive UI, …) | All upstream apps/web-* in one repo |
| Smaller standalone repo, less monorepo overhead | 1:1 official monorepo workflow |
| Reproducible output pinned to an upstream ref | Replacing official vben docs or long-term fork maintenance |
# Zero install (Node >= 20.11)
pnpm dlx create-vben-admin
# Non-interactive (name → ~/Downloads/<name>)
pnpm dlx create-vben-admin my-vben-admin --template web-naive --no-mock
# Full path + upstream ref
pnpm dlx create-vben-admin ~/Downloads/my-vben-admin --template web-antd --ref v5.7.0 --force
# Global install
pnpm add -g create-vben-admin
create-vben-admin --helpInteractive project path defaults to ~/Downloads/my-vben-admin.
cd ~/Downloads/my-vben-admin
pnpm devDev port comes from .env.development → VITE_PORT (upstream default 5888, not 5173).
ID --template |
UI library | upstream path |
|---|---|---|
web-antd |
Ant Design Vue | apps/web-antd |
web-ele |
Element Plus | apps/web-ele |
web-naive |
Naive UI | apps/web-naive |
web-tdesign |
TDesign | apps/web-tdesign |
web-antdv-next |
Ant Design Vue Next | apps/web-antdv-next |
| Flag | Description |
|---|---|
[project-path] |
Absolute path, relative path, or name → ~/Downloads/<name> |
-t, --template |
Template ID (see table above) |
-r, --ref |
upstream git ref; default latest GitHub release tag |
--mock |
Include apps/backend-mock (Nitro Mock) |
--no-mock |
Exclude mock (default; skips prompt in non-interactive mode) |
--offline |
Use cached upstream snapshot only |
--force |
Overwrite non-empty target directory |
--dry-run |
Plan only, no file writes |
| Topic | Behavior |
|---|---|
| Layout | Flat app at repo root; packages/ / internal/ kept for build |
| upstream ref | Latest release tag (--ref to override) |
| backend-mock | Excluded by default; opt in with --mock or interactive prompt |
| OpenAPI | Always generates docs/mock-api.openapi.json from upstream routes |
| After generate | Auto pnpm install + workspace stub (generation fails if stub fails) |
| Cache | ~/.create-vben-admin-cache/ (CREATE_VBEN_ADMIN_CACHE to override) |
Cloning gives you the full monorepo. create-vben-admin extracts one apps/web-* template plus required workspace packages into a smaller standalone project.
Published on npm: pnpm dlx, pnpm add -g, or npm i -g create-vben-admin. Generated projects default to pnpm.
See VITE_PORT in the generated .env.development. Upstream currently defaults to 5888 — follow the URL printed in your terminal.
Not by default. Use --mock or confirm in prompts to include apps/backend-mock. OpenAPI reference is always generated for local mock tools.
Use --ref, e.g. --ref v5.7.0 or a commit SHA. Default is the latest GitHub release tag.
No. Generated README states the upstream ref and create-vben-admin version. This is a community extraction tool, not published by vbenjs.
| Command | Description |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Run CLI locally (tsx) |
pnpm verify |
format · typecheck · lint · test · build |
pnpm build |
Build dist/ for npm |
Manual test output: .temp/generated/ (gitignored).
- Repo: github.com/379949990/create-vben-admin
- Upstream: vbenjs/vue-vben-admin
- Vben docs: doc.vben.pro
- Publish guide:
docs/decisions/npm-publish.md
MIT