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

trmnl-plugin-preview

v0.2.0

Published

Local preview server for third-party TRMNL plugin markup endpoints.

Readme

TRMNL Preview Server

Preview third-party TRMNL plugin markup locally before it reaches a device.

The preview server connects to your plugin's plugin_markup_url, validates the response, and renders all four TRMNL layout variants in a desktop workspace. It is intended for plugin authors who already have a local or remote endpoint that returns TRMNL markup JSON.

The tool runs entirely on your machine. It does not upload your markup, credentials, diagnostics, screenshots, or plugin data to any preview service. When you use the default local target mode, requests stay inside your local development environment.

Quick Start

Start your plugin server first. Then run the preview server with the markup URL, bearer token, and user UUID you want to test:

npx trmnl-plugin-preview \
  --target http://localhost:8787/trmnl/markup \
  --token local-preview-token \
  --user-uuid local-preview-user

Open:

http://127.0.0.1:4568

When you start the server with --target, --token, and --user-uuid, the workspace opens directly after the endpoint diagnostics pass. If you start the server without connection details, the first screen asks for them before the workspace loads.

Develop From Source

git clone https://github.com/danmunoz/trmnl-plugin-preview.git
cd trmnl-plugin-preview
pnpm install
pnpm run install:browsers
pnpm dev

To pass a target while running from source:

pnpm dev -- \
  --target http://localhost:8787/trmnl/markup \
  --token local-preview-token \
  --user-uuid local-preview-user

What You Need

  • Node.js >=24 <26
  • A TRMNL plugin markup endpoint
  • A bearer token accepted by that endpoint
  • A user UUID for the preview request
  • Chromium for PNG export, installed with npx playwright install chromium

By default, the target URL must be local: localhost, 127.0.0.1, or [::1]. This prevents the preview server from becoming a generic credential relay. To test a remote endpoint that you control, start with --allow-remote-targets. In that mode, the preview server sends your configured bearer token and preview request to the remote URL you provide.

What It Shows

The dashboard renders these four variants at once:

  • full
  • half horizontal
  • half vertical
  • quadrant

Controls let you switch between TRMNL OG and TRMNL X, landscape and portrait, and the TRMNL framework font modes. TRMNL OG is displayed at 80%; TRMNL X is displayed at 40%. Those are display-only scales. Rendered HTML and PNG routes still use the selected model's TRMNL framework dimensions.

Endpoint diagnostics are available from the workspace status control. They show the target host, HTTP status, response keys, and a redacted curl command.

Common Options

trmnl-plugin-preview \
  --port 4568 \
  --target http://localhost:8787/trmnl/markup \
  --token local-preview-token \
  --user-uuid local-preview-user

See Configuration for the full CLI and environment variable reference.

Troubleshooting

The workspace does not open
The preview server validates your endpoint first. Check the error shown on the first screen. The most common causes are wrong bearer token, wrong user UUID, invalid JSON, or missing markup fields.

Remote target rejected
Remote targets are disabled by default. Use --allow-remote-targets only for endpoints you control.

PNG links fail
Install Chromium with:

npx playwright install chromium

Port already in use
Start on another port:

trmnl-plugin-preview --port 4569

Reference