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

llms-generator

v1.0.5

Published

Generate llms.txt and llms-full.txt files from a JSON file.

Readme

llms-generator

llms-generator is a Node.js library designed to streamline the creation of llms.txt and llms-full.txt files. These files enable indexing of API documentation for automated and optimized use by Large Language Models (LLMs) like ChatGPT, GitHub Copilot, Anthropic's Claude, and others.


Why Use llms-generator?

The Goal

The primary goal of this library is to make your API documentation readable, structured, and AI-ready. By generating standardized files like llms.txt, you ensure that your APIs are easily indexed by LLMs, allowing developers and tools to interact with them effectively and automatically.

Why It's Important

  • Enhance Developer Experience: By enabling LLMs to provide accurate, real-time responses about your APIs, you make it easier for developers to integrate with your services.
  • Boost Productivity: LLMs using structured documentation can assist developers by auto-generating code, troubleshooting, and answering questions without diving into extensive manuals.
  • Prepare for the Future: As AI tools become central to development workflows, having AI-optimized documentation ensures your APIs remain accessible and competitive.
  • Efficiency and Cost: The llms.txt format is token-efficient, reducing processing costs while maintaining accuracy for LLM queries.

What is llms.txt?

The llms.txt standard is an emerging web convention for providing structured, concise, and optimized documentation for AI systems. It serves as a guide for LLMs to understand the structure, purpose, and usage of your APIs.

Key Features of llms.txt:

  • AI Optimization: Enables seamless integration with AI developer tools.
  • Structured Content: Provides information in a clear, token-efficient format.
  • Interoperability: Complements standards like robots.txt and sitemap.xml.

Example llms.txt

# llms.txt - Optimized Documentation for AI Developer Tools

project_name: ExampleAPI
version: 1.0
description: An API for text analysis and sentiment scoring.
base_url: https://api.example.com
docs_url: https://docs.example.com

# API Endpoints
endpoints:
  - /v1/analyze
  - /v1/sentiment

# Authentication
auth_method: API Key
auth_details: Pass the API key in the Authorization header.

# SDKs
sdks:
  - language: Python
    sdk_url: https://github.com/example/python-sdk
  - language: JavaScript
    sdk_url: https://github.com/example/js-sdk

# Support
support_contact: [email protected]
support_url: https://support.example.com

Installation

To use llms-generator, install it via npm:

npm install llms-generator

Usage

Programmatic Usage

Generate llms.txt and llms-full.txt files programmatically:

const { generateLLMSFiles } = require('llms-generator');

// Generate files from a JSON configuration
generateLLMSFiles('./path/to/input.json', './output/directory');

Express Integration

Serve llms.txt and llms-full.txt dynamically in an Express app:

const express = require('express');
const { use } = require('llms-generator');

const app = express();
const jsonInput = {
    "project_name": "ExampleAPI",
    "version": "1.0",
    "description": "An API for text analysis and sentiment scoring.",
    "base_url": "https://api.example.com",
    "docs_url": "https://docs.example.com",
    "endpoints": [
        "/v1/analyze",
        "/v1/sentiment"
    ],
    "auth": {
        "method": "API Key",
        "details": "Pass the API key in the Authorization header."
    },
    "rate_limit": "100 requests per minute",
    "rate_limit_upgrade_url": "https://example.com/upgrade",
    "sdks": [
        {
            "language": "Python",
            "sdk_url": "https://github.com/example/python-sdk"
        },
        {
            "language": "JavaScript",
            "sdk_url": "https://github.com/example/js-sdk"
        }
    ],
    "support": {
        "contact": "[email protected]",
        "url": "https://support.example.com"
    }
};
const outputDir = './output/directory';

use(app, jsonInput, outputDir);

app.listen(3000, () => {
    console.log('Server is running at http://localhost:3000');
});

Once integrated, the following routes will be available:

  • http://localhost:3000/llms.txt
  • http://localhost:3000/llms-full.txt

CLI Usage

You can also run llms-generator from the command line:

npx llms-generator ./path/to/input.json ./output/directory

License

This project is open for use with the condition that credit is given to the author.

Author: Nicolas Fodor

License Terms:

You may use, modify, and distribute this project freely, provided you include the following acknowledgment in any distributed versions or derivative works:

This project uses llms-generator by Nicolas Fodor.

For commercial usage, please contact the author directly.


Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


Contact

For support or inquiries, please contact: