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

redline-ai

v0.2.0

Published

Inline AI editing for local Markdown files

Readme

redline-ai

Edit your docs while reading them.

The Problem

Fixing a document always means switching between two modes: reading and editing. You read the rendered output, spot something wrong, switch to your editor, find the line, fix it, switch back to the preview, and repeat. The context switch is small but constant, and it adds up.

What redline-ai Does

redline-ai lets you preview local Markdown files in the browser and edit them right there. Select any text, tell the AI what to change, review the diff, and apply it. The source file is updated on disk. No copy-pasting, no switching windows.

$ npx redline-ai serve ./docs

Open http://localhost:4321, and you're reading your docs with editing powers.

How It Works

  1. Select any text in the rendered preview
  2. Click the "AI Edit" button that appears
  3. Describe what you want changed (e.g. "make this more concise", "translate to English")
  4. Review the diff showing exactly what will change
  5. Apply or Reject

The source Markdown file is rewritten on disk. The preview refreshes automatically.

Who It's For

  • Writers editing blog posts, READMEs, or documentation
  • Anyone with an Obsidian vault, Hugo site, or plain Markdown folder
  • Developers who want to proofread rendered output, not raw markup

Use Cases

Phone-first editing with Happy Coder

Reading on your phone helps things stick. With --host 0.0.0.0, redline-ai is accessible from any device on your local network.

$ npx redline-ai serve ./docs --host 0.0.0.0

Open the URL on your phone, read through the rendered docs, and edit inline. Pair this with Happy Coder -- a mobile client for Claude Code -- to generate drafts from your phone, then polish them directly in redline-ai.

Two Modes

Standalone (serve)

redline-ai renders your Markdown files itself. Point it at any directory.

$ npx redline-ai serve ./docs
$ npx redline-ai serve ~/obsidian-vault
$ npx redline-ai serve .

Proxy (proxy)

Already running a dev server (Astro, Next.js, etc.)? redline-ai sits in front of it, injecting the editing overlay into your existing site.

$ npx redline-ai proxy --target http://localhost:3000 --root ./src/content --config redline.toml

Configure URL-to-file mapping in redline.toml:

[proxy]
target = "http://localhost:3000"
root = "./src/content"

[[proxy.routes]]
pattern = "/blog/:slug"
file = "blog/:slug.mdx"

[[proxy.routes]]
pattern = "/docs/:path*"
file = ":path.md"

Features

  • Live preview with syntax-highlighted code blocks
  • AI-powered inline editing via Claude Code
  • Diff review before any change hits disk
  • Session memory -- the AI remembers earlier edits in the same file
  • Hot reload -- file changes refresh the browser automatically
  • Multiple edits -- open several edit panels at once without losing any
  • Framework-agnostic -- works with any Markdown directory or existing dev server

Requirements

Note: redline-ai currently uses Claude Code as the AI backend. Other AI agent CLIs are not supported yet.

Install

npm install -g redline-ai

Or run directly:

npx redline-ai serve ./docs

CLI

redline-ai serve <dir>           # Preview and edit Markdown files
  --port <port>                  # Port number (default: 4321)
  --host <host>                  # Host to bind (default: 127.0.0.1, use 0.0.0.0 for LAN)
  --config <path>                # Config file (default: redline.toml)
  --open                         # Open browser automatically

redline-ai proxy                 # Proxy an existing dev server
  --target <url>                 # Target server URL
  --root <dir>                   # Source file directory
  --config <path>                # Config file (default: redline.toml)
  --port <port>                  # Port number (default: 4321)
  --host <host>                  # Host to bind (default: 127.0.0.1, use 0.0.0.0 for LAN)

Customizing AI Prompts

You can customize the prompts sent to Claude by adding an [agent] section to redline.toml:

[agent]
prompt_first_call = """
You are a technical editor. Here is the full document:

<article>
{{fullSource}}
</article>

Edit L{{startLine}}-{{endLine}}:

<target>
{{target}}
</target>
{{selectionContext}}
Instruction: {{instruction}}

Return only the modified target text.
"""

prompt_subsequent_call = """
Edit L{{startLine}}-{{endLine}} of the same document:

<target>
{{target}}
</target>
{{selectionContext}}
Instruction: {{instruction}}

Return only the modified target text.
"""

Available template variables:

| Variable | Description | |---|---| | {{fullSource}} | Full document content | | {{target}} | The matched source text to edit | | {{startLine}} | Start line number | | {{endLine}} | End line number | | {{instruction}} | User's edit instruction | | {{selectionContext}} | Additional context when a sub-selection is made |

If omitted, built-in default prompts are used.

License

MIT