@thomasdavis/unsandbox
Execute code with automatic language detection from shebang (e.g., #!/usr/bin/env python3). Simpler than executeCode when your code has a shebang line. Returns stdout, stderr, and detected language.
This tool was automatically discovered from the package exports. The author did not explicitly register it in their package.json. Schema and description were auto-extracted.
Test @thomasdavis/unsandbox (runCode) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @thomasdavis/unsandboxpnpm add @thomasdavis/unsandboxyarn add @thomasdavis/unsandboxbun add @thomasdavis/unsandboxdeno add npm:@thomasdavis/unsandboximport { runCode } from '@thomasdavis/unsandbox';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { runCode } from '@thomasdavis/unsandbox';
const result = await generateText({
model: openai('gpt-4o'),
tools: { runCode },
prompt: 'Your prompt here...',
});
console.log(result.text);(code: string) => Promise<unknown>Available configuration options
codestringThe source code to execute. Must include a shebang line (e.g., #!/usr/bin/env python3) for language detection.
Schema extracted: 3/1/2026, 4:25:49 AM
AI SDK tools for unsandbox
pnpm add @thomasdavis/unsandbox
This package provides 2 tools for the AI SDK:
import { exampleTool } from '@thomasdavis/unsandbox'; import { generateText } from 'ai'; import { openai } from '@ai-sdk/openai'; const result = await generateText({ model: openai('gpt-4'), prompt: 'Process this text for me', tools: { exampleTool, }, }); console.log(result.text);
# Install dependencies pnpm install # Build the package pnpm build # Type-check pnpm type-check # Watch mode pnpm dev
package.jsonpnpm buildpnpm publish --access publicMIT
Downloads/month
471
GitHub Stars
0
Quality Score