open-index/open-npm huggingface dataset:
npm package: @kaiwakai/wanikani-mcp
Description: Intelligent WaniKani MCP server for Japanese learning data
Author: Anderson Leite
Latest version: 1.0.1

# WaniKani MCP Server

Intelligent MCP (Model Context Protocol) server and library that provides comprehensive WaniKani learning data for Japanese vocabulary.

Perfect for Japanese learning apps, LLM integrations, and educational tools.

## Features

- **Smart Learning Data**: Get comprehensive learning data for Japanese words with a single function call
- **Kanji Breakdown**: Detailed analysis of kanji components with levels, meanings, and readings
- **Learning Tips**: Context-aware advice based on word difficulty
- **WaniKani Levels**: Maps to WaniKani's 1-60 level system
- **Dual Use**: Works as an MCP server (for Claude Code) OR as a library (for your app)

## Installation

```bash
npm install @kaiwakai/wanikani-mcp
```

## Configuration

**Get your WaniKani API key:**
1. Go to https://www.wanikani.com/settings/personal_access_tokens
2. Generate a new token with "Read-only" permissions
3. Use it in your code or environment variable

**⚠️ Security:** Never commit your API key to version control!

## Usage

### As a Library (for your app)

```typescript
import { getLearningData } from '@kaiwakai/wanikani-mcp';

// Set API key via environment variable
process.env.WANIKANI_API_KEY = 'your_api_key_here';

// Or pass it directly
import { WaniKaniAPI } from '@kaiwakai/wanikani-mcp';
const api = new WaniKaniAPI('your_api_key_here');

// Get comprehensive learning data
const data = await getLearningData({
  word: '迷信',
  include_examples: true
});

console.log(data);
// {
//   word: "迷信",
//   level: 27,
//   difficulty_rating: "intermediate",
//   meanings: ["Superstition"],
//   readings: ["めいしん"],
//   kanji_breakdown: [...],
//   mnemonics: {...},
//   learning_tips: [...],
//   context_sentences: [...]
// }
```

### As an MCP Server (for Claude Code)

Add to your Claude Code MCP settings:

```json
{
  "mcpServers": {
    "wanikani": {
      "command": "node",
      "args": ["/path/to/wanikani-mcp/dist/index.js"],
      "env": {
        "WANIKANI_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

## API Reference

### `getLearningData(input)`

Get comprehensive learning data for a Japanese word.

**Parameters:**
```typescript
{
  word: string;              // Japanese word (kanji or kana)
  include_examples?: boolean; // Include context sentences (default: true)
}
```

**Returns:**
```typescript
{
  word: string;
  level: number;             // WaniKani level (1-60)
  difficulty_rating: string; // beginner | intermediate | advanced | expert
  meanings: string[];
  readings: string[];
  kanji_breakdown: KanjiInfo[];
  mnemonics: { meaning: string; reading: string };
  learning_tips: string[];
  context_sentences?: { ja: string; en: string }[];
}
```

## License

MIT
npm package: @kaiwerther/gptfilescopy
Description: used for collecting files in a format where you can easily paste it into chatgpt
Author: Kai Werther
Latest version: 1.0.0

# gptfilescopy

A Node.js command-line tool that collects all files from a specified folder (default: "src") and copies their content into the clipboard. This format is optimized for pasting into OpenAI's ChatGPT.

## Installation

```bash
npm install -g gptfilescopy
```

This command installs the `gptfilescopy` package globally on your system.

## Usage

To run the script with the default source folder ("src"):

```bash
gptfilescopy
```

To specify a custom source folder, provide the folder name as an argument:

```bash
gptfilescopy custom-src-folder
```

The script will scan the specified folder (or "src" by default) and its subfolders, collecting file contents and formatting them for easy pasting into ChatGPT. The formatted content will be copied to your clipboard.

## Contributing

Contributions to `gptfilescopy` are welcome! Please feel free to open an issue or submit a pull request on the [GitHub repository](https://github.com/kaiwerther/gptfilescopy).

## License

This project is licensed under the MIT License.
npm package: @kaiwlsn/shortlife
Description: A memento mori clock for your terminal
Latest version: 1.0.2

# shortlife

A memento mori clock for your terminal.

![Screenshot of the countdown timer](./screenshot.png)

## Install

Requires [Bun](https://bun.sh)

```bash
npm install -g @kaiwlsn/shortlife
```

## Usage

```bash
shortlife setup -d "1990-01-15" -a "80"
shortlife run
```
npm package: @kaiyi/my_antd
Description: 个人练习项目，模仿AndD制作的组件库
Author: Kaiyi
Latest version: 0.1.1

# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
npm package: @kaizen/component-library
Description: Component Library for Culture Amp's Kaizen Design System
Latest version: 16.11.0

# Kaizen Component Library

Kaizen components live in two places:

1. The core Kaizen component library (`@kaizen/component-library`)
2. Individual draft component packages

To live in the core component library, a component must satisfy a number of quality checks including tests and accessibility standards.

All components that do not yet meet these standards live in their own individual draft component packages.

To find component usage docs in [Storybook](https://cultureamp.design/storybook/), click on the blue `Show Info` button at the bottom of a story for a component, revealing the name of the npm package for that component.

## Add to a new project

Kaizen Component Library is already included in our main product repositories. If it's needed in a new repo, add `@kaizen/component-library` to your `package.json` file:

```
yarn add @kaizen/component-library
```
If you'd like to use a draft component, you include that package individually:
```
yarn add @kaizen/draft-well
```

## Usage

You can import a Kaizen Component Library package inside your application using React.

React import example:

```
import { Button } from "@kaizen/component-library"

// draft component
import { Well } from "@kaizen/draft-well"
```

React usage example:

```
ReactDOM.render(
  <Card>
    <Button label="Example button" onClick={() => alert('Button clicked!')} />
  </Card>
  , document.querySelector('#app'),
);
```

You can also import Kaizen styles into SCSS files:

```
@import '~@kaizen/component-library/styles/type';
```

## Contributing

To contribute to the component library, see the [Contributing guidelines](../../CONTRIBUTING.md).
npm package: @kaizen/deprecated-component-library-helpers
Description: This package is an an addon for @kaizen/component-library that contains helpers (scss mixins, utilities, etc) that we have deprecated or will be deprecating soon.
Latest version: 2.5.8

This package is an an addon for @kaizen/component-library that contains helpers (scss mixins, utilities, etc) that we have deprecated or will be deprecating soon.
npm package: @kaizen/design-tokens
Description: Tokens used in the Kaizen Design System
Latest version: 11.0.3

# Kaizen Tokens

Design tokens for all platforms.

## About

Design tokens are named and stored visual design traits, including colors, typography, and animation timings. Design Tokens are the heart of every Design System.

The tokens represented here are platform-agnostic (JS object), as this will help us contribute to & facilitate the maintenance of living style guides. This package defines all the option tokens in Kaizen.

In its current state this package supports Sass and Less variables, generated from a JS tokens file.

Note that as we employ [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties), when consuming tokens in SASS/LESS you should assume they will contain values such as `var(--color-...)`, rather than concrete values such as `1.5rem` or `#fff`.

## Installation

```sh
pnpm add @kaizen/design-tokens
```

## Usage

Much of this assumes that consuming repos have setup the `KaizenProvider` - refer to the [App Starter guide](/docs/guides-app-starter--docs) for more.

### SCSS

```scss
@import '~@kaizen/design-tokens/sass/[color/depth/layout/spacing/typography]';
```

Or use the CSS variables directly (Recommended).

```scss
.myCustomClassName {
  background-color: vars(--color-gray-100);
}
```

Read more in [How to use design tokens in SAAS](/docs/guides-tokens-how-to-use-design-tokens-in-sass--docs)

### Less

```less
@import '~@kaizen/design-tokens/less/[color/depth/layout/spacing/typography]';
```

### JavaScript

```jsx
import { tokens } from '@kaizen/design-tokens/js'
```

Read more in [Access tokens via JS](/docs/guides-tokens-access-tokens-via-js--docs)

## Where possible, we keep things unitless.

When adding support for another target the transformation should add the appropriate unit to the artefact. For example, converting typography sizes to Sass/Less should add REM.

### Web

All values in tokens are represented as rem, em or px.

- Use REMs for sizes and spacing.
- Use EMs for media queries.
- Use px for borders.

## Contributing

See [CONTRIBUTING.md](https://github.com/cultureamp/kaizen-design-system/blob/main/CONTRIBUTING.md)
npm package: @kaizen/draft-ally-test
Description: The draft ally-test component
Latest version: 1.0.1-canary-pink-button.1115
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

---
title: "AllyTest"
navTitle: "AllyTest"
summaryParagraph: AllyTest lets the user...
tags: ["Common alternative name", "Another example"]
demoStoryId:  AllyTest-react--default-kaizen-site-demo
---

import WhenToUseAndWhenNotToUse from "docs-components/WhenToUseAndWhenNotToUse"
import WhenToUse from "docs-components/WhenToUse"
import WhenNotToUse from "docs-components/WhenNotToUse"
import DoAndDontContainer from "docs-components/DoAndDontContainer"
import Do from "docs-components/Do"
import Dont from "docs-components/Dont"

<WhenToUseAndWhenNotToUse>

<WhenToUse>

* Use AllyTest when...

</WhenToUse>

<WhenNotToUse>

* When X, use Y component instead.

</WhenNotToUse>

</WhenToUseAndWhenNotToUse>

## See also
- TODO - Is there a relevant or related component? Add it here.
* [Button](/components/button/)

## External links
- TODO - find relevant examples from other systems and add them here.
- [Polaris: button](https://polaris.shopify.com/components/actions/button)
- [Atlassian: button](https://www.atlassian.design/components/button/examples)
npm package: @kaizen/eslint-plugin
Description: `@kaizen/eslint-plugin-kaizen` is a collection of ESLint rules for Kaizen. It aims to solve some of the following problems: - Large-scale migrations of Kaizen packages - Encourage Kaizen best practices and anticipate common mistakes
Latest version: 0.1.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# About
`@kaizen/eslint-plugin-kaizen` is a collection of ESLint rules for Kaizen. It aims to solve some of the following problems:
- Large-scale migrations of Kaizen packages
- Encourage Kaizen best practices and anticipate common mistakes

## Install
Add the package to your project's dependencies:

`yarn add @kaizen/eslint-plugin`

Add the plugin to your Eslint configuration: 
```
{
  plugins: ["@kaizen"],
}
```
Enable the rules you want to use within rules property of your .eslintrc:
```
{
  rules: {
    "@kaizen/no-draft-imports": "error",
  }
}
```
## Rules
| Rule Name  | Description | Autofixable? |
|---|---|---| 
| `kaizen/no-draft-imports` | Reports usages of draft components | yes |
npm package: @kaizen/generator-create
Description: Quickly scaffolds new components in Kaizen
Latest version: 2.0.9

# About 
Generator is a tool to quickly build new components. You have the choice of generating a React component, an Elm component, or both. At a minimum it will: 
* Set up `package.json` with helpful starting scripts
* Set up `tsconfig.dist.json` 
* Generate a folder structure that is consistent with other draft components
* Generate a basic `sass` file

Only generate code for the libraries you intend to write your component in. Adding support for another library in the future is straightforward.

## Install
Install Yeoman first: 
`yarn global add yo`

Then install this generator: 
`yarn global add @kaizen/generator-create`

If you would like to update to the latest generator:
`yarn global add @kaizen/generator-create@latest`

## Usage
1. Run the following and follow the prompts: `yo @kaizen/create:draft` 
2. Choose an appropriate name for your component. See our guide: https://cultureamp.design/components/overview/#naming-things-is-hard!
3. Select whether you'd like to generate React component, Elm component (or both)
4. Done 🎉
   
Run `yarn install` to add this new component to your workspace root. This is required before running `yarn storybook`. 

## Help 
Q: I get an error when I run `yo` in a terminal
A: Yarn bin might not be added to your PATH. Add this to `~/.bash_profile` (or your equivalent): `export PATH="$PATH:$(yarn global bin)"`

Q: I use asdf and I still get the following error `command not found: yo`
A: Try `asdf reshim`
npm package: @kaizen/hosted-assets
Description: Hosted assets for Culture Amp's Kaizen Design System.
Latest version: 2.1.1

# Kaizen Hosted Assets

Hosted assets used in Culture Amp's Kaizen Design System.

## API

### `assetUrl(path)`

Returns the full URL of the asset at `path` managed by the
`kaizen-design-system-assets` service.

**TypeScript/JavaScript**
```ts
assetUrl("some/blob.png") // -> "https://<origin>/some/blob.png"
```

**SCSS**
```scss
asset-url("some/blob.png") // -> "https://<origin>/some/blob.png"
```

## If you want to use an image

1. Make sure the image exists in the [`kaizen-design-system-assets` repo](https://github.com/cultureamp/kaizen-design-system-assets). If it doesn't, make a PR to add it (ask the Design Systems team for review). Images in this repo will be automatically uploaded and made available via a CloudFront distribution.
2. Make sure that the `@kaizen/hosted-assets` package is in your repo's `package.json`. This package provides you the `assetUrl` function that translates the path to the file in the `kaizen-design-system-assets` repo into its equivalent CloudFront URL.
3. Import the `@kaizen/hosted-assets` package and you can access the image through the `assetUrl`/`asset-url` function:

```js
import { assetUrl } from "@kaizen/hosted-assets";

<SomeComponent
  image={assetUrl("illustrations/plant-based-ham-substitute.png")}
/>
```

```scss
// SCSS
@import "~@kaizen/hosted-assets/index";

.coolpic {
  background-image: url(asset-url(
    "illustrations/plant-based-ham-substitute.png"
  ));
}
```

## See also

- [cultureamp/kaizen-design-system-assets](https://github.com/cultureamp/kaizen-design-system-assets/)
npm package: @kaizen/package-bundler
Description: Bundles libraries
Author: Geoffrey Chong
Latest version: 2.0.7

# @kaizen/package-bundler

Bundle packages as CJS and ESM with TypeScript types.

ESM code is tree-shakeable.

```sh
pnpm add -D @kaizen/package-bundler
```

## Presets

The bundler provides two workflow presets; the default preset is intended to bundle simple packages that contain only JS functions, like shared utility libraries (eg, frontend-apis, etc). The Shared UI preset is designed to bundle packages containing shared UI components (eg, [goals-shared-ui](https://github.com/cultureamp/goals-ui/tree/main/packages/goals-shared-ui)) and includes additional steps for bundling and exposing stylesheets and translations.

- [Default preset](src/presets/default/README.md)
- [Shared UI preset](src/presets/shared-ui/README.md)

## Package entrypoints

Depending on the compatibility you wish to provide for your consumer, you may need to define your `package.json` differently.
Read more about [the different types of package.json entrypoints here](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).

### Node 12+

If your consumers are all using Node 12+ (including using TypeScript [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) `node16`/`nodenext`/`bundler`), you should be able to use the [`exports`](https://nodejs.org/api/packages.html#exports) field if you have multiple entrypoints.

### Node <=10

If your consumers may be using version 10 or lower (or are using TypeScript [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) `classic`/`node`/`node10`), the `exports` field will not be resolved. Your only option will be to utilise `main` (resolves CJS), `module` (resolves ESM), and `types` (resolves TypeScript).

Should you want multiple entrypoints, you will need to create a directory relative from the root of the package and create a `package.json` within that contains the extra resolutions.

Eg. If we want to create an entrypoint at `@kaizen/package-bundler/next`:

Folder structure:

```md
- next/
  - package.json
- src/...
- package.json
```

Contents for `next/package.json` (adjust your paths based on your defined dist structure).

```json
{
  "main": "../dist/cjs/next.cjs",
  "module": "../dist/esm/next.mjs",
  "types": "../dist/types/__next__/index.d.ts"
}
```

You will also need to ensure that this directory is included in your distributed package, so in the main `package.json`, ensure the directory is included in `files`.

```json
"files": [
  "dist",
  "next"
]
```
npm package: @kaizen/page-layout
Description: The content block component
Latest version: 1.3.1-canary.1943

---
title: "Content"
navTitle: "Content"
summaryParagraph:
  Content limits the width its content to the maximum allowed width for any
  given screen size, and centres it within the viewport.
tags: ["Content", "Structure"]
demoStoryId: Content-react--default
---

import WhenToUseAndWhenNotToUse from "docs-components/WhenToUseAndWhenNotToUse"
import WhenToUse from "docs-components/WhenToUse"
import WhenNotToUse from "docs-components/WhenNotToUse"
import DoAndDontContainer from "docs-components/DoAndDontContainer"
import Do from "docs-components/Do"
import Dont from "docs-components/Dont"

## To keep in mind

* `Content` will match the width and alignment of the `TitleBlockZen`
  content
* `Content` should be used as a wrapper for most page content below the
  title block
* `Content` should **always** be wrapped in a `Container` to
  ensure it is spaced correctly
* `Container` will stretch to the edge of the viewport, and so it
  can be used as a container for full-width elements (backgrounds)

<WhenToUseAndWhenNotToUse>

<WhenToUse>

* Use Content as a wrapper for most page content below the title block

</WhenToUse>

<WhenNotToUse>

* When you’re implementing the "skirt" below the title block — there’s a
  specific `Skirt` component for that

</WhenNotToUse>

</WhenToUseAndWhenNotToUse>
npm package: @kaizen/react-deprecate-warning
Description: React Deprecated Warning is a higher order component that warns that a component is deprecated. This works with both deprecated components, and deprecated props.
Latest version: 1.2.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# React Deprecate Warning
React Deprecated Warning is a higher order component that warns that a component is deprecated. This works with both deprecated components, and deprecated props.

## Install
`yarn add @kaizen/react-deprecate-warning` 

## Usage

### Deprecate a component
```
withDeprecatedComponent(YourComponent, {
  warning: 'This component is deprecated, use ComponentB instead',
})
```

### Deprecate a prop
```
withDeprecatedProp(YourComponent, {
  warning: {
    test: "test is deprecated, use anotherProp instead",
  },
})
```

### Deprecate values within a prop
```
withDeprecatedProp(YourComponent, {
  warning: {
    variant: [
      {
        key: "original",
        warning: "original is deprecated, use prominent instead",
      },
      {
        key: "zen",
        warning: "zen is deprecated, use default instead",
      },
    ],
  },
})

<YourComponent variant="default"> // fine, no warning
<YourComponent variant="original"> // warning, logs "original is deprecated, use prominent instead"
```
npm package: @kaizen/well
Description: The well component
Latest version: 3.2.1-canary.1943

---
title: "Well"
navTitle: "Well"
summaryParagraph: Wells are used as a visual container around secondary content.
tags: ["Placeholder", "Content area", "Frame", "Card", "Group", "Box", "Container"]
needToKnow:
- "For primary content, use a Card instead."
- "Usually, wells are used in other components, such as Empty States and drag and drop file upload, instead of independently."
demoStoryId: well-react--default-with-solid-border-kaizen-site-demo
---

import WhenToUseAndWhenNotToUse from "docs-components/WhenToUseAndWhenNotToUse"
import WhenToUse from "docs-components/WhenToUse"
import WhenNotToUse from "docs-components/WhenNotToUse"

## UI Kit

<iframe style="border: none;" width="744" height="450" src="https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Ffile%2FeZKEE5kXbEMY3lx84oz8iN%2F%25E2%259D%25A4%25EF%25B8%258F-UI-Kit-Heart%3Fnode-id%3D1929%253A14168" allowfullscreen></iframe>

## Options

*   Mood:
    *   Default
    *   Positive
    *   Informative
    *   Cautionary
    *   Negative
    *   Assertive
    *   Prominent
    
*   Border style:
    *   Solid
    *   Dashed
    *   None

## To keep in mind

* We need boundaries to define or contextualize secondary content. Wells can provide a way to do this visually.
* An Empty State Well defines an area that doesn’t currently have content, but could.
* A Drag & Drop Well provides a visible target to drop content into.
* An Internal Content Well helps to define, divide or shape content within a card.
* An External Content Well wraps one or more cards or pieces of content into a group.

## When to use and when not to use

<WhenToUseAndWhenNotToUse>
<WhenToUse>

* Use a well for secondary content.

</WhenToUse>
<WhenNotToUse>

* For primary content, use a [Card](/components/card) instead.
* Don’t use a well inside well (even if there is a card separating them).
* Don’t use as a [Notification](/components/inline-notification).
* Don’t use as a [Tooltip](/components/tooltip).

</WhenNotToUse>
</WhenToUseAndWhenNotToUse>


## External links

Here are some examples of other existing design systems:

- [Adobe coral UI](https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/coral-ui/coralui3/getting-started.html).
- [Bootstrap 3 Wells](https://getbootstrap.com/docs/3.4/components/#wells).
npm package: @kaizen403/realtime-semantic-search
Description: Library-first realtime RAG engine with pgvector and streaming generation.
Latest version: 0.1.1

# Realtime RAG (TypeScript)

Library-first, realtime RAG engine built for production. This is infrastructure, not a chatbot.

You get:
- Realtime ingestion and updates
- pgvector-powered retrieval
- Streaming generation
- Pluggable embeddings and LLMs
- Prisma-friendly store
- Postgres-native LISTEN/NOTIFY
- Node or Bun runtime

## Install

```bash
npm install realtime-rag @prisma/client
```

## Project layout

```
realtime-rag/
├─ src/
│  ├─ index.ts
│  ├─ rag/
│  │  ├─ createRAG.ts
│  │  ├─ RAG.ts
│  │  └─ types.ts
│  ├─ ingestion/
│  │  ├─ chunk.ts
│  │  ├─ embed.ts
│  │  └─ ingest.ts
│  ├─ retrieval/
│  │  └─ retrieve.ts
│  ├─ generation/
│  │  └─ stream.ts
│  ├─ stores/
│  │  ├─ pgvector.ts
│  │  └─ memory.ts
│  ├─ realtime/
│  │  └─ postgres.ts
│  ├─ adapters/
│  │  ├─ langchain.ts
│  │  └─ vercel-ai.ts
│  └─ utils/
│     └─ hash.ts
├─ prisma/
│  └─ schema.prisma
├─ tsup.config.ts
├─ package.json
└─ README.md
```

## Core interfaces

```ts
export interface Embedder {
  embed(texts: string[]): Promise<number[][]>
}

export interface LLM {
  stream(prompt: string): AsyncIterable<string>
}

export interface VectorStore {
  upsert(vectors: StoredVector[]): Promise<void>
  query(vector: number[], k: number): Promise<StoredVector[]>
  delete(ids: string[]): Promise<void>
}
```

## Quickstart

```ts
import { createRAG, memoryStore } from "realtime-rag"

const rag = createRAG({
  embedder,
  llm,
  store: memoryStore()
})

await rag.add({ id: "doc-1", text: "Hello world" })

for await (const token of rag.ask("What is hello?")) {
  process.stdout.write(token)
}
```

## Prisma + pgvector schema

```prisma
model Embedding {
  id        String   @id
  content   String
  embedding Unsupported("vector(1536)")
  metadata  Json?
  updatedAt DateTime @updatedAt
}
```

Enable pgvector:

```sql
CREATE EXTENSION IF NOT EXISTS vector;
CREATE INDEX embedding_idx ON "Embedding"
USING ivfflat (embedding vector_cosine_ops);
```

## pgvector store

```ts
import { PrismaClient } from "@prisma/client"
import { createRAG, pgVectorStore } from "realtime-rag"

const prisma = new PrismaClient()

const rag = createRAG({
  embedder,
  llm,
  store: pgVectorStore(prisma)
})
```

## Realtime sync (Postgres)

```ts
import { Client } from "pg"
import { postgresRealtime } from "realtime-rag"

const client = new Client({ connectionString: process.env.DATABASE_URL })
await client.connect()

const realtime = postgresRealtime(client, { channel: "rag_updates" })
```

## Build

```bash
npm run build
```

## License

MIT