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

@printwithsynergy/codex-client

v1.21.1

Published

TypeScript client for the codex-pdf HTTP API + cross-stack shared utilities (RFC 7807 Problem Details). Mirrors the Python codex_pdf.client surface.

Readme

@printwithsynergy/codex-client

TypeScript client for the codex-pdf HTTP API. Mirrors codex_pdf.client.HttpClient (Python).

Install

npm install @printwithsynergy/codex-client

Usage

import { HttpClient } from "@printwithsynergy/codex-client";

const codex = new HttpClient({
  baseUrl: process.env.CODEX_API_BASE,
  bearerToken: process.env.CODEX_BEARER_TOKEN,
});

const png = await codex.renderPage(pdfBytes, { page: 1, dpi: 300 });
const seps = await codex.renderSeparations(pdfBytes, { page: 1 });
const sample = await codex.sampleDensity(pdfBytes, { x: 100, y: 200 });

Standard data request — requestAsset

The one call every consumer should use to fetch a PDF's facts. Cache hit returns the document inline in one round-trip; miss pulls it in the background (speculator) and polls until it lands. Repeat requests for the same PDF are served from codex's cache — no re-extract.

const asset = await codex.requestAsset(pdfBytes, { pollMs: 1500, timeoutMs: 60_000 });
if (asset.status === "complete") {
  useDocument(asset.document);
}

// By hash, once the bytes have been uploaded once:
const again = await codex.requestAsset({ sha256 });

// Lower-level: ingestAsset / getAsset / getAssetSignals.

See the canonical data-requests.md for the full contract, response shapes, and the viewer backfill pattern.

The client supports CODEX_API_BASE, CODEX_BEARER_TOKEN, CODEX_API_KEY, CODEX_INTERNAL_TOKEN, and CODEX_TIMEOUT_MS from the environment when the matching options aren't passed.

There is no local fallback: codex byte-level work happens server-side. Construct the client with baseUrl set to your codex deployment URL and let the typed methods do the rest.