npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nativ-vercel-ai

v0.1.0

Published

Nativ localization tools for the Vercel AI SDK — translate, search TM, and more as AI agent tools

Readme

nativ-vercel-ai

Nativ localization tools for the Vercel AI SDK. Give any AI agent the ability to translate, search translation memory, and manage localization settings — all using your team's brand voice and style guides.

npm License: MIT

Install

npm install nativ-vercel-ai ai zod

Quick start

import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createNativTools } from "nativ-vercel-ai";

const nativTools = createNativTools(); // reads NATIV_API_KEY from env

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools: nativTools,
  maxSteps: 5,
  prompt: 'Translate "Welcome back!" into French, German, and Japanese.',
});

console.log(text);

Configuration

// Pass options explicitly
const tools = createNativTools({
  apiKey: "nativ_...",
  baseUrl: "https://api.usenativ.com",  // default
  timeout: 120_000,                      // default: 2 minutes
});

// Or set environment variable
// NATIV_API_KEY=nativ_...
const tools = createNativTools();

Get your API key at dashboard.usenativ.com → Settings → API Keys.

Available tools

| Tool | Description | |------|-------------| | nativ_translate | Translate text with cultural adaptation, TM matching, and rationale | | nativ_translate_batch | Translate multiple texts to the same target language | | nativ_search_translation_memory | Search existing translations for consistency | | nativ_add_translation_memory | Store an approved translation for future reuse | | nativ_get_languages | List configured languages with formality settings | | nativ_get_style_guides | Get all style guides | | nativ_get_brand_voice | Get the brand voice prompt | | nativ_get_tm_stats | Translation memory statistics |

Use with streamText

import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createNativTools } from "nativ-vercel-ai";

const result = streamText({
  model: openai("gpt-4o"),
  tools: createNativTools(),
  maxSteps: 5,
  prompt: "What languages do we support?",
});

for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

Cherry-pick tools

const allTools = createNativTools();

// Only expose translate to the model
const { text } = await generateText({
  model: openai("gpt-4o"),
  tools: {
    nativ_translate: allTools.nativ_translate,
  },
  prompt: 'Say "Thank you" in Korean',
});

Next.js route handler

// app/api/chat/route.ts
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createNativTools } from "nativ-vercel-ai";

export async function POST(req: Request) {
  const { messages } = await req.json();

  const result = streamText({
    model: openai("gpt-4o"),
    tools: createNativTools(),
    maxSteps: 10,
    messages,
  });

  return result.toDataStreamResponse();
}

How it works

createNativTools() instantiates a nativ-sdk client and wraps each API method as a Vercel AI SDK tool() with typed Zod schemas. The tools are provider-agnostic — they work with OpenAI, Anthropic, Google, and any model the AI SDK supports.

Related packages

| Package | Description | |---------|-------------| | nativ-sdk | Node.js/TypeScript SDK | | nativ | Python SDK | | langchain-nativ | LangChain tools | | nativ-mcp | MCP server |

License

MIT — see LICENSE.