Zero dependencies, dev-only by default

One line of middleware. A review layer on every route.

app.use(redPen()) injects a review-notes overlay into every HTML page your Express app serves. Pin notes to elements while you build; they persist to an append-only log in your repo, right next to the code they are about.

CommonJS, zero runtime deps, and it switches itself off in production, and off-machine either way.

How it works

Mount it and forget it

It behaves like every middleware you already use: one require, one app.use, no config required.

Install

Grab it from GitHub, a single CommonJS module with zero runtime dependencies. No build step of its own.

Mount it

app.use(redPen()) before your routes. It only injects into HTML responses, and only outside production.

Pin as you browse

Every page your app serves gets the overlay. Click an element, leave the note, keep moving.

Commit the notes

Notes persist to .redpen/notes.jsonl, an append-only log. It travels with the repo, merges cleanly across branches, and never ships to prod.

Made for the dev loop

Notes that live where the code lives

In a file in your repo, on the routes they are about, instead of a SaaS board three tabs away.

File-backed, git-friendly

An append-only log holds every note, shipped with a merge=union rule. Commit it, and two branches of notes merge instead of clobbering each other.

Dev-only by default

When NODE_ENV is production the middleware becomes a no-op pass-through. Nothing injected, nothing served.

Cross-page repository

A built-in notes view aggregates every note across every route, with numbered pins, locate and filters.

Typed notes with replies

Four note types, three statuses, low/normal/high priority, and replies threaded under the note in the overlay. Ctrl or Cmd with Enter submits; Escape cancels a pin.

A queue an agent can read

Your notes file is a machine-readable queue. Point an AI coding agent at it and let it work the list.

Zero dependencies

It is a plain (req, res, next). Nothing lands in your lockfile and nothing phones home.

The red wire

Every app feeds the Hub

If you have several services or side projects on the go, each app sends its notes to the Red Pen Hub, one local board that sees all of them.

localhost:3000

Express middleware
Red Pen Hublocal board
api-server4 open
storefront2 open
admin-panel1 open

The Hub is a small local Express app itself, running on your machine. Nothing in it counts projects, so the number of apps you connect is up to your disk.

Put a red pen on localhost

The middleware is free in full, permanently: injection, pinning, the repository, the notes file. There is no paid tier above it.

Red Pen is running on this page too. Try the red button in the corner.

FAQ

Questions

Can this leak into production?

Not unless you force it to, and there are two gates rather than one. With NODE_ENV=production the middleware is a pass-through no-op that injects nothing and registers no routes. Separately it answers only connections from this machine, checked against the connection's actual remote address; pass localOnly: false when you deliberately want someone else on the network in.

What does it add to my dependency tree?

Nothing. Zero runtime dependencies; Express itself is only a devDependency for its own tests. It is a plain (req, res, next) function.

Where do the notes live?

In .redpen/notes.jsonl at your project root, one JSON record per line. Commit it: that is what the shipped merge=union rule is for, and it is how a second person gets in. A derived notes.json snapshot sits beside it for tools that read notes off disk, and it is gitignored for you. Either file is plain text that is yours.

Does it work with template engines and SPAs?

It injects into any HTML response your app serves: EJS, Pug, plain res.send, whatever. For a fully client-rendered SPA served elsewhere, use the drop-in script surface instead; same notes model.

How does it relate to the other Red Pen surfaces?

Same overlay, same notes model, different host. WordPress gets a plugin, static sites get a script tag, Express gets middleware. Learn it once, use it everywhere, and the Hub can aggregate all of them. Screenshots and custom note types ship on WordPress and the drop-in script; they are not in this port yet.