open-index/open-npm huggingface dataset:
npm package: @semilayer/data-mapping
Description: SemiLayer data mapping — field renaming, transforms, null handling
Latest version: 1.2.0

<p align="right">
  <img src="https://raw.githubusercontent.com/semilayer/semilayer/main/assets/logo.png" alt="SemiLayer" width="120" />
  <br />
  <strong>@semilayer/data-mapping</strong>
</p>

<p align="right">
Field mapping and transform chains for <a href="https://semilayer.com">SemiLayer</a> — rename source columns, coerce types, concat, lowercase, truncate, and more. Used by the ingest pipeline; can be imported directly for tests or ad-hoc transforms.
</p>

---

## Install

```bash
pnpm add @semilayer/data-mapping
```

## Usage

```ts
import { applyMapping } from '@semilayer/data-mapping'

const out = applyMapping(
  { id: 1, title: 'Hello', body: 'World' },
  {
    fields: {
      title: { from: 'title', transforms: [{ op: 'lowercase' }] },
      content: { from: ['title', 'body'], transforms: [{ op: 'concat', sep: ' — ' }] },
    },
  },
)
// → { title: 'hello', content: 'Hello — World' }
```

Supports 14 built-in transforms. See [semilayer.dev](https://semilayer.dev) for the full list.

## License

MIT
npm package: @semilayer/mcp
Description: SemiLayer MCP server — AI agent integration
Latest version: 1.2.0

<p align="right">
  <img src="https://raw.githubusercontent.com/semilayer/semilayer/main/assets/logo.png" alt="SemiLayer" width="120" />
  <br />
  <strong>@semilayer/mcp</strong>
</p>

<p align="right">
<a href="https://modelcontextprotocol.io">Model Context Protocol</a> server for <a href="https://semilayer.com">SemiLayer</a> — exposes your lenses as tools to Claude, Cursor, and any other MCP-aware AI agent. Point it at a SemiLayer project and your agents get semantic search over your data for free.
</p>

---

## Install

```bash
pnpm add @semilayer/mcp
```

## Usage

Add to your MCP client config (e.g. Claude Desktop):

```json
{
  "mcpServers": {
    "semilayer": {
      "command": "npx",
      "args": ["-y", "@semilayer/mcp"],
      "env": {
        "SEMILAYER_API_KEY": "sk_live_..."
      }
    }
  }
}
```

The server exposes one tool per lens with the lens's facets (search, similar, query) as parameters.

See [semilayer.dev](https://semilayer.dev) for the full docs.

## License

MIT
npm package: @semilayer/react
Description: SemiLayer React hooks — useSearch, useSimilar, useQuery
Latest version: 1.2.1

<p align="right">
  <img src="https://raw.githubusercontent.com/semilayer/semilayer/main/assets/logo.png" alt="SemiLayer" width="120" />
  <br />
  <strong>@semilayer/react</strong>
</p>

<p align="right">
React hooks for <a href="https://semilayer.com">SemiLayer</a> — <code>useSearch</code>, <code>useSimilar</code>, <code>useQuery</code>. Thin wrappers over <a href="https://www.npmjs.com/package/@semilayer/client"><code>@semilayer/client</code></a> that handle loading, error, and pagination state.
</p>

---

## Install

```bash
pnpm add @semilayer/react @semilayer/client
```

## Usage

```tsx
import { SemiLayerProvider, useSearch } from '@semilayer/react'

function App() {
  return (
    <SemiLayerProvider apiKey={process.env.NEXT_PUBLIC_SEMILAYER_KEY!}>
      <Search />
    </SemiLayerProvider>
  )
}

function Search() {
  const { data, loading } = useSearch('articles', { query: 'renewable energy' })
  if (loading) return <Spinner />
  return <ul>{data?.map((r) => <li key={r.id}>{r.title}</li>)}</ul>
}
```

See [semilayer.dev](https://semilayer.dev) for the full docs.

## License

MIT