npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@daytona/sdk

v0.198.0

Published

Daytona TypeScript SDK for sandbox management and code execution

Readme

Daytona TypeScript SDK

The official TypeScript SDK for Daytona, a secure and elastic infrastructure for running AI-generated code. Daytona provides full composable computers — sandboxes — that you can manage programmatically using the Daytona SDK.

The SDK provides an interface for sandbox management, file system operations, Git operations, language server protocol support, process and code execution, and computer use. For more information, see the documentation.

Installation

Install the package using npm:

npm install @daytona/sdk

or using yarn:

yarn add @daytona/sdk

Get API key

Generate an API key from the Daytona Dashboard ↗ to authenticate SDK requests and access Daytona services. For more information, see the API keys documentation.

Configuration

Configure the SDK using environment variables or by passing a configuration object:

  • DAYTONA_API_KEY: Your Daytona API key
  • DAYTONA_API_URL: The Daytona API URL
  • DAYTONA_TARGET: Your target region environment (e.g. us, eu)
import { Daytona } from '@daytona/sdk'

// Initialize with environment variables
const daytona = new Daytona();

// Initialize with configuration object
const daytona = new Daytona({
  apiKey: 'YOUR_API_KEY',
  apiUrl: 'YOUR_API_URL',
  target: 'us',
});

Create a sandbox

Create a sandbox to run your code securely in an isolated environment.

import { Daytona } from '@daytona/sdk'

const daytona = new Daytona({apiKey: "YOUR_API_KEY"});
const sandbox = await daytona.create({
  language: 'typescript'
});
const response = await sandbox.process.codeRun('console.log("Hello World!")');
console.log(response.result);

Examples and guides

Daytona provides examples and guides for common sandbox operations, best practices, and a wide range of topics, from basic usage to advanced topics, showcasing various types of integrations between Daytona and other tools.

Create a sandbox with custom resources

Create a sandbox with custom resources (CPU, memory, disk).

import { Daytona, Image } from '@daytona/sdk';

const daytona = new Daytona();
const sandbox = await daytona.create({
    image: Image.debianSlim('3.12'),
    resources: { cpu: 2, memory: 4, disk: 8 }
});

Create an ephemeral sandbox

Create an ephemeral sandbox that is automatically deleted when stopped.

import { Daytona } from '@daytona/sdk';

const daytona = new Daytona();
const sandbox = await daytona.create({
    ephemeral: true,
    autoStopInterval: 5
});

Create a sandbox from a snapshot

Create a sandbox from a snapshot.

import { Daytona } from '@daytona/sdk';

const daytona = new Daytona();
const sandbox = await daytona.create({
    snapshot: 'my-snapshot-name',
    language: 'typescript'
});

Execute commands

Execute commands in the sandbox.

// Execute a shell command
const response = await sandbox.process.executeCommand('echo "Hello, World!"')
console.log(response.result)

// Run TypeScript code
const response = await sandbox.process.codeRun(`
const x = 10
const y = 20
console.log(\`Sum: \${x + y}\`)
`)
console.log(response.result)

File operations

Upload, download, and search files in the sandbox.

// Upload a file
await sandbox.fs.uploadFile(Buffer.from('Hello, World!'), 'path/to/file.txt')

// Download a file
const content = await sandbox.fs.downloadFile('path/to/file.txt')

// Search for files
const matches = await sandbox.fs.findFiles(root_dir, 'search_pattern')

Git operations

Clone, list branches, and add files to the sandbox.

// Clone a repository
await sandbox.git.clone('https://github.com/example/repo', 'path/to/clone')

// List branches
const branches = await sandbox.git.branches('path/to/repo')

// Add files
await sandbox.git.add('path/to/repo', ['file1.txt', 'file2.txt'])

Language server protocol

Create and start a language server to get code completions, document symbols, and more.

// Create and start a language server
const lsp = await sandbox.createLspServer('typescript', 'path/to/project')
await lsp.start()

// Notify the lsp for the file
await lsp.didOpen('path/to/file.ts')

// Get document symbols
const symbols = await lsp.documentSymbols('path/to/file.ts')

// Get completions
const completions = await lsp.completions('path/to/file.ts', {
  line: 10,
  character: 15,
})