@tpmjs/tools-e2b
Set environment variables in an E2B sandbox. These persist for subsequent code executions in the same sandbox session. Special characters are safely escaped. Requires E2B_API_KEY.
Test @tpmjs/tools-e2b (setEnvVars) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-e2bpnpm add @tpmjs/tools-e2byarn add @tpmjs/tools-e2bbun add @tpmjs/tools-e2bdeno add npm:@tpmjs/tools-e2bimport { setEnvVars } from '@tpmjs/tools-e2b';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { setEnvVars } from '@tpmjs/tools-e2b';
const result = await generateText({
model: openai('gpt-4o'),
tools: { setEnvVars },
prompt: 'Your prompt here...',
});
console.log(result.text);Available configuration options
sandboxIdstringID of the sandbox
envVarsobjectKey-value pairs of environment variables to set
Schema extracted: 1/20/2026, 3:49:52 AM
ERROR: No README data found!
Downloads/month
0
Quality Score