open-index/open-npm huggingface dataset:
npm package: @sanghyuk-2i/huh-cli
Description: CLI tool for huh — init, pull from Google Sheets, validate
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-cli

CLI tool for **Huh** - Pull error content from Google Sheets, Airtable, Notion, CSV, or XLSX.

## Features

- 📊 **Multi-source Support**: Google Sheets, Airtable, Notion, CSV, XLSX
- ✅ **Validation**: Built-in schema validation with helpful errors
- 🌍 **i18n**: Multi-language error content management
- 🎨 **Visual Testing**: Screenshot testing with Playwright
- 🔄 **Watch Mode**: Auto-sync on file changes

## Installation

```bash
npm install -g @sanghyuk-2i/huh-cli
```

## Quick Start

```bash
# Initialize configuration
huh init

# Pull from data source
huh pull

# Visual testing (optional)
huh test
```

## Configuration

Create `.huh.config.json`:

```json
{
  "source": {
    "type": "google-sheets",
    "sheetId": "your-sheet-id",
    "range": "Sheet1!A1:Z"
  },
  "output": "src/huh.json"
}
```

## Supported Data Sources

### Google Sheets

```json
{
  "type": "google-sheets",
  "sheetId": "1abc...",
  "range": "Sheet1!A1:Z"
}
```

### Airtable

```json
{
  "type": "airtable",
  "baseId": "appXXX",
  "tableId": "tblXXX"
}
```

### Notion

```json
{
  "type": "notion",
  "databaseId": "xxx-xxx-xxx"
}
```

### CSV / XLSX

```json
{
  "type": "csv",
  "filePath": "./errors.csv"
}
```

## Multi-language Support

```json
{
  "source": { "type": "google-sheets", "sheetId": "..." },
  "output": "src/locales",
  "i18n": {
    "defaultLocale": "en",
    "locales": {
      "en": { "range": "English!A1:Z" },
      "ko": { "range": "Korean!A1:Z" }
    }
  }
}
```

## Documentation

- [CLI Reference](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/api/cli.mdx)
- [Data Source Guides](https://github.com/sanghyuk-2i/huh/tree/main/docs/en/guides)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)
npm package: @sanghyuk-2i/huh-core
Description: Huh - error content JSON DSL core: types, parsing, variable substitution, validation
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-core

Core library for **Huh** - Manage error content in spreadsheets with type-safe runtime UI rendering.

## Features

- 📋 **JSON DSL**: Parse error content from external data sources
- 🔄 **Variable Substitution**: Dynamic content with template variables
- ✅ **Validation**: Built-in schema validation with helpful error messages
- 🌍 **i18n Support**: Multi-language error content management
- 🔌 **Plugin System**: Extend with Sentry, Datadog, and custom integrations
- 📊 **Severity Levels**: Critical, high, medium, low error classification

## Installation

```bash
npm install @sanghyuk-2i/huh-core
```

## Basic Usage

```typescript
import { parseSheetData, resolveError } from '@sanghyuk-2i/huh-core';

// Parse error configuration from data source
const errorConfig = parseSheetData(rows);

// Resolve error with variables
const resolved = resolveError(
  errorConfig,
  'AUTH_001',
  { username: 'john' }
);

console.log(resolved.message); // "User john not found"
```

## Framework Bindings

Use framework-specific packages for easier integration:

- **React**: `@sanghyuk-2i/huh-react`
- **Vue**: `@sanghyuk-2i/huh-vue`
- **Svelte**: `@sanghyuk-2i/huh-svelte`

## Documentation

- [Getting Started](https://github.com/sanghyuk-2i/huh#readme)
- [Architecture](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/architecture.mdx)
- [API Reference](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/api/core.mdx)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)
npm package: @sanghyuk-2i/huh-plugin-datadog
Description: Datadog integration plugin for huh — automatic error logging and action tracking
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-plugin-datadog

Datadog integration plugin for **Huh** - Automatic error logging and action tracking.

## Features

- 📊 **Auto Error Logging**: Automatically log errors to Datadog
- 📈 **Custom Metrics**: Track error frequency and patterns
- 🏷️ **Tags & Attributes**: Rich error context
- ⚙️ **Configurable**: Filter errors, customize attributes

## Installation

```bash
npm install @sanghyuk-2i/huh-plugin-datadog @sanghyuk-2i/huh-core @datadog/browser-logs
```

## Usage

```typescript
import { datadogLogs } from '@datadog/browser-logs';
import { createDatadogPlugin } from '@sanghyuk-2i/huh-plugin-datadog';

// Initialize Datadog
datadogLogs.init({
  clientToken: 'your-client-token',
  site: 'datadoghq.com',
  service: 'your-app',
  env: 'production'
});

// Create plugin
const datadogPlugin = createDatadogPlugin({
  logErrors: true,
  beforeLog: (error) => {
    // Filter or modify before logging
    return error.severity !== 'low';
  }
});

// Use with framework bindings
import { HuhProvider } from '@sanghyuk-2i/huh-react';

<HuhProvider config={errorConfig} plugins={[datadogPlugin]}>
  <App />
</HuhProvider>
```

## Configuration Options

```typescript
createDatadogPlugin({
  // Log errors to Datadog (default: true)
  logErrors: true,

  // Filter errors before logging
  beforeLog: (error) => boolean,

  // Add custom attributes
  globalAttributes: {
    team: 'frontend',
    feature: 'auth'
  }
});
```

## What Gets Logged

### Error Logs
- Error code and message
- Severity level (status)
- Error type
- Variables and context
- User information (if available)

### Action Logs
- Action type (REDIRECT, DISMISS, CALLBACK)
- Target URL (for REDIRECT)
- Timestamp

## Log Levels

Huh severity maps to Datadog status:
- `critical` → `error`
- `high` → `error`
- `medium` → `warn`
- `low` → `info`

## Documentation

- [Plugin Guide](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/guides/plugins.mdx)
- [Getting Started](https://github.com/sanghyuk-2i/huh#readme)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)
npm package: @sanghyuk-2i/huh-plugin-sentry
Description: Sentry integration plugin for huh — automatic error reporting and action breadcrumbs
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-plugin-sentry

Sentry integration plugin for **Huh** - Automatic error reporting and action breadcrumbs.

## Features

- 🐛 **Auto Error Capture**: Automatically report errors to Sentry
- 📊 **Severity Mapping**: Map Huh severity to Sentry levels
- 🍞 **Breadcrumbs**: Track error actions as breadcrumbs
- 🏷️ **Tags & Context**: Rich error context and user info
- ⚙️ **Configurable**: Filter errors, customize tags

## Installation

```bash
npm install @sanghyuk-2i/huh-plugin-sentry @sanghyuk-2i/huh-core @sentry/browser
```

## Usage

```typescript
import * as Sentry from '@sentry/browser';
import { createSentryPlugin } from '@sanghyuk-2i/huh-plugin-sentry';

// Initialize Sentry
Sentry.init({
  dsn: 'your-sentry-dsn',
  environment: 'production'
});

// Create plugin
const sentryPlugin = createSentryPlugin({
  captureErrors: true,
  captureBreadcrumbs: true,
  beforeCapture: (error) => {
    // Filter or modify before sending
    return error.severity === 'critical';
  }
});

// Use with framework bindings
import { HuhProvider } from '@sanghyuk-2i/huh-react';

<HuhProvider config={errorConfig} plugins={[sentryPlugin]}>
  <App />
</HuhProvider>
```

## Configuration Options

```typescript
createSentryPlugin({
  // Capture errors to Sentry (default: true)
  captureErrors: true,

  // Add breadcrumbs for error actions (default: true)
  captureBreadcrumbs: true,

  // Filter errors before capture
  beforeCapture: (error) => boolean,

  // Add custom tags
  tags: { team: 'frontend', feature: 'auth' }
});
```

## What Gets Captured

### Error Events
- Error code and message
- Severity level (critical → error, high → warning, etc.)
- Variables and context
- User information (if available)

### Breadcrumbs
- Error displayed
- Action clicked (REDIRECT, DISMISS, CALLBACK)
- Navigation events

## Documentation

- [Plugin Guide](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/guides/plugins.mdx)
- [Getting Started](https://github.com/sanghyuk-2i/huh#readme)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)
npm package: @sanghyuk-2i/huh-react
Description: React bindings for huh — HuhProvider and useHuh hook
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-react

React bindings for **Huh** - Manage error content in spreadsheets with type-safe runtime UI rendering.

## Features

- ⚛️ **React 18+**: Hooks and Context API
- 🎨 **Custom Renderers**: Full control over error UI
- 🔄 **Auto-dismiss**: Configurable timeout
- 🌍 **i18n**: Multi-language support with locale switching
- 🧭 **Router Support**: Next.js, Remix custom routing integration

## Installation

```bash
npm install @sanghyuk-2i/huh-react @sanghyuk-2i/huh-core
```

## Basic Usage

```tsx
import { HuhProvider, useHuh } from '@sanghyuk-2i/huh-react';
import errorConfig from './huh.json';

function App() {
  return (
    <HuhProvider
      config={errorConfig}
      renderers={{
        alert: ({ error }) => <Alert>{error.message}</Alert>,
        toast: ({ error }) => <Toast>{error.message}</Toast>
      }}
    >
      <YourApp />
    </HuhProvider>
  );
}

function YourComponent() {
  const { huh } = useHuh();

  const handleError = () => {
    huh('AUTH_001', { username: 'john' });
  };

  return <button onClick={handleError}>Trigger Error</button>;
}
```

## With Next.js Router

```tsx
'use client';
import { useRouter } from 'next/navigation';

function App() {
  const router = useRouter();

  return (
    <HuhProvider
      config={errorConfig}
      router={{
        push: router.push,
        back: router.back
      }}
    >
      <YourApp />
    </HuhProvider>
  );
}
```

## Documentation

- [API Reference](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/api/react.mdx)
- [Getting Started](https://github.com/sanghyuk-2i/huh#readme)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)
npm package: @sanghyuk-2i/huh-svelte
Description: Svelte bindings for huh — HuhProvider and useHuh
Author: sanghyuk-2i
Latest version: 0.1.1

# @sanghyuk-2i/huh-svelte

Svelte bindings for **Huh** - Manage error content in spreadsheets with type-safe runtime UI rendering.

## Features

- 🔥 **Svelte 5+**: Runes API with $state and $derived
- 🎨 **Custom Renderers**: Full control over error UI with snippets
- 🔄 **Auto-dismiss**: Configurable timeout
- 🌍 **i18n**: Multi-language support with locale switching
- 🧭 **Router Support**: SvelteKit custom routing integration

## Installation

```bash
npm install @sanghyuk-2i/huh-svelte @sanghyuk-2i/huh-core
```

## Basic Usage

```svelte
<script>
  import { HuhProvider } from '@sanghyuk-2i/huh-svelte';
  import errorConfig from './huh.json';

  const renderers = {
    alert: (error) => {
      // Return Svelte component or snippet
    },
    toast: (error) => {
      // Return Svelte component or snippet
    }
  };
</script>

<HuhProvider config={errorConfig} {renderers}>
  <YourApp />
</HuhProvider>
```

```svelte
<!-- In a component -->
<script>
  import { useHuh } from '@sanghyuk-2i/huh-svelte';

  const { huh } = useHuh();

  function handleError() {
    huh('AUTH_001', { username: 'john' });
  }
</script>

<button on:click={handleError}>Trigger Error</button>
```

## With SvelteKit

```svelte
<script>
  import { goto } from '$app/navigation';

  const router = {
    push: goto,
    back: () => history.back()
  };
</script>

<HuhProvider config={errorConfig} {router}>
  <YourApp />
</HuhProvider>
```

## Documentation

- [API Reference](https://github.com/sanghyuk-2i/huh/blob/main/docs/en/api/svelte.mdx)
- [Getting Started](https://github.com/sanghyuk-2i/huh#readme)

## License

MIT © [sanghyuk-2i](https://github.com/sanghyuk-2i)