crates-llms-txt-napi
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

crates_llms_txt JS/TS Library

npm version npm downloads License

This library provides a standard interface to fetch and parse Rust crate documentation and session data for use with LLMs (Large Language Models).

Features

  • Fetches documentation and session data for any Rust crate by name and version
  • Returns a unified configuration object for LLM consumption
  • TypeScript type definitions included

Installation

npm install crates-llms-txt-napi

Usage Example

import { get_llms_standard_config } from 'crates-llms-txt-napi'

const config = await get_llms_standard_config('clap', '4.5.39')

API

get_llms_standard_config(lib_name: string, version?: string): Promise

Fetches the standard configuration for a given Rust crate and version.

  • lib_name : The name of the crate (e.g., "clap")
  • version : The version string (optional, defaults to latest)
  • Returns: LLMsStandardConfig object LLMsStandardConfig Type
type SessionItem = { title: string; description: string; link: string }
type FullSessionItem = { content: string; link: string }

export type LLMsStandardConfig = {
  libName: string
  version: string
  sessions: SessionItem[]
  fullSessions: FullSessionItem[]
}

Package Sidebar

Install

npm i crates-llms-txt-napi

Weekly Downloads

28

Version

0.0.8

License

MIT

Unpacked Size

18.8 kB

Total Files

5

Last publish

Collaborators

  • kingsword09