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

floatprompt

v1.0.1

Published

Floats your content for AI — and humans who use it

Downloads

554

Readme

floatprompt

Floats your content for AI — and humans who use it.

One install. Zero config. Every page becomes copyable markdown.

  • AI agents get clean llms.txt and .md files
  • Humans get /float/ dashboard to browse and copy any page
  • No AI calls. No API keys. Just markdown.

Install

npm install floatprompt

That's it. On install, FloatPrompt adds itself to your build. Every npm run build now generates markdown automatically.

Framework Support

| Framework | Extra Steps | Notes | |-----------|-------------|-------| | Next.js | None | Works automatically | | Astro | None | Works automatically | | Gatsby | None | Works automatically | | Eleventy | None | Works automatically | | Vite | None | Works automatically | | Hugo | Add to build command | hugo && floatprompt ./public | | Jekyll | Add to build command | jekyll build && floatprompt ./_site |

Hugo and Jekyll don't use npm scripts, so add FloatPrompt to your build command manually.

What You Get

After each build:

out/
├── index.html
├── index.md            ← AI-readable
├── about.html
├── about.md            ← AI-readable
├── llms.txt            ← Site index for LLMs
├── llms-full.txt       ← Complete site content
└── float/
    └── index.html      ← Dashboard for browsing all pages

Embed Widget (Optional)

Want a "Copy as Markdown" button on your live site? Add the widget so visitors can copy any page directly:

React Component

import { FloatButton } from 'floatprompt/react'

export default function Layout({ children }) {
  return (
    <>
      {children}
      <FloatButton position="bottom-right" />
    </>
  )
}

Custom UI

Use the core functions with your own buttons:

import { copyPageMarkdown, getPageMarkdown } from 'floatprompt/widget'

// Copy current page to clipboard
document.getElementById('my-copy-btn').onclick = async () => {
  await copyPageMarkdown()
}

// Or get the markdown to do something else with it
const markdown = await getPageMarkdown()

How It Works

FloatPrompt runs after your build and:

  1. Extracts main content from each HTML page (using Mozilla Readability)
  2. Converts to clean Markdown (using Turndown)
  3. Generates llms.txt — a site index following the llms.txt standard
  4. Creates /float/ — a dashboard for browsing and copying all pages

No AI. No API keys. Pure mechanical extraction.

Configuration (Optional)

Create floatprompt.config.js for custom settings:

export default {
  exclude: ['/admin/**', '/api/**'],
  baseUrl: 'https://example.com',
  siteTitle: 'My Site',
  siteDescription: 'A site that floats its content for AI',
}

All Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | input | string | auto-detected | Input directory | | output | string | same as input | Output directory | | exclude | string[] | [] | Glob patterns to exclude | | baseUrl | string | '' | Base URL for the site | | siteTitle | string | from index.html | Site title | | siteDescription | string | — | Site description | | llmsTxt | boolean | true | Generate llms.txt | | llmsFullTxt | boolean | true | Generate llms-full.txt | | dashboard | boolean | true | Generate /float/ dashboard |

Manual Usage

If you'd rather run FloatPrompt yourself instead of using the automatic postbuild hook:

floatprompt              # auto-detects output directory
floatprompt ./out        # explicit path
floatprompt ./out --exclude "/admin/**"

CLI Options

| Flag | Description | |------|-------------| | --output <dir> | Output directory (default: same as input) | | --exclude <glob> | Exclude pattern (can use multiple times) | | --base-url <url> | Base URL for the site | | --site-title <title> | Site title | | --no-llms-txt | Skip llms.txt and llms-full.txt | | --no-dashboard | Skip /float/ dashboard | | --verbose | Show detailed output |

Programmatic API

import { FloatPrompt } from 'floatprompt'

// Generate for a directory
const result = await FloatPrompt.generate({
  input: './out',
  exclude: ['/admin/**'],
})

console.log(`Generated ${result.markdownFilesGenerated} files`)

// Extract single page
const markdown = FloatPrompt.extract(htmlString, {
  url: '/about',
  title: 'About Us',
})

Why FloatPrompt?

For AI agents: HTML is full of navigation, footers, scripts, and styling. Markdown is just the content. Less noise, better results.

For humans: Visitors can copy any page as markdown and paste directly into Claude, ChatGPT, or any AI tool.

For you: One install. Works on every build. Nothing to maintain.

License

MIT