ncli-0.1.2 is not a library.
ncli
A Rust-powered CLI utility for managing and generating resources inside a NestJS project.
ncli helps you keep your NestJS project structure consistent by
syncing and generating common backend components such as entities,
controllers, DTOs, services, modules, and more.
✨ Features
- Sync NestJS project resources
- Generate common NestJS building blocks
- Ensures execution only inside a valid NestJS project
- Automatically runs formatting and linting after operations
- Fast and portable (compiled Rust binary)
📦 Installation
Install from crates.io
Verify installation
⚠️ Requirements
You must run ncli inside the root of a valid NestJS project.
A directory is considered valid if it contains:
nest-cli.jsonsrc/main.tspackage.json
If not, you will see:
✖ Not a NestJS project root.
Make sure you run this from your NestJS project directory.
🚀 Usage
Sync resources
Sync a specific resource:
Default target: all
Generate resources
Generate a specific resource:
Default target: all
🛠 Command Reference
sync
Sync existing NestJS project resources to maintain structural consistency.
Targets:
entitiesjobscomponentscolumn-mappingsall(default)
generate
Generate new NestJS building blocks.
Targets:
controllerdtoentityjoblistingmoduleprocessorservicesubscriberall(default)
🔄 Post-Execution Hooks
After every successful command, ncli automatically:
- Runs the project formatter
- Runs the project linter
🧱 Built With
- Rust
- clap
- anyhow
- colored
📄 License
MIT