hakimov
v1.0.6
Published
You can do what long line of codes with one line of code with this package
Readme
hakimov
Do what takes long lines of code with one line of code.
A zero-config CLI that turns a fresh NestJS project into a production-ready setup — Swagger, TypeORM (PostgreSQL), ConfigModule, and all the dependencies you need — with a single command.
Quick start
Inside your NestJS project folder:
npx hakimov nest-initThat's it. No installation required.
What nest-init does
Installs all dependencies you'd otherwise add one by one:
| Dependencies | Dev dependencies | | --- | --- | |
@nestjs/common,@nestjs/core,@nestjs/platform-express|@nestjs/cli,@nestjs/schematics,@nestjs/testing| |@nestjs/swagger,@nestjs/typeorm,@nestjs/config|typescript,ts-node,ts-jest,ts-loader| |typeorm,pg|jest,supertest+ type packages | |bcrypt,helmet,compression,cookie-parser|eslint,prettier+ configs/plugins | |class-validator,class-transformer|@types/node,@types/express,@types/multer, … | |dotenv,rxjs,uuid,mime-types,reflect-metadata| |Generates
src/main.tswith Swagger already wired up — docs served at/api.Generates
src/app.module.tswith TypeORM (PostgreSQL) and a global ConfigModule, all driven by environment variables.Creates a
.envfile (only if one doesn't exist — yours is never overwritten):PORT=4040 DB_HOST=localhost DB_PORT=5432 DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE=<your-project-name>
Then just review your .env and run:
npm run start:devSwagger UI will be available at http://localhost:4040/api.
Package manager friendly
The CLI auto-detects your package manager — pnpm, yarn, bun, or npm — by checking lockfiles, how it was launched (npx/pnpx/bunx), and what's installed on your system.
It also handles the pnpm v10+ ERR_PNPM_IGNORED_BUILDS issue automatically: blocked build scripts (e.g. bcrypt, @nestjs/core) are allowed in pnpm-workspace.yaml and the install is retried — no manual pnpm approve-builds needed.
Commands
| Command | Description |
| --- | --- |
| npx hakimov nest-init | Set up a NestJS project: dependencies, Swagger, TypeORM, ConfigModule, .env |
| npx hakimov help | Show help |
Requirements
- Node.js with
npx - An existing NestJS project (a folder with a
package.json— e.g. created vianest new) - PostgreSQL for the generated TypeORM config (you can change the driver in
src/app.module.ts)
Links
License
ISC © hakimovdev1
