advanced-nestjs-cli
v0.0.3
Published
CLI tool simplifies work with Nest.js
Readme
🛠️ Advanced Nest.js CLI (ANC)
A powerful command-line tool to boost your productivity when working with NestJS projects.
Generate boilerplate code for DTOs and more — cleanly, consistently, and fast.
Resources for CRUD controllers: controllers, services, DTOs and tests are usually very similar. This tool should help speed up the creation of the new CRUD controller in existing Nest.js project.
📦 Installation
npm install -g advanced-nestjs-cli🚀 Usage
anc [command] [...args]📚 Available Commands
| Command | Description |
|-----------------------------------------|----------------------------------------------------------------|
| anc generate dto <name> [path] | Generates DTO files for all CRUD operations |
| anc generate controller <name> [path] | Generated Controller file with methods for all CRUD operations |
📦 Example
anc g dto userThis will generate:
create-user-request-body.dto.ts
create-user-response.dto.ts
delete-user-request-params.dto.ts
edit-user-request-body.dto.ts
edit-user-request-params.dto.ts
edit-user-response.dto.ts
get-user-request-params.dto.ts
get-user-response.dto.ts
user.dto.tsYou can also specify a custom path:
anc g dto product ./app/dtos/userNote: path must lead to the existing folder
💡 Features
- 🔧 Fast and consistent DTO boilerplate generation
- 🧼 Follows NestJS file naming and structure conventions
- 💼 CLI-first developer experience
🛠 Roadmap
- [ ]
controllerboilerplate generation for CRUD - [ ] Automatic annotations with
@nestjs/swaggerdecorators ofcontrollerboilerplate - [ ]
serviceboilerplate generation for CRUD - [ ] Support
controller+service+dtogeneration (connected) - [ ]
loggerboilerplate generation - [ ]
testboilerplate generation for CRUD - [ ] Migrate to typescript
- [ ] Add linter
- [ ] Full coverage with tests
🤝 Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.
📄 License
MIT
