pigeon-nest-mapper
v1.1.1
Published
A CLI tool to scan NestJS projects and import them into API clients like Insomnia and Postman
Maintainers
Readme
🐦 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
