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 🙏

© 2026 – Pkg Stats / Ryan Hefner

postman-api

v0.1.3

Published

Code-first Postman collections CLI and SDK (Bun/Node)

Readme

postman-api

TypeScript API starter using Bun + Elysia + Drizzle + OpenTelemetry and a CLI to generate and sync a code-first Postman configuration (api.postman.config.ts).

Quickstart (local dev)

  • Install deps: bun install
  • Copy env: cp .env.example .env and set POSTMAN_API_KEY
  • Run server: bun run src/server.ts (or bun run start)
  • Generate config: bun run src/cli.ts init
  • Sync to Postman: bun run src/cli.ts sync
  • Auto-sync on change: bun run src/cli.ts watch
  • Interactive setup (banner + prompts): bun run src/cli.ts start

NPM Package / SDK

  • Install (project): npm i postman-api or global: npm i -g postman-api
  • Run interactive setup: npx postman-api init (ou postman-api init se instalado globalmente)
  • Sincronizar configurado: postman-api sync
  • Assistir mudanças: postman-api watch
  • Logout (remover API Key): postman-api logout (use --keychain, --env ou --all)
  • Login (salvar no Keychain): postman-api login (opções: --key <APIKEY> ou --from-env)

Se preferir npm start postman-api no seu projeto, adicione no seu package.json:

{
  "scripts": {
    "start": "postman-api start"
  }
}

Observações:

  • Por padrão, a API Key é salva com segurança no Keychain do sistema (Windows Credential Manager / macOS Keychain / Linux Secret Service) usando keytar. Como fallback, pode ser gravada no .env.
  • O arquivo padrão do config é api.postman.config.mjs (ESM). Se você já usa Bun e prefere TypeScript, mantenha api.postman.config.ts e use bun run src/cli.ts ... localmente.

Scripts (dev)

  • bun run dev — run server with watch
  • bun run start — run server
  • bun run cli — run CLI
  • bun run cli:watch — watch config and auto-sync
  • bun run build — build ESM artifacts to dist/
  • bun run drizzle:generate — generate SQL from schema
  • bun run drizzle:push — push migrations

Postman CLI

postmanapi init creates api.postman.config.ts which lets you define:

  • collections: name, description, baseUrl
  • folders and requests: method, path, headers, body, responses
  • environments: named variable maps

postmanapi sync reads the config, validates it, then creates/updates Postman collections and environments in the workspace set by POSTMAN_WORKSPACE_ID (or the workspaceId in the config).

Environment variables are loaded via dotenv when using the CLI.

Telemetry

Basic OpenTelemetry tracing is initialized in src/telemetry.ts with an OTLP HTTP exporter (OTEL_EXPORTER_OTLP_ENDPOINT, default http://localhost:4318).

Database (Drizzle + Bun SQLite)

Database lives in app.db. Schema in src/db/schema.ts. Configure Drizzle with drizzle.config.ts.