{"id":20479598,"url":"https://github.com/arashout/postman-collection-gen","last_synced_at":"2025-10-29T07:46:30.913Z","repository":{"id":43981589,"uuid":"245374594","full_name":"arashout/postman-collection-gen","owner":"arashout","description":"Generate code snippets from Postman Collections","archived":false,"fork":false,"pushed_at":"2023-02-28T00:32:17.000Z","size":18636,"stargazers_count":20,"open_issues_count":11,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T04:33:33.204Z","etag":null,"topics":["code-generation","postman","postman-collection"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arashout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-06T09:08:14.000Z","updated_at":"2024-12-20T02:13:53.000Z","dependencies_parsed_at":"2024-11-15T15:54:53.492Z","dependency_job_id":null,"html_url":"https://github.com/arashout/postman-collection-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashout%2Fpostman-collection-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashout%2Fpostman-collection-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashout%2Fpostman-collection-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashout%2Fpostman-collection-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arashout","download_url":"https://codeload.github.com/arashout/postman-collection-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248721378,"owners_count":21151085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generation","postman","postman-collection"],"created_at":"2024-11-15T15:44:47.877Z","updated_at":"2025-10-29T07:46:25.883Z","avatar_url":"https://github.com/arashout.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postman Gen\nJust a small command line tool that's takes advantage of the [Postman SDK](https://github.com/postmanlabs/postman-collection) and [postman-code-gen](https://github.com/postmanlabs/postman-code-generators#postman-code-generators-) to create code snippets from Postman Collections (Exported from Postman).\n\nFor some reason this feature is missing in the actual client so I thought I would quickly make a tool that does what I want.\n\n## Usage\n### Help\n```bash\n\u003e node main.js --help\nUsage: generate [options]\n\nOptions:\n  -V, --version                  output the version number\n  -c, --collection \u003cpath\u003e        Path to the Postman 2.1 Collection JSON\n  -l,--language_variant \u003ctuple\u003e  Language,Variant pair to output (default: \"cURL,cURL\")\n  -e,--envvars \u003cpath\u003e            Path to environment variables exported from Postman. NOTE: Environment variables will not override variables provided in collection\n  -d, --debug                    Output additional debugging info\n  -h, --help                     output usage information\n```\n### Generate cURL code\n- Export your Collection from Postman as JSON in the 2.1 format e.g. [`example_collection.json`](./example_collection.json)\n- To generate `cURL` snippets:\n```bash\nnode main.js -c example_collection.json\n# Output:\n# curl --location --request GET 'https://v7rr12wbr7.execute-api.us-west-2.amazonaws.com/prod/courses?c0=PHYS153\u0026c1=APSC160\u0026c2=CHEM154\u0026c3=MATH100\u0026c4=APSC150\u0026c5=MATH101\u0026c6=MATH152\u0026c7=PHYS170\u0026c8=ENGL112\u0026c9=MATH253\u0026c10=MECH226\u0026c11=MATH255\u0026c12=MECH220\u0026c13=MECH221\u0026c14=MECH224\u0026c15=MECH222\u0026c16=MECH223\u0026c17=MECH225\u0026c18=MECH375\u0026c19=MECH368\u0026c20=MECH360\u0026c21=MECH328\u0026c22=MECH326\u0026c23=MECH325\u0026c24=CIVL200\u0026c25=EOSC114\u0026c26=PHIL120\u0026c27=MECH380\u0026c28=MECH358\u0026c29=MECH305\u0026c30=LING101\u0026c31=MATH307\u0026version_key=1.2'\n# curl --location --request GET 'https://v7rr12wbr7.execute-api.us-west-2.amazonaws.com/prod/courses?c0=PHYS153'\n```\n### Generate other languages\n\n```bash\nnode main.js -c example_collection.json -d -l shell,httpie\nnode main.js -c example_collection.json -d -l Swift,URLSession\n```\nFor a full list see:\nhttps://github.com/postmanlabs/postman-code-generators#postman-code-generators-\n### Import Environment Variables\nYou can also substitute variables from exported Evironment Variables from Postman (Note: That variables in the Collection JSON will take precedence)     \n`node main.js -c example_collection.json --envvars environment.json`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashout%2Fpostman-collection-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farashout%2Fpostman-collection-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashout%2Fpostman-collection-gen/lists"}