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

@conveniencepro/ctp-discovery

v1.0.0

Published

Discovery manifest generators for the ConveniencePro Tool Protocol (OpenAPI, AI tools, llms.txt)

Readme

@conveniencepro/ctp-discovery

Discovery manifest generators for the ConveniencePro Tool Protocol (CTP).

Generate OpenAPI specs, AI tools manifests, llms.txt files, and more from your tool definitions.

Installation

npm install @conveniencepro/ctp-discovery
# or
yarn add @conveniencepro/ctp-discovery
# or
pnpm add @conveniencepro/ctp-discovery

Quick Start

import { generateAllDiscoveryFiles, getRecommendedFilePaths } from '@conveniencepro/ctp-discovery';

// Your tool definitions
const tools = [
  {
    id: 'base64-encode',
    name: 'Base64 Encode',
    description: 'Encode text to Base64',
    category: 'encoding',
    tags: ['encoding', 'base64'],
    method: 'GET',
    parameters: [
      {
        name: 'text',
        type: 'textarea',
        label: 'Text',
        description: 'Text to encode',
        required: true,
      },
    ],
    outputDescription: 'Returns encoded Base64 string',
    example: {
      input: { text: 'Hello' },
      output: { success: true, encoded: 'SGVsbG8=' },
    },
  },
  // ... more tools
];

// Generate all discovery files
const files = generateAllDiscoveryFiles(tools, {
  baseUrl: 'https://my-tools.com',
  name: 'My Tools',
  description: 'Awesome utility tools',
});

// Get recommended file paths
const paths = getRecommendedFilePaths();

// Write files
// files.openapiYaml   -> .well-known/openapi.yaml
// files.aiToolsJson   -> .well-known/ai-tools.json
// files.llmsTxt       -> llms.txt
// files.llmsFullTxt   -> llms-full.txt

OpenAPI Generation

Generate OpenAPI 3.1 specifications:

import { generateOpenAPI, generateOpenAPIYAML } from '@conveniencepro/ctp-discovery/openapi';

// Generate as JavaScript object
const spec = generateOpenAPI(tools, {
  title: 'My Tools API',
  description: 'API for my utility tools',
  baseUrl: 'https://api.example.com',
  pathPrefix: '/v1/tools',
  includeExamples: true,
  groupByCategory: true,
});

// Generate as YAML string
const yaml = generateOpenAPIYAML(tools, options);

OpenAPI Options

interface OpenAPIGeneratorOptions {
  title?: string;           // API title
  description?: string;     // API description
  version?: string;         // API version
  baseUrl?: string;         // Base URL
  pathPrefix?: string;      // Path prefix (default: '/run')
  includeExamples?: boolean; // Include examples
  groupByCategory?: boolean; // Group by category as tags
  contact?: { name, url, email };
  license?: { name, url };
}

AI Tools Manifest

Generate manifests for AI/LLM integration:

import {
  generateAIToolsManifest,
  generateCTManifest,
  generateChatGPTPlugin,
} from '@conveniencepro/ctp-discovery/ai-tools';

// AI Tools manifest (generic format)
const aiTools = generateAIToolsManifest(tools, {
  name: 'My Tools',
  baseUrl: 'https://api.example.com',
});

// CTP manifest (ConveniencePro format)
const ctManifest = generateCTManifest(tools, {
  providerName: 'My Company',
  providerUrl: 'https://example.com',
});

// ChatGPT plugin manifest
const chatgptPlugin = generateChatGPTPlugin({
  nameForHuman: 'My Tools',
  nameForModel: 'mytools',
  openapiUrl: 'https://example.com/.well-known/openapi.yaml',
});

LLMs.txt Generation

Generate context files for LLMs:

import {
  generateLLMsTxt,
  generateLLMsFullTxt,
  generateToolsMarkdown,
} from '@conveniencepro/ctp-discovery/llms-txt';

// Concise version (llms.txt)
const llmsTxt = generateLLMsTxt(tools, {
  name: 'My Tools',
  baseUrl: 'https://api.example.com',
  groupByCategory: true,
});

// Detailed version (llms-full.txt)
const llmsFullTxt = generateLLMsFullTxt(tools, {
  includeExamples: true,
  maxLineWidth: 80,
});

// Markdown documentation
const markdown = generateToolsMarkdown(tools, {
  includeExamples: true,
});

Output Formats

llms.txt (Concise)

# ConveniencePro
# Browser-native utility tools API
# Base URL: https://conveniencepro.cc

## Encoding
- Base64 Encode (base64-encode): Encode text to Base64
  Endpoint: GET /run/base64-encode
  Required: text

llms-full.txt (Detailed)

================================================================================
                           ConveniencePro Tools
================================================================================

### Base64 Encode
ID: base64-encode
Description: Encode text to Base64
Method: GET
Endpoint: /run/base64-encode

Parameters:
  - text (textarea) [REQUIRED]
    Text to encode

OpenAPI 3.1

openapi: 3.1.0
info:
  title: ConveniencePro Tools API
  version: 1.0.0
paths:
  /run/base64-encode:
    get:
      operationId: base64_encode
      summary: Base64 Encode
      parameters:
        - name: text
          in: query
          required: true
          schema:
            type: string

Recommended Directory Structure

public/
├── .well-known/
│   ├── openapi.yaml       # OpenAPI specification
│   ├── openapi.json       # OpenAPI (JSON format)
│   ├── ai-tools.json      # AI tools manifest
│   ├── ai-plugin.json     # ChatGPT plugin manifest
│   └── ctp-manifest.json  # CTP manifest
├── llms.txt               # Concise LLM context
└── llms-full.txt          # Detailed LLM context

Build Integration

Generate discovery files during build:

// scripts/generate-discovery.ts
import { writeFileSync, mkdirSync } from 'fs';
import { generateAllDiscoveryFiles, getRecommendedFilePaths } from '@conveniencepro/ctp-discovery';
import { tools } from '../src/data/tools';

const files = generateAllDiscoveryFiles(tools, {
  baseUrl: process.env.BASE_URL,
});

const paths = getRecommendedFilePaths();

// Ensure directories exist
mkdirSync('public/.well-known', { recursive: true });

// Write files
writeFileSync(`public/${paths.openapiYaml}`, files.openapiYaml);
writeFileSync(`public/${paths.aiToolsJson}`, files.aiToolsJson);
writeFileSync(`public/${paths.llmsTxt}`, files.llmsTxt);
writeFileSync(`public/${paths.llmsFullTxt}`, files.llmsFullTxt);

console.log('Discovery files generated!');

Related Packages

  • @conveniencepro/ctp-core - Core types and interfaces
  • @conveniencepro/ctp-runtime - Tool execution runtime
  • @conveniencepro/ctp-sdk - Embeddable SDK

License

MIT © ConveniencePro