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

shellExec

@tpmjs/official-sandbox-shell

Execute a shell command in the sandbox workspace. Supports git, npm, and any CLI tools.

Official
sandbox
v0.1.0
MIT
⚠️

This tool is currently broken

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

Last checked: 3/1/2026, 4:28:37 AM

Interactive Playground

Test @tpmjs/official-sandbox-shell (shellExec) 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 { shellExec } from '@tpmjs/official-sandbox-shell';

3. Use with AI SDK

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

Signature

(command: string, timeout?: number, _sandboxWorkDir?: string) => Promise<unknown>

Tags

agent
ai
cli
command
exec
execute
filesystem
git
npm
official
sandbox
shell
supports
tpmjs
workspace

Parameters

Available configuration options

Auto-extracted
command
Required
Type: string

Shell command to execute (passed to sh -c)

timeout
Optional
Type: number

Timeout in milliseconds (default: 30000, max: 300000)

_sandboxWorkDir
Optional
Type: string

Injected by sandbox server — workspace directory

Schema extracted: 3/1/2026, 4:28:36 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