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

markdownlang

v0.1.1

Published

An AI-native programming environment where markdown files are executable programs

Readme

markdownlang

An experimental implementation of markdownlang, the "last programming language" concept proposed by Xe Iaso. In markdownlang, markdown files are the programs — YAML frontmatter defines typed input/output schemas, and the markdown body is the executable prompt sent to an LLM with structured output.

This implementation was one-shotted by AI.

How it works

A .mdlang file looks like this:

---
name: fizzbuzz
description: FizzBuzz classic programming exercise
input:
  type: object
  properties:
    start:
      type: integer
    end:
      type: integer
  required: [start, end]
output:
  type: object
  properties:
    results:
      type: array
      items:
        type: string
  required: [results]
---

# FizzBuzz

For each number from {{ .start }} to {{ .end }}, output:

- "FizzBuzz" if divisible by both 3 and 5
- "Fizz" if divisible by 3
- "Buzz" if divisible by 5
- The number itself otherwise

Return the results as an array of strings.

The frontmatter declares the program's name, description, and strictly typed input/output JSON schemas. The body is a prompt template with Go-style {{ .variable }} substitution. At runtime, the rendered prompt is sent to OpenAI with structured output enforced by the output schema — so the result is always valid, typed JSON.

CLI

markdownlang run

Execute a markdownlang program:

npx tsx src/cli.ts run examples/fizzbuzz.mdlang --input '{"start": 1, "end": 15}'

Options:

  • -i, --input <json> — Input data as JSON (default: {})
  • -m, --model <model> — OpenAI model (default: gpt-4o-mini)
  • -v, --verbose — Debug output

markdownlang compile

Translate a markdownlang program to standalone TypeScript:

npx tsx src/cli.ts compile examples/fizzbuzz.mdlang -o fizzbuzz.ts

The generated TypeScript is self-contained — it includes typed Input/Output interfaces, the prompt template, and a run() function that calls OpenAI directly.

markdownlang parse

Inspect the parsed structure of a program:

npx tsx src/cli.ts parse examples/fizzbuzz.mdlang

Setup

pnpm install

Create a .env.local with your OpenAI API key:

OPENAI_API_KEY=sk-...

Examples

See the examples/ directory:

  • fizzbuzz.mdlang — The canonical example from Xe's blog post
  • greeting.mdlang — Generates a personalized greeting in any language
  • summarize.mdlang — Summarizes text into bullet points with a headline

Key concepts

  • Your documentation is your code. The markdown body is both human-readable documentation and the executable program.
  • Schemas are your types. JSON Schema in the frontmatter enforces structured input and output, replacing traditional type systems.
  • Programs compose. Markdownlang programs can import other programs as tools via the imports frontmatter field, enabling agentic tool-calling loops.
  • Compilation means translation. markdownlang compile emits TypeScript that makes the same OpenAI API call — the "compiled" form is just a more traditional representation of the same program.

License

MIT