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

arm-next

v0.1.3

Published

Rust-powered HTML→Markdown for Next.js agents (WebAssembly, Edge-compatible)

Readme

ARM-Next: Agent-Ready Markdown

It automatically transforms your web pages into LLM-optimized Markdown and serves them to AI agents via content negotiation (Accept: text/markdown).

Features

  • Rust/WASM Engine: Blazing fast HTML-to-Markdown conversion.
  • Agentic Directives: Control what AI sees using data-ai-ignore and data-ai-meta
  • Lazy Generation: Convert pages on-demand and cache them at the CDN edge.

Install

npm install arm-next

Use in your Next.js app

  1. Config — use withArmNext:
 // next.config.ts
 import type { NextConfig } from "next";
 import { withArmNext } from "arm-next/next/with-arm-next";

 export default withArmNext(nextConfig);
  1. Proxy : Wrap your existing handler (ARM-Next runs first for Accept: text/markdown / agent UAs):
// src/proxy.ts
import { NextResponse } from "next/server";
import { withArmNextProxy } from "arm-next/proxy";

export default withArmNextProxy(async (req) => {
  // your routing, auth, header rewrites…
  return NextResponse.next();
});
  1. Create the Route Handler

Create a catch-all route to handle the conversion. Choose the runtime that fits your needs.

Option A: Node.js (Recommended for Caching)

Uses unstable_cache to prevent redundant conversions.

// app/api/markdown/[[...slug]]/route.ts
export { GET } from "arm-next/routes/markdown";

Option B: Edge (Recommended for Low Latency)

// app/api/markdown/[[...slug]]/route.ts
export { GET } from "arm-next/routes/markdown-edge";

Curating the AI Experience

ARM-Next gives you fine-grained control over your DOM via data attributes:

<!-- This will be stripped from the Markdown (ads, nav, etc.) -->
<nav data-ai-ignore>...</nav>

<!-- Add custom context to the Markdown Frontmatter -->
<span data-ai-meta="author">Jane Doe</span>

Example response

---
author: John Doe
description: Sed ut perspiciatis voluptatem accusantium
keywords: similique, sunt, culpa, qui, officia, deserunt
title: Voluptatibus maiores alias doloribus asperiores repellat
---


# Introduction

Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
...

Environment

  • ARM_MAX_TOKENS — default 4096
  • ARM_CONTINUED_MESSAGE — truncation suffix
  • ARM_CONVERSION_OPTIONS_JSONhtml-to-markdown-rs options JSON
  • ARM_EXTRA_AGENT_UA_SUBSTRINGS — extra agent User-Agent substrings

Development

This repository is an npm workspace. The example app is examples/minimal, linked with "arm-next": "*" (resolved to the local workspace package).

From the monorepo root:

npm install
npm run build -w arm-next           # compile `packages/arm-next/dist/`
npm run build:wasm -w arm-next      # wasm-pack bundler → `packages/arm-next/wasm/bundler/`
npm run dev                         # runs the example app

Rust tests

From the monorepo root (Rust toolchain required):

npm run test:rust          # default features (tiktoken)
npm run test:rust:wasm     # same tests + no-tiktoken truncation path (WASM-style)