A command-line interface (CLI) tool for quickly generating and managing front-end projects with various frameworks and UI libraries.
To install the CLI globally, use npm:
npm install -g genfe
Or use npx without installation:
npx genfe <command>
Or use locally:
- Clone source into your computer
- Run in terminal:
npm i -g pnpm #If you had pnpm or use other package managers, skip this command
pnpm i
pnpm build
pnpm start <command> [params]
The create command initializes a new project with the specified framework and UI library.
genfe create
- projectName: The name of your project.
- framework: The library/framework to use (react, vue, next, nuxt).
- uiLibrary: The UI library to use (none, tailwindcss, antd, vuetify).
- modulesDir: (Optional) Whether to use a modules directory structure (only for nuxt).
- initGit: Initialize a git repository.
- initCommitMsg: Initial commit message.
genfe create
You will be prompted to enter the project details interactively.
The gm command generates a new module within your project.
genfe gm <moduleName>
- moduleName: The name of the module to create.
genfe gm user
This will generate a new module named user with predefined structure and files.
After creating a module, the directory structure will look something like this:
project-name/
│
├── modules/
│ └── moduleName/
│ ├── pages/
│ │ └── index.vue
│ ├── routes.ts
│ └── index.ts
├── ...