npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@confytome/postman

v2.0.9

Published

Standalone Postman generator - creates Postman collections and environment variables from OpenAPI specs for API testing and development.

Readme

@confytome/postman

Postman collection generator for confytome. Generates Postman collections and environment variables from OpenAPI specifications for comprehensive API testing and development workflows.

✨ Features

  • 📥 Complete Postman Collections - Ready-to-import collection with all API endpoints
  • 🌍 Environment Variables - Pre-configured environment with base URLs and auth tokens
  • 🧪 Built-in Tests - Automatic status code and response time validation
  • 📋 Request Examples - Sample request bodies and query parameters
  • 🔐 Authentication Support - Bearer token and API key authentication setup
  • 🎯 Path Parameters - Automatic conversion from OpenAPI to Postman format
  • 📊 Collection Organization - Structured by tags and endpoints

📦 Installation

# Global installation
npm install -g @confytome/postman

# Or use with npx (no installation)
npx @confytome/postman --help

🚀 Usage

Standalone Usage (Recommended)

# Use existing OpenAPI spec - No additional dependencies required
npx @confytome/postman --spec ./path/to/your-api-spec.json --output ./docs

With confytome.json Configuration

# Generate from API code - Requires @confytome/core
npx @confytome/postman --config ./confytome.json --output ./api-docs

⚙️ Options

| Option | Short | Description | Default | |--------|-------|-------------|---------| | --config | -c | Path to confytome.json config file | ./confytome.json | | --output | -o | Output directory for generated files | ./docs | | --spec | | Path to existing OpenAPI spec file | | | --version | -V | Show version number | | | --help | -h | Show help information | |

🎯 Two Usage Scenarios

✅ Scenario 1: Standalone with Existing Spec

Perfect when you already have an OpenAPI specification file.

npx @confytome/postman --spec ./my-api-spec.json
  • No additional dependencies
  • Works immediately
  • Perfect for CI/CD pipelines

⚙️ Scenario 2: Generate from Code

When you need to generate the OpenAPI spec from your API code first.

npx @confytome/postman --config ./confytome.json
  • ⚠️ Requires @confytome/core for spec generation
  • Full workflow from code to documentation
  • Automatic spec generation

If @confytome/core is not installed, you'll see helpful guidance:

💡 You have two options:
   1. Install @confytome/core:
      npm install -g @confytome/core
   2. Provide existing OpenAPI spec:
      npx @confytome/postman --spec path/to/spec.json

📁 Generated Output

Creates two files for import into Postman:

1. api-postman.json - Collection File

  • Complete API request collection with proper naming
  • Request bodies with realistic example data
  • Query parameters with sample values
  • Built-in test scripts for validation

2. api-postman-env.json - Environment File

  • BASE_URL - API base URL from OpenAPI spec
  • API_VERSION - API version number
  • AUTH_TOKEN - Placeholder for authentication token

Generated File Structure

docs/
├── api-postman.json
├── api-postman-env.json
├── api-spec.json

Content Features

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

How to Use Generated Files

. 1. Open Postman . 2. Import Collection: File → Import → Select api-postman.json . 3. Import Environment: Settings (gear icon) → Import → Select api-postman-env.json . 4. Set Environment: Select the imported environment from dropdown . 5. Configure Auth: Edit environment to set your actual AUTH_TOKEN . 6. Start Testing: Run individual requests or entire collection

🔧 Dependencies

  • commander: CLI argument parsing

When using --spec option: No additional dependencies required When using --config option: Requires @confytome/core for OpenAPI spec generation

💡 Examples

Basic Usage

# Simple generation with existing spec
npx @confytome/postman --spec ./docs/api-spec.json --output ./public

CI/CD Integration

#!/bin/bash
# Generate Postman collection documentation in CI
npx @confytome/postman \\
   --spec ./build/api-spec.json \\
   --output ./dist/docs

Multiple Environments

# Production docs
npx @confytome/postman \\
   --spec ./specs/prod-api.json \\
   --output ./docs/prod

# Staging docs
npx @confytome/postman \\
   --spec ./specs/staging-api.json \\
   --output ./docs/staging

🛠️ Troubleshooting

Common Issues

"Generated X API requests"

This shows the number of endpoints successfully converted to Postman requests. Each OpenAPI path/method combination becomes a Postman request.

"Specified OpenAPI spec file not found"

# Check file path exists
ls -la ./path/to/your-spec.json

# Use absolute path if needed
npx @confytome/postman --spec $(pwd)/api-spec.json

"OpenAPI spec not found, generating it first"

This means you're using config mode but don't have @confytome/core installed.

# Option 1: Install core
npm install -g @confytome/core

# Option 2: Use existing spec instead
npx @confytome/postman --spec ./path/to/existing-spec.json

🌟 Part of confytome Ecosystem

@confytome/postman is part of the confytome documentation ecosystem:

📄 License

MIT License - see the LICENSE file for details.


Generate beautiful Postman collection documentation from OpenAPI specifications in seconds.