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

@druckform/core

v0.4.0

Published

Markdown → PDF via LaTeX — engine CLI

Readme

@druckform/core

Druckform turns Markdown into styled, print-ready PDFs by way of LaTeX. It exists for one situation in particular: a document gets written by an AI agent (usually Claude) and needs to come out looking properly typeset, not like a plain Markdown export.

The name is German. A Druckform is the printing forme, the locked-up block of type and images that a letterpress actually prints from, the last thing you assemble before you pull a proof. That is roughly the job here: you hand it a style (colors, fonts, spacing) and a template (a set of components), and it composes your Markdown into LaTeX and presses that through Tectonic into a PDF.

@druckform/core is that engine and its command-line tool, the druck binary (also aliased as druckform).

Markdown ──▶ parse ──▶ compose (style + template) ──▶ LaTeX ──▶ Tectonic ──▶ PDF

Install

npm install -g @druckform/core

Requires Node.js ≥ 22. Rendering shells out to Tectonic (LaTeX) and, for diagrams, to Graphviz, a JRE (PlantUML), Chromium (Mermaid), and librsvg. You don't have to install those yourself: druck can relay the render into the prebuilt Docker image automatically (see Execution engines). For a zero-install workflow, use the image directly:

docker run --rm -v "$(pwd):/work" ghcr.io/druckform/druckform:latest \
  render --template base --style /work/style.yaml --in /work/document.md --out /work/out.pdf

Render a document

# 1. Discover what's available
druck templates                       # list templates
druck components --template base       # components + their syntax/params

# 2. Validate before rendering (cheap — catches unknown components, missing params/tokens)
druck lint --template report --style style.yaml --in document.md

# 3. Render to PDF
druck render --template report --style style.yaml --in document.md --out out.pdf

A document is Markdown with optional YAML frontmatter and ::: component directives. --template is optional when the document's frontmatter declares template:; --style is optional when the template carries its own. See the Authoring guide for the full format and component reference.

Rendering with an AI agent

Druckform is designed to be driven by a coding agent (e.g. Claude Code). The whole surface is discoverable and every command emits a stable JSON contract.

Recommended: the Claude Code plugin. It adds a skill that drives the druck CLI, which renders through Docker automatically, so the agent needs no local LaTeX toolchain:

/plugin marketplace add druckform/druckform
/plugin install druckform@druckform

The agent then follows a tight loop: discover (druck templates, druck components -t <t> --json) → write the Markdown → validate (druck lint --json) → render (druck render). Because lint and render exit non-zero and report findings as JSON, the agent can fix issues and retry deterministically.

Or drive the CLI directly. Point the agent at the druck binary and pass --json to any command for machine-readable output:

druck components --template base --json      # component contracts to author against
druck lint --template report --in doc.md --style style.yaml --json
druck render --template report --in doc.md --style style.yaml --out out.pdf --json

Execution engines

druck render and druck preview-component choose where the render actually runs:

  • --engine local: use the tools installed on this machine.
  • --engine docker: relay the command into a container (default ghcr.io/druckform/druckform:<version>, override with DRUCK_DOCKER_IMAGE).
  • --engine auto (default): probe for the local tools; run locally if all are present, otherwise relay to Docker. Set DRUCK_ENGINE=local|docker|auto to change the default without a flag.

Paths are mounted identically inside the container, so --in/--out/--style/--assets need no rewriting. All other commands (templates, components, lint, doctor, new) always run locally.

Documentation

Related packages

  • @druckform/mcp: a Model Context Protocol server that exposes this engine to MCP-capable agents (experimental; the Claude Code plugin uses the skill and CLI, not this server).

MIT © druckform · github.com/druckform/druckform