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

tbl-md

v0.5.0

Published

A readable table format for Markdown: key-based tables in a fenced tbl block, with lossless conversion to and from GFM tables

Readme

tbl-md

A readable table format for Markdown. A tbl block is a table in a fenced code block with short keys, one cell per line:

```tbl
model: Model
price: Price
note: Note
--
m: Opus
p: $15
n: Good for research.
Second line of the same cell.
--
m: Haiku
p: $1
```

The first record is the header. It maps each key to a column title. A line -- starts the next row. In a row, write the shortest unique prefix of the key, mostly one letter, from the first row on. Then the cell texts of a row start at the same column. The full key is also valid. A missing key is an empty cell. The full format is in docs/format.md.

Why

A GFM pipe table is hard to read and to change as plain text. One long cell pushes all columns apart, and a pipe or a line break in a cell needs an escape. Humans and agents read Markdown mostly as text, so they suffer from it in each edit.

tbl-md has one goal: humans change tables in Markdown with no frustration. A machine reads any form, so each rule of the format serves the human who edits the text.

The switch is reversible. tbl-md convert --to gfm converts each tbl block back to a GFM table, and the file then renders the same. A corpus of real tables from other projects tests the round trip.

The format comes from a survey of readable table formats. No established format had a header record with short keys and a maintained TypeScript parser. A tbl block is unrelated to the troff preprocessor tbl and to the tbl- cell options of Quarto.

Install

npm install tbl-md

Or run the CLI with no install:

npx tbl-md lint README.md
bunx tbl-md lint README.md

The package is ESM only. It needs Node 22 or later, or Bun. It has type declarations for TypeScript.

Use

CLI

tbl-md lint fails on a GFM pipe table and on an invalid tbl block. It names the file and the line of each problem:

docs/a.md:12:1: This is a GFM pipe table. Write it as a tbl block, for example with `tbl-md convert`. (gfm-table)
1 error and 0 warnings.

tbl-md convert converts the GFM tables of each file to tbl blocks, in place. With --to gfm, it converts back:

tbl-md convert docs/*.md
tbl-md convert --to gfm docs/*.md

The options, the configuration file .tbl-md.json, and a pre-commit hook are in docs/cli.md.

Library

import { convert, lint, parse, render } from "tbl-md";

const result = convert("| A |\n| --- |\n| x |\n", { to: "tbl" });
if (result.ok) console.log(result.output);

The library can also parse a tbl block, render its canonical form, and lint a Markdown text. Each export is in docs/api.md.

markdown-it plugin

The plugin renders each tbl block as an HTML table, in each host that uses markdown-it, such as Discourse:

import markdownit from "markdown-it";
import tblPlugin from "tbl-md/markdown-it";

const md = markdownit().use(tblPlugin);

The attribute mapping, the hook attributes, and the single script file for hosts with no ES modules are in docs/markdown-it.md.

How to write a table

  • The first record is the header. Each line is key: Title. A key has lower-case letters, digits, _, and -. The order of the lines is the column order.
  • A line -- starts the next row.
  • In a row, a line key: text starts a cell. Write the shortest unique prefix of the key, mostly one letter, from the first row on: m: for model:. The full key is also valid. A missing key is an empty cell.
  • Each other line continues the cell above, so a cell can have many lines.
  • Cell text is inline Markdown, as in a GFM cell. A pipe needs no escape. If a text line looks like a key line or like --, add one backslash: hint\: text.
  • An attribute block on its own line describes a column, a row, or a cell, for example {align=right} after a header key line. The syntax is the one of Pandoc and djot: #id, .class, and key=value.

tbl-md lint names the line of each error. docs/format.md has the full rules.

Documentation

The package holds the user docs and the skill too, in node_modules/tbl-md/docs/ and node_modules/tbl-md/skills/.

Status and license

Work in progress. The library, the markdown-it plugin, and the CLI exist. The package is on npm as tbl-md, with provenance. Before 1.0.0, a breaking change of the format gives a new minor version. docs/known-gaps.md lists what does not work yet.

The license is MIT, see LICENSE.