We are actively working on the REST API, TypeScript SDK and more as well as getting it properly documented.

TypeScript SDK Getting Started

The official TypeScript SDK for Lydie. Fetch and render your Lydie documents with full type safety, whether you're building a React app, static site, or server-side application.

Installation

Install the SDK using your preferred package manager:

npm npm install @lydie-app/sdk
pnpm pnpm add @lydie-app/sdk
bun bun add @lydie-app/sdk
yarn yarn add @lydie-app/sdk

Quick Start

Get up and running in minutes. Choose the approach that fits your stack:

Key Features

Type Safe

Full TypeScript support with comprehensive type definitions for all API responses and content structures.

Tree-Shakable

Modular exports ensure you only bundle what you use. Import only the parts you need.

Framework Agnostic

Works with React, Vue, Svelte, or vanilla JavaScript. Use the HTML renderer for maximum compatibility.

SSR Ready

Built for server-side rendering. Works seamlessly with Next.js, Astro, Remix, and other modern frameworks.

Entry Points

The SDK is split into focused, tree-shakable modules:

@lydie-app/sdk

Types only

@lydie-app/sdk/client

API client (Node.js/Edge)

@lydie-app/sdk/react

React renderer + hooks

@lydie-app/sdk/html

HTML renderer (universal)

@lydie-app/sdk/utils

Utilities (TOC, text extraction)

Next Steps

  • Learn about API methods and options in the API Reference

  • Explore advanced features like custom blocks and link transformation

  • Check out the GitHub repository for examples and source code