Home/Tools/@tpmjs/tools-e2b

watchDirectory

@tpmjs/tools-e2b

Watch a directory in the E2B sandbox for file changes. Returns the initial state. Requires E2B_API_KEY.

Official
sandbox
v0.1.0
MIT

Interactive Playground

Test @tpmjs/tools-e2b (watchDirectory) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-e2b
pnpm add @tpmjs/tools-e2b
yarn add @tpmjs/tools-e2b
bun add @tpmjs/tools-e2b
deno add npm:@tpmjs/tools-e2b

2. Import the tool

import { watchDirectory } from '@tpmjs/tools-e2b';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { watchDirectory } from '@tpmjs/tools-e2b';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { watchDirectory },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

Auto-extracted
sandboxId
Required
Type: string

ID of the sandbox

path
Required
Type: string

Directory path to watch

Schema extracted: 1/20/2026, 3:49:52 AM

README

ERROR: No README data found!

Statistics

Downloads/month

0

Quality Score

0%

Bundle Size

NPM Keywords

tpmjs
e2b
sandbox
code-interpreter
ai
code-execution
cloud

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai
watchDirectory | TPMJS | TPMJS