open-index/open-npm huggingface dataset:
npm package: @pluckr/redis
Description: Redis storage backend for @pluckr/core
Latest version: 0.1.1

# @pluckr/redis

Redis storage backend for [`@pluckr/core`](https://www.npmjs.com/package/@pluckr/core). Persists selector caches in Redis so repeated extractions skip the LLM entirely. Ideal for distributed deployments where multiple instances share the same cache.

## Installation

```bash
npm install @pluckr/core @pluckr/redis
```

## Usage

```typescript
import { Pluckr } from '@pluckr/core'
import { RedisStorage } from '@pluckr/redis'
import { anthropic } from '@ai-sdk/anthropic'

const pluckr = new Pluckr({
  model: anthropic('claude-haiku-4-5-20251001'),
  storage: new RedisStorage(),  // defaults to localhost:6379
})

const result = await pluckr.extract({
  html: '<html>...</html>',
  schema: ProductSchema,
  cacheKey: 'my-product-page',
})

await pluckr.close()
```

## Options

```typescript
new RedisStorage({
  url: 'redis://user:pass@host:6379',  // connection URL
  prefix: 'pluckr:',                    // key prefix (default)
  ttl: 60 * 60 * 24,                    // expire after 24h (default: no expiry)
})
```

## BYO Redis instance

```typescript
import Redis from 'ioredis'

const redis = new Redis({ host: 'cache.internal', port: 6379 })

const storage = new RedisStorage({ redis })
// close() is a no-op — you manage the connection lifecycle
```

## What it stores

Each cache entry is a JSON string stored at `pluckr:{cacheKey}:{schemaHash}`:

| Field | Description |
|-------|-------------|
| `fieldMappings` | CSS selectors + transforms for each schema field |
| `consecutiveFailures` | Failure count (triggers `PERMANENT_FAILURE` after 4) |

## Clearing the cache

```bash
# All pluckr keys
redis-cli KEYS "pluckr:*" | xargs redis-cli DEL

# Specific key
redis-cli DEL "pluckr:my-product-page:abc123"
```

## License

MIT
npm package: @pluckr/sqlite
Description: SQLite storage backend for @pluckr/core
Latest version: 0.1.1

# @pluckr/sqlite

SQLite storage backend for [`@pluckr/core`](https://www.npmjs.com/package/@pluckr/core). Persists selector caches to disk so repeated extractions skip the LLM entirely.

## Installation

```bash
npm install @pluckr/core @pluckr/sqlite
```

## Usage

```typescript
import { Pluckr } from '@pluckr/core'
import { SqliteStorage } from '@pluckr/sqlite'
import { anthropic } from '@ai-sdk/anthropic'

const pluckr = new Pluckr({
  model: anthropic('claude-haiku-4-5-20251001'),
  storage: new SqliteStorage(),  // defaults to .pluckr/cache.db
})

const result = await pluckr.extract({
  html: '<html>...</html>',
  schema: ProductSchema,
  cacheKey: 'my-product-page',
})

await pluckr.close()
```

## Custom path

```typescript
new SqliteStorage('/path/to/custom/cache.db')
```

## Clearing the cache

```bash
rm -rf .pluckr/
```

## What it stores

| Column | Description |
|--------|-------------|
| `key` | The `cacheKey` you pass to `extract()` |
| `schema_hash` | SHA256 hash of your Zod schema fields |
| `selectors` | JSON field mappings (CSS selectors + transforms) |
| `consecutive_failures` | Failure count (triggers `PERMANENT_FAILURE` after 4) |

## License

MIT
npm package: @plucky-ai/chat-sdk
Description: A lightweight SDK for integrating Plucky into your applications. Access the full docs [here](https://docs.plucky.ai).
Latest version: 0.7.0

# @plucky-ai/chat-sdk

A lightweight SDK for integrating Plucky into your applications. Access the full docs [here](https://docs.plucky.ai).

## Installation

```bash
npm install @plucky-ai/chat-sdk
# or
yarn add @plucky-ai/chat-sdk
# or
pnpm add @plucky-ai/chat-sdk
```

## Usage

```javascript
import { Plucky, sendMessage } from '@plucky-ai/chat-sdk'

const APP_ID = 'Your app id'
const BASE_URL = 'https://widget.plucky.ai'

Plucky({
  appId: APP_ID,
  baseUrl: BASE_URL,
  user: {
    id: 'user-123',
    name: 'John Doe',
    email: 'john@example.com',
    createdAt: '2024-01-15T00:00:00.000Z',
  },
})

sendMessage({
  content: 'Hello world!',
  createChat: true,
})
```