1.1.1 โข Published 9 months ago
pigeon-nest-mapper v1.1.1
๐ฆ Pigeon - NestJS Route Mapper CLI
Pigeon is a CLI tool that scans a NestJS project and automatically maps all API routes into an Insomnia or Postman-compatible import file. ๐
๐ It recursively searches for controllers, extracts all endpoints, and organizes them neatly into Insomnia or Postman collections.
๐ฆ Available on NPM: Pigeon Nest Mapper on NPM ๐ GitHub Repository: Pigeon on GitHub
โจ Features
- ๐ Scans NestJS projects to detect all @Controller()routes.
- ๐ Groups routes by controller inside Insomnia or Postman.
- ๐ Recursively finds controllers in the entire project.
- ๐ Exports to insomnia.jsonorpostman.jsonfor easy import.
- ๐ก Simple CLI usage with just one command.
- ๐๏ธ New: Now you can choose between Insomnia (default) and Postman, or exit the CLI with "Quit Pigeon".
๐ฅ Installation
From NPM (Recommended)
npm install -g pigeon-nest-mapperFrom Source
- Clone the repo:git clone https://github.com/claquettes/pigeon.git cd pigeon
- Install dependencies:npm install
- Build & link:npm run build npm link
๐ Usage
Once installed globally, run:
pigeon /path/to/nestjs-projectExample:
pigeon /home/user/my-nest-appThis will prompt:
๐ชน Scanning NestJS project at: /home/user/my-nest-app ๐ฆ
Choose the export format:
  โฏ Insomnia
    Postman
    โโโโโโโโโโ
    Quit Pigeon- If you choose Insomnia, the output file will be insomnia.json.
- If you choose Postman, the output file will be postman.json.
- If you choose Quit Pigeon, the CLI will exit.
After selecting a format:
๐ Scan Completed! Routes Found:
๐ Controller: AuthController
โก๏ธ  POST /auth/register
โก๏ธ  POST /auth/login
๐ Controller: UserController
โก๏ธ  GET /user/profile
โก๏ธ  POST /user/money
๐ Insomnia import file generated at: /home/user/my-nest-app/insomnia.jsonThen, import the generated file (insomnia.json or postman.json) into your API tool to test all routes instantly! ๐
๐ฆ Dependencies
Pigeon relies on:
- ๐ commander- CLI command parsing.
- ๐ ts-morph- TypeScript AST parsing.
- ๐ fs-extra- File system utilities.
- ๐จ chalk- Colored terminal output.
- ๐๏ธ inquirer- CLI user input handling.
๐ Contributing
- Fork this repository
- Create a feature branch (git checkout -b feature-name)
- Make your changes and commit (git commit -m "Added cool feature")
- Push the branch (git push origin feature-name)
- Open a Pull Request ๐
๐ License
MIT ยฉ Claquettes