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

@vibe-kit/sdk

v0.0.70

Published

VibeKit SDK is a TypeScript library that provides a fluent interface for integrating AI coding agents into your applications. It supports multiple AI providers (Claude, Codex, Gemini, Grok, OpenCode) and various sandbox environments for secure code execut

Downloads

634

Readme

@vibe-kit/sdk

VibeKit SDK is a TypeScript library that provides a fluent interface for integrating AI coding agents into your applications. It supports multiple AI providers (Claude, Codex, Gemini, Grok, OpenCode) and various sandbox environments for secure code execution.

Installation

npm install @vibe-kit/sdk

Quick Start

import { VibeKit } from "@vibe-kit/sdk";
import { createE2BProvider } from "@vibe-kit/e2b";

// Configure sandbox provider
const e2bProvider = createE2BProvider({
  apiKey: process.env.E2B_API_KEY!,
  templateId: "vibekit-claude",
});

// Create and configure VibeKit instance
const vibeKit = new VibeKit()
  .withAgent({
    type: "claude",
    provider: "anthropic",
    apiKey: process.env.ANTHROPIC_API_KEY!,
    model: "claude-sonnet-4-20250514",
  })
  .withSandbox(e2bProvider);

// Add event listeners
vibeKit.on("update", (update) => {
  console.log("Update:", update);
});

vibeKit.on("error", (error) => {
  console.error("Error:", error);
});

// Generate code
const result = await vibeKit.generateCode({
  prompt: "Create a simple web app that displays a list of users",
  mode: "code",
});

// Clean up when done
await vibeKit.kill();

console.log("Result:", result);

Configuration

Agent Configuration

Configure which AI agent to use:

.withAgent({
  type: "claude",           // Agent type: "claude", "codex", "opencode", "gemini", "grok"
  provider: "anthropic",    // Provider: "anthropic", "openai", "openrouter", etc.
  apiKey: "your-api-key",   // API key for the provider
  model: "claude-sonnet-4-20250514", // Specific model to use
})

Sandbox Configuration

Configure the execution environment. Install the specific provider package first:

// E2B
import { createE2BProvider } from "@vibe-kit/e2b";
const e2bProvider = createE2BProvider({
  apiKey: "e2b_****",
  templateId: "custom-template-id" // optional
});

// Northflank
import { createNorthflankProvider } from "@vibe-kit/northflank";
const northflankProvider = createNorthflankProvider({
  apiKey: "nf_****",
  image: "your-custom-image", // optional
});

// Daytona
import { createDaytonaProvider } from "@vibe-kit/daytona";
const daytonaProvider = createDaytonaProvider({
  apiKey: "daytona_****",
  image: "my-codex-image", // optional
});

.withSandbox(provider)

// Modal

import { createModalProvider } from "@vibe-kit/modal";
const modalProvider = createModalProvider({ // must conduct CLI setup specified in https://modal.com/docs/reference/cli/setup beforehand
  image: "my-codex-image" // optional
});

Additional Configuration

// GitHub integration for PR creation
.withGithub({
  token: "ghp_****",
  repository: "owner/repo-name"
})

// Working directory
.withWorkingDirectory("/path/to/project")

// Environment variables
.withSecrets({
  "DATABASE_URL": "postgresql://...",
  "API_KEY": "secret-key"
})

// Reuse existing sandbox session
.withSession("existing-sandbox-id")

// Git worktrees for isolated branch development
.withWorktrees({
  root: "/custom/worktree/path", // optional: custom root directory
  cleanup: true // optional: auto-cleanup after operations (default: true)
})

API Reference

generateCode(options)

Generate code using the configured AI agent.

const result = await vibeKit.generateCode({
  prompt: "Create a React component for a todo list",
  mode: "code", // "code" for generation, "ask" for Q&A
  branch?: "feature-branch", // optional
  history?: conversationHistory, // optional
});

createPullRequest(labelOptions?, branchPrefix?)

Create a pull request with generated code.

const pr = await vibeKit.createPullRequest();

executeCommand(command, options?)

Execute a command in the sandbox.

const result = await vibeKit.executeCommand("npm test");

runTests()

Run tests in the sandbox.

const result = await vibeKit.runTests();

Session Management

// Get current session ID
const sessionId = await vibeKit.getSession();

// Set session ID
await vibeKit.setSession("session-id");

// Pause sandbox
await vibeKit.pause();

// Resume sandbox
await vibeKit.resume();

// Kill sandbox
await vibeKit.kill();

getHost(port)

Get the host URL for a specific port.

const host = await vibeKit.getHost(3000);
console.log(`App running at: ${host}`);

Events

VibeKit extends EventEmitter and emits the following events:

vibeKit.on("update", (message: string) => {
  // Streaming updates during code generation
});

vibeKit.on("error", (error: string) => {
  // Error notifications
});

vibeKit.on("stdout", (data: string) => {
  // Standard output from command execution
});

vibeKit.on("stderr", (data: string) => {
  // Standard error from command execution
});

Supported Agents

  • Claude - Anthropic's Claude models
  • Codex - OpenAI's Codex models
  • OpenCode - Open-source coding models
  • Gemini - Google's Gemini models
  • Grok - xAI's Grok models

Supported Sandbox Providers

  • E2B - Cloud sandboxes
  • Northflank - Kubernetes-based environments
  • Daytona - Development environments
  • Cloudflare - Workers-based sandboxes
  • Dagger - Container-based execution
  • Modal - Serverless computing
  • Fly.io - Edge computing

Error Handling

try {
  const result = await vibeKit.generateCode({
    prompt: "Create a web app",
    mode: "code"
  });
} catch (error) {
  if (error.message.includes('not initialized')) {
    // Handle initialization error
  } else {
    // Handle generation error
  }
}

Examples

With Conversation History

const history = [
  { role: "user", content: "What is React?" },
  { role: "assistant", content: "React is a JavaScript library..." }
];

const response = await vibeKit.generateCode({
  prompt: "Now show me a React component example",
  mode: "code",
  history
});

With Streaming

const response = await vibeKit.generateCode({
  prompt: "Explain how React hooks work",
  mode: "ask"
});

// Listen to streaming updates via events
vibeKit.on("update", (message) => {
  console.log("Update:", message);
});

License

MIT

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.