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

@certman/sdk

v1.0.0

Published

Create and manage your own Certificate Authority for internal HTTPS - simply, securely, and under your control.

Readme

@certman/sdk

Official TypeScript SDK for the Certman API - Cloud Certificate Authority Management.

Installation

npm install @certman/sdk

Quick Start

import { createCertmanClient } from '@certman/sdk';

const certman = createCertmanClient({
  apiKey: 'cm_your_api_key',
});

// List your Certificate Authorities
const { cas } = await certman.cas.list();

// Issue a new certificate
const { certificate, privateKey } = await certman.certificates.issue({
  caId: cas[0].id,
  commonName: 'api.example.com',
  sanDns: ['api.example.com', 'www.example.com'],
  validityDays: 365,
});

console.log(certificate.certificate_pem);
console.log(privateKey);

API Reference

createCertmanClient(config)

Creates a new Certman client instance.

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your Certman API key | | baseUrl | string | https://api.certman.app | API base URL | | maxRetries | number | 3 | Max retry attempts for failed requests |

Methods

Identity

  • client.whoami() - Get current identity and permissions

Certificate Authorities

  • client.cas.list() - List all accessible CAs
  • client.cas.get(id) - Get CA details

Certificates

  • client.certificates.list(params?) - List certificates with filtering
  • client.certificates.issue(data) - Issue a new certificate
  • client.certificates.revoke(id, reason?) - Revoke a certificate
  • client.certificates.renew(id, data?) - Renew a certificate

Error Handling

The SDK provides typed error classes for different error scenarios:

import {
  CertmanError,
  CertmanAuthenticationError,
  CertmanPermissionError,
  CertmanNotFoundError,
  CertmanValidationError,
  CertmanRateLimitError,
} from '@certman/sdk';

try {
  await certman.certificates.issue({
    caId: 'ca-123',
    commonName: 'example.com',
    validityDays: 365,
  });
} catch (error) {
  if (error instanceof CertmanAuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof CertmanPermissionError) {
    console.error('No permission to issue certificates for this CA');
  } else if (error instanceof CertmanValidationError) {
    console.error('Invalid request:', error.message);
  } else if (error instanceof CertmanNotFoundError) {
    console.error('Resource not found');
  } else if (error instanceof CertmanRateLimitError) {
    console.error('Rate limit exceeded, please retry later');
  }
}

TypeScript Support

This SDK is written in TypeScript and provides full type definitions. All API responses are fully typed:

import type { IssuedCertificate, CaDetails } from '@certman/sdk';

const { certificate }: { certificate: IssuedCertificate } = await certman.certificates.issue({
  caId: 'ca-123',
  commonName: 'example.com',
  validityDays: 365,
});

Automatic Retries

The SDK automatically retries failed requests with exponential backoff for:

  • 408 Request Timeout
  • 429 Too Many Requests
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout

Configure the maximum number of retries:

const certman = createCertmanClient({
  apiKey: 'cm_your_api_key',
  maxRetries: 5, // default is 3
});

Requirements

  • Node.js 18.0.0 or later
  • A Certman API key (get one at certman.app)

License

MIT