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

@repull/ai-sdk

v0.1.0

Published

Vercel AI SDK tool bindings for the Repull API — drop-in tools for streamText / generateText / Tool agents.

Readme

@repull/ai-sdk

Vercel AI SDK tool bindings for the Repull API.

Drop these tools into any streamText / generateText call (or any AI SDK Tool agent) and your model gets live, typed access to the Repull platform — properties, reservations, Airbnb listings, and the Connect-session flow that wires up new providers.

import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { RepullClient, repullTools } from '@repull/ai-sdk';

const client = new RepullClient({ apiKey: process.env.REPULL_API_KEY! });

const result = streamText({
  model: openai('gpt-4o'),
  tools: repullTools(client),
  prompt: 'List my last 10 reservations',
});

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

That's it. Same pattern works for @ai-sdk/anthropic, @ai-sdk/google, or any other AI SDK provider — the tools are model-agnostic.

Install

npm install @repull/ai-sdk ai zod
# plus a model provider, e.g.
npm install @ai-sdk/openai

ai and zod are peer dependencies — bring your own version (AI SDK 4.x / 5.x / 6.x are all supported).

Auth

Get an API key at https://repull.dev/dashboard and pass it to the client:

const client = new RepullClient({
  apiKey: process.env.REPULL_API_KEY!,
  baseUrl: 'https://api.repull.dev', // default
  timeoutMs: 30_000,                  // default
});

The key is sent as Authorization: Bearer … on every request. Don't ship the key to the browser — call the AI SDK from a Next.js Route Handler / Server Action / Edge function.

Tools

repullTools(client) returns six tools, ready to drop into the AI SDK:

| Tool | API endpoint | Mutates? | What it does | |---|---|---|---| | listReservations | GET /v1/reservations | no | List reservations across all channels, with filters for platform, status, and check-in date range. | | getReservation | GET /v1/reservations/{id} | no | Fetch a single reservation by Repull ID. | | listAirbnbListings | GET /v1/channels/airbnb/listings | no | List Airbnb listings on the connected account. | | listProperties | GET /v1/properties | no | List properties under management across all connected providers. | | healthCheck | GET /v1/health | no | Verify the API is reachable and the key works. | | createConnectSession | POST /v1/connect/{provider} | yes | Start a Repull Connect flow for a provider — returns OAuth URL (Airbnb) or activates a credential-based connection (PMS). The only mutating tool in this set. |

Inputs are validated with Zod. Outputs follow { ok: true, data } | { ok: false, error } so the model can recover from API errors instead of hard-aborting the stream.

Run the example

A complete, runnable demo lives in examples/chat.ts:

REPULL_API_KEY=sk_repull_... \
OPENAI_API_KEY=sk-... \
  npx tsx examples/chat.ts

Use only some tools

The returned object is plain — destructure or omit freely:

const { listReservations, listProperties } = repullTools(client);

await streamText({
  model: openai('gpt-4o'),
  tools: { listReservations, listProperties }, // read-only subset
  prompt: '...',
});

Mix with your own tools

import { tool } from 'ai';
import { z } from 'zod';

const tools = {
  ...repullTools(client),
  greet: tool({
    description: 'Say hello to a guest',
    inputSchema: z.object({ name: z.string() }),
    execute: async ({ name }) => `Hello, ${name}!`,
  }),
};

Errors

Failed API calls don't throw out of execute — they return { ok: false, error: { status, message, body } } so the model can apologize, retry, or escalate. If you want classic exception flow for non-tool callsites, the underlying RepullApiError is also exported:

import { RepullApiError } from '@repull/ai-sdk';

License

MIT — see LICENSE. Use it, fork it, ship products on it. The Repull API itself is gated by your API key; this SDK is a thin, free wrapper.

Links