@tpmjs/official-sandbox-shell
Execute a shell command in the sandbox workspace. Supports git, npm, and any CLI tools.
shellExec requires a sandbox session (_sandboxWorkDir not set)
Last checked: 3/1/2026, 4:28:37 AM
Test @tpmjs/official-sandbox-shell (shellExec) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/official-sandbox-shellpnpm add @tpmjs/official-sandbox-shellyarn add @tpmjs/official-sandbox-shellbun add @tpmjs/official-sandbox-shelldeno add npm:@tpmjs/official-sandbox-shellimport { shellExec } from '@tpmjs/official-sandbox-shell';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { shellExec } from '@tpmjs/official-sandbox-shell';
const result = await generateText({
model: openai('gpt-4o'),
tools: { shellExec },
prompt: 'Your prompt here...',
});
console.log(result.text);(command: string, timeout?: number, _sandboxWorkDir?: string) => Promise<unknown>Available configuration options
commandstringShell command to execute (passed to sh -c)
timeoutnumberTimeout in milliseconds (default: 30000, max: 300000)
_sandboxWorkDirstringInjected by sandbox server — workspace directory
Schema extracted: 3/1/2026, 4:28:36 AM
ERROR: No README data found!
Downloads/month
98
GitHub Stars
15
Quality Score