Home/Tools/@tpmjs/official-sandbox-shell

readFile

@tpmjs/official-sandbox-shell

Read a file from the sandbox workspace.

Official
sandbox
v0.1.0
MIT
⚠️

This tool is currently broken

Execution Failed
Runtime error with test parameters
readFile requires a sandbox session (_sandboxWorkDir not set)

Last checked: 2/28/2026, 3:58:17 AM

Interactive Playground

Test @tpmjs/official-sandbox-shell (readFile) 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/official-sandbox-shell
pnpm add @tpmjs/official-sandbox-shell
yarn add @tpmjs/official-sandbox-shell
bun add @tpmjs/official-sandbox-shell
deno add npm:@tpmjs/official-sandbox-shell

2. Import the tool

import { readFile } from '@tpmjs/official-sandbox-shell';

3. Use with AI SDK

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);

Signature

(path: string, _sandboxWorkDir?: string) => Promise<unknown>

Tags

agent
ai
file
filesystem
git
official
read
sandbox
shell
tpmjs
workspace

Parameters

Available configuration options

Auto-extracted
path
Required
Type: string

File path relative to workspace root

_sandboxWorkDir
Optional
Type: string

Injected by sandbox server — workspace directory

Schema extracted: 2/28/2026, 3:58:17 AM

README

ERROR: No README data found!

Statistics

Downloads/month

98

GitHub Stars

15

Quality Score

87%

Bundle Size

NPM Keywords

tpmjs
sandbox
shell
git
filesystem
ai
agent

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai