A CLI tool (v1.0.9, last updated in 2022) called Rest API Generator (RAG) that scaffolds TypeScript-based REST APIs using Express, TypeORM, MySQL, and Awilix for dependency injection. It generates a clean, layered architecture (Controller → Service → Repository → Database) with built-in support for JWT authentication and bcrypt password hashing. Unlike generic project starters, it provides code generation commands (rag create controller/service/repository/model) and a full DI container setup out of the box. Note: development appears to have stalled, with no recent commits or releases.
npm install typescript-rest-api-generatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs the CLI globally, scaffolds a new project named 'my-api', and starts the dev server.
Consider using a more actively maintained alternative like fastify-cli or nestjs/cli.
Manually update TypeORM import patterns or use a fork that supports latest TypeORM.
Run `rag create new project-name` with appropriate npm permissions or use `--skip-install` if available.
Modify ormconfig.json and install the appropriate database driver before running migrations.
Update repository files to use the new pattern: const repository = dataSource.getRepository(Entity);
Ensure npm global bin directory is in PATH, or use `npx typescript-rest-api-generator create new ...`
Run `npm install` inside the generated project directory
Register services with `asClass` in the DI container, e.g., `container.register({ exampleService: asClass(ExampleService) })`Add `"experimentalDecorators": true` to tsconfig.json compilerOptions