A minimal, configuration-driven command line tool to generate feature-based file structures for Express applications.
EasyStart CLI helps developers scaffold consistent project structures using a simple configuration file. It focuses on flexibility, clarity, and speed without enforcing any specific architecture.
- Simple command-based feature generation
- Config-driven architecture (no hardcoded structure)
- Supports multiple layers (controller, service, routes, etc.)
- Template-based file generation using placeholders
- Dry-run mode for previewing output
- Force mode to overwrite existing files
- Clean and predictable file structure output
npx @fayaz/easystart-cli feature usernpm install -g @fayaz/easystart-cliRun the init command inside your project root:
easystart-cli initThis creates:
cli.config.json
_templates/Example structure:
project/
cli.config.json
_templates/easystart-cli feature <name>easystart-cli feature user| Flag | Description |
|---|---|
| --dry-run | Preview files without writing |
| --force | Overwrite existing files |
easystart-cli feature user --dry-run
easystart-cli feature user --forceCreate a file named cli.config.json in the root of your project.
{
"layers": {
"controller": {
"path": "src/controllers",
"template": "templates/controller.hbs",
"filename": "{{name}}.controller.js"
},
"service": {
"path": "src/services",
"template": "templates/service.hbs",
"filename": "{{name}}.service.js"
},
"routes": {
"path": "src/routes",
"template": "templates/routes.hbs",
"filename": "{{name}}.routes.js"
}
}
}class {{Name}}Controller {
constructor({{name}}Service) {
this.service = {{name}}Service;
}
}
module.exports = {{Name}}Controller;| Variable | Example Output |
|---|---|
| {{name}} | user |
| {{Name}} | User |
src/
controllers/
user.controller.js
services/
user.service.js
routes/
user.routes.jsnpm install
npm run dev -- feature user
npm run build- Preset-based generation (MVC, Clean Architecture)
- Plugin system support
- Interactive CLI mode
- Advanced templating support
Contributions are welcome. Please open an issue to discuss changes or improvements before submitting a pull request.
MIT
Fayaz
