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

@nothumanwork/xmd

v0.2.1

Published

xmd (Executable Markdown): render text by replacing {{! ... !}} shell blocks with stdout

Readme

xmd

xmd (Executable Markdown) is a Rust CLI that renders any text file by replacing embedded shell command blocks with their stdout.

The file extension is ignored. .md, .mdc, .mdx, .txt, or any other text file all work the same way.

Install

npm (recommended)

npm install -g @nothumanwork/xmd
xmd --help

Or run once without a global install:

npx @nothumanwork/xmd examples/sample.md

From source

Requires Rust 1.85 or newer.

cargo build --release
./target/release/xmd examples/sample.md

Syntax

The renderer recognizes a single template form:

{{! ... !}}

Everything between {{! and !}} is treated as one shell script.

Inline example:

Current branch: {{! git branch --show-current !}}

Multiline example:

{{!
printf 'one\n'
printf 'two\n'
printf 'three\n'
!}}

Behavior

  • Every command block is executed independently.
  • Command blocks are executed in parallel.
  • Replacement order is deterministic and follows the source document order.
  • On Unix-like systems commands run via /bin/sh -c.
  • On Windows commands run via cmd.exe /C.
  • Commands run relative to the input file's parent directory.
  • Only stdout is injected back into the template.
  • If any command exits non-zero or cannot be started, rendering fails and diagnostics are written to stderr.

Usage

xmd [options] <file>

Options:

  • --max-parallel <n>: maximum concurrent commands (default: number of CPUs)
  • --max-output-bytes <n>: per-command stdout/stderr capture cap
  • -h, --help: show usage
  • -V, --version: show version

Examples

cargo run -- examples/sample.md
./target/release/xmd examples/sample.md
xmd --max-parallel 4 notes.txt

Example template

# Greeting

{{! printf 'hello from xmd\n' !}}

# Numbers

{{!
printf '1\n'
printf '2\n'
printf '3\n'
!}}

Rendered output:

# Greeting

hello from xmd

# Numbers

1
2
3

Development

cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets
cargo llvm-cov --fail-under-lines 90
cargo bench --bench render_parallel

npm publishing

This repo publishes @nothumanwork/xmd with platform-specific optional dependencies via cargo-npm.

Platform packages (one binary each):

  • @nothumanwork/xmd-linux-x64
  • @nothumanwork/xmd-linux-arm64
  • @nothumanwork/xmd-darwin-x64
  • @nothumanwork/xmd-darwin-arm64
  • @nothumanwork/xmd-win32-x64
  • @nothumanwork/xmd-win32-arm64

Release steps:

  1. Set repository secret NPM_TOKEN with publish rights to @nothumanwork.
  2. Bump version in Cargo.toml and commit.
  3. Push a matching version tag: git tag v0.2.1 && git push origin v0.2.1.
  4. The Release npm workflow builds binaries for Linux, macOS, and Windows (x64 + arm64), stages them for cargo-npm, and verifies every generated package.
  5. The workflow publishes and verifies every platform package before it publishes the main package. Verification retries until npm shows each new version, then the main package publishes. A repeated run skips versions that already exist, so it can recover from a partial release.

Do not publish or change the generated main package by hand. Its version and all optionalDependencies must match Cargo.toml. The main package does not publish until every platform package exists on npm at that exact version. Versions 0.1.0 and 0.2.0 of the main package point at missing platform packages; use 0.2.1 or newer.

Local dry-run after building every configured target:

cargo build --release --target x86_64-unknown-linux-gnu
cargo npm generate --clean --out-dir npm
node scripts/verify-npm-packages.mjs npm
node npm/@nothumanwork/xmd/bin/xmd.js --version
# Requires NPM_TOKEN and all configured target binaries before a real publish:
# cargo npm publish --out-dir npm -- --access public --dry-run

Project layout

  • src/main.rs: CLI entry point
  • src/cli.rs: argument parsing and help text
  • src/app.rs: orchestration of parse → execute → render
  • src/template.rs: parsing {{! ... !}} blocks and rebuilding the document
  • src/runner/: parallel command execution and diagnostics
  • tests/: end-to-end CLI tests
  • benches/: Criterion benchmarks for parallel shell rendering
  • docs/: GitHub Pages site
  • adr/: architecture decision records (ASD-STE100)
  • AGENTS.md: agent-facing maintenance notes
  • .cursor/rules/xmd.mdc: Cursor rules for agents

Documentation site

User documentation lives in docs/ and deploys to GitHub Pages through .github/workflows/pages.yml.

Notes for coding agents

This repository includes:

  • AGENTS.md for shared maintenance guidance
  • .cursor/rules/xmd.mdc for Cursor agent rules
  • CLAUDE.md which imports AGENTS.md for Claude Code compatibility
  • a project skill at .claude/skills/xmd-maintainer/
  • ADRs under adr/