🧭 Collection Generator
🧰 A VS Code extension that automatically generates Postman collections from your API routes.
Supports Node.js (Express) and Laravel projects with smart grouping, tagging, and authentication metadata.
🚀 Features
- ⚡ Auto-detect and parse Node.js (Express) and Laravel routes
- 🪄 Generate Postman folders using comment annotations
- 🧭 Support for nested groups and route metadata:
↑
Top order — ↓
Bottom order
@v1
Version tags
#secure
Tag labels
@auth(bearer)
Authentication
- 🧾 Environment file generation (
base_url
, auth_token
)
- 🧪 Simple and fast workflow — no manual Postman creation
- 📂 Works with:
router.get/post/put/delete
for Node.js
Route::get/post/put/delete/apiResource
for Laravel
📦 Installation
From Marketplace (Recommended)
- Open VS Code
- Search for
Collection Generator
in the Extensions Marketplace
- Click Install
Manual Installation
vsce package
code --install-extension collection-generator-1.0.0.vsix
⚡ Quick Start
/*
↑ Auth @v1 #secure
@auth(bearer)
*/
router.post("/register", ...);
router.post("/login", ...);
2. Run Command in VS Code
Ctrl + Shift + P → Collection Generator: Generate Postman Collection
3. Generated File
A file named:
postman_collection.json
will be created in your project root.
✅ Import it directly into Postman.
Annotation |
Description |
Example |
↑ / ↓ |
Folder sort order |
↑ Auth |
@v1 |
Version metadata |
↑ Auth @v1 |
#secure |
Tag |
↑ Auth #secure |
@auth(bearer) |
Authentication info |
↑ Auth @auth(bearer) |
Products > Management |
Nested folder path |
↓ Products > Management |
Example
/*
↓ Products > Management #admin
*/
router.post("/:tenant/products", ...);
router.get("/:tenant/products", ...);
📁 Output:
📁 Products
📁 Management
📁 POST /:tenant/products
📁 GET /:tenant/products
🧱 Supported Project Types
🟢 Node.js (Express)
router.get("/...")
router.post("/...")
router.put("/...")
router.delete("/...")
🔴 Laravel
Route::get('/...')
Route::post('/...')
Route::put('/...')
Route::delete('/...')
Route::apiResource('resource', Controller::class)
🌐 Environment Variables
The extension automatically generates a Postman environment:
{
"base_url": "http://localhost:3000",
"auth_token": ""
}
📌 Use {{base_url}}
in your requests and set your auth_token
globally in Postman.
🔐 Authentication
When you use:
@auth(bearer)
The generated collection will include:
"auth": {
"type": "bearer",
"bearer": [
{ "key": "token", "value": "{{auth_token}}", "type": "string" }
]
}
🛠 Commands
Command |
Description |
Collection Generator: Generate Postman Collection |
Scans the project and generates a Postman collection file |
🧾 Changelog
v1.0.0
- 🚀 Initial release
- 🧭 Auto-detect Node & Laravel
- 🪄 Comment-to-folder grouping
- 🧾 Environment file generation
👨💻 Author
Kerolos Zakaria
Portfolio • GitHub • Marketplace • LinkedIn
📝 License
MIT © 2025 Kerolos Zakaria