@tpmjs/official-sandbox-shell
Read a file from the sandbox workspace.
readFile requires a sandbox session (_sandboxWorkDir not set)
Last checked: 2/28/2026, 3:58:17 AM
Test @tpmjs/official-sandbox-shell (readFile) 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 { readFile } from '@tpmjs/official-sandbox-shell';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { readFile } from '@tpmjs/official-sandbox-shell';
const result = await generateText({
model: openai('gpt-4o'),
tools: { readFile },
prompt: 'Your prompt here...',
});
console.log(result.text);(path: string, _sandboxWorkDir?: string) => Promise<unknown>Available configuration options
pathstringFile path relative to workspace root
_sandboxWorkDirstringInjected by sandbox server — workspace directory
Schema extracted: 2/28/2026, 3:58:17 AM
ERROR: No README data found!
Downloads/month
98
GitHub Stars
15
Quality Score