novita-sandbox-v1
v1.1.0-b4
Published
Novita Sandbox SDK for JavaScript/TypeScript - A comprehensive SDK for code execution, desktop automation, and cloud computing environments
Maintainers
Readme
Novita Agent Sandbox JS SDK
A TypeScript/JavaScript SDK for Novita Agent Sandbox environments that provides code execution, desktop automation, and cloud computing capabilities. Compatible with e2b.
Table of Contents
Installation
npm install novita-sandbox-v1Authentication
Get your Novita API key from here.
Usage
Core Sandbox
The basic package provides core functionality for interacting with sandbox environments.
import { Sandbox } from 'novita-sandbox-v1';
// Using the official template `base` by default.
const sandbox = await Sandbox.create(
"base",
{
apiKey: process.env.NOVITA_API_KEY || '',
},
);
// File operations
await sandbox.files.write('/tmp/test.txt', 'Hello, World!');
const content = await sandbox.files.read('/tmp/test.txt');
// Command execution
const result = await sandbox.commands.run('ls -la /tmp');
console.log(result.stdout);
// Real-time monitoring
sandbox.files.watchDir('/tmp', (event) => {
console.log(`File ${event.name} was ${event.type}`);
});Documentation
For comprehensive guides and API reference, visit the official documentation.
