Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

computesdkcomputesdk 搜索

Agent Skill

computesdk 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

259

周安装

11

GitHub Stars

1

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:computesdk(computesdk 搜索)
来源仓库:https://github.com/computesdk/sandbox-skills
仓库路径:skills/computesdk
安装命令:
npx skills add https://github.com/computesdk/sandbox-skills --skill computesdk
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/computesdk/sandbox-skills --skill computesdk

简介

computesdk 提供统一的 TypeScript SDK,支持在多种云沙箱环境中运行远程代码。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中切换不同后端平台(如 E2B、Modal)执行任务。
  • 自动识别环境变量并路由至对应提供商,简化跨云平台部署流程。
  • 安装前请确认是否调用外部沙箱服务、上传代码包或暴露临时网络端口。
  • computesdk 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

ComputeSDK

A unified TypeScript SDK for running code in remote sandboxes. Write code once, switch providers by changing environment variables. Supports E2B, Modal, Railway, Daytona, Vercel, Namespace, Render, and more.

Installation

npm install computesdk

Set your credentials:

COMPUTESDK_API_KEY=your_computesdk_api_key
E2B_API_KEY=your_e2b_api_key  # or any other provider's credentials

Get a ComputeSDK API key at https://console.computesdk.com/register

Quick Start

import { compute } from 'computesdk';

// Auto-detects provider from environment variables
const sandbox = await compute.sandbox.create();

const result = await sandbox.runCode('print("Hello World!")');
console.log(result.output); // "Hello World!"

await sandbox.destroy();

Sandbox Lifecycle

// Create with options
const sandbox = await compute.sandbox.create({
  runtime: 'python',
  timeout: 300000,
  metadata: { userId: '123' }
});

// Get existing sandbox by ID
const existing = await compute.sandbox.getById('sandbox-id');

// Find or create by name (idempotent)
const named = await compute.sandbox.findOrCreate({
  name: 'my-app',
  namespace: 'user-alice',
  timeout: 30 * 60 * 1000,
});

// Find without creating (returns null if not found)
const found = await compute.sandbox.find({
  name: 'my-app',
  namespace: 'user-alice',
});

// Extend timeout to prevent auto-shutdown
await compute.sandbox.extendTimeout(sandbox.sandboxId);

// Destroy
await sandbox.destroy();
// or: await compute.sandbox.destroy(sandbox.sandboxId);

Code Execution

// Auto-detect language (Python)
const result = await sandbox.runCode('print("Hello")');
// result.output, result.exitCode, result.language

// Explicit runtime: 'node' | 'python' | 'deno' | 'bun'
const nodeResult = await sandbox.runCode('console.log("Hi")', 'node');

Command Execution

// Simple command
const result = await sandbox.runCommand('ls -la');
// result.stdout, result.stderr, result.exitCode, result.durationMs

// With options
const result = await sandbox.runCommand('npm install', {
  cwd: '/app',
  env: { NODE_ENV: 'production' },
  timeout: 30000,
});

// Background command (returns immediately)
await sandbox.runCommand('npm run dev', { background: true });

// Shell operators work
await sandbox.runCommand('cd /app && npm install && npm test');

Filesystem

await sandbox.filesystem.writeFile('/app/index.js', 'console.log("hi")');
const content = await sandbox.filesystem.readFile('/app/index.js');
await sandbox.filesystem.mkdir('/app/data');
const files = await sandbox.filesystem.readdir('/app');
const exists = await sandbox.filesystem.exists('/app/index.js');
await sandbox.filesystem.remove('/app/index.js');

// Batch write (atomic, deduplicates)
await sandbox.file.batchWrite([
  { path: '/app/a.js', content: '...' },
  { path: '/app/b.js', content: '...' },
]);

Managed Servers

Start supervised long-lived processes with install commands, restart policies, health checks, and public URLs.

const server = await sandbox.server.start({
  slug: 'web',
  install: 'npm install',
  start: 'npm run dev',
  path: '/app',
  port: 3000,
  restart_policy: 'on-failure',  // 'never' | 'on-failure' | 'always'
  max_restarts: 5,
  health_check: {
    path: '/',
    interval_ms: 5000,
    timeout_ms: 3000,
  },
  environment: {
    NODE_ENV: 'development',
  },
});

// Status: installing -> starting -> running -> ready
console.log(server.status);
console.log(server.url);  // Public URL when ready

// Lifecycle
const servers = await sandbox.server.list();
const info = await sandbox.server.retrieve('web');
await sandbox.server.restart('web');
await sandbox.server.stop('web');
const logs = await sandbox.server.logs('web');

Create servers inline with sandbox creation:

const sandbox = await compute.sandbox.create({
  servers: [{
    slug: 'dev',
    install: 'npm install',
    start: 'npm run dev',
    path: '/app',
    health_check: { path: '/' },
  }],
});

Overlays (Template Mounting)

Bootstrap sandboxes from template directories instantly.

const overlay = await sandbox.filesystem.overlay.create({
  source: '/templates/nextjs',
  target: './project',
  strategy: 'smart',  // symlinks node_modules, copies rest in background
  ignore: ['.git', '*.log'],
  waitForCompletion: true,
});

// Or wait separately
const overlay = await sandbox.filesystem.overlay.create({
  source: '/templates/react',
  target: './app',
});
await sandbox.filesystem.overlay.waitForCompletion(overlay.id);

Combine overlays with servers:

const sandbox = await compute.sandbox.create({
  overlays: [{
    source: '/templates/nextjs',
    target: './project',
    strategy: 'smart',
  }],
  servers: [{
    slug: 'dev',
    install: 'npm install',
    start: 'npm run dev',
    path: './project',
    health_check: { path: '/' },
  }],
});
// Server automatically waits for overlay to complete

Terminals

// Interactive PTY terminal (WebSocket)
const terminal = await sandbox.terminal.create({ pty: true });
terminal.write('ls -la\n');
terminal.on('data', (data) => console.log(data));
terminal.resize({ cols: 120, rows: 40 });

// Structured exec terminal
const exec = await sandbox.terminal.create({ pty: false });

Client Access (Browser Delegation)

Delegate sandbox access to browser clients without exposing API keys.

// Server-side: create session token
const token = await sandbox.sessionToken.create({
  expiresIn: 3600,  // 1 hour
});

// Client-side: connect with token
import { Sandbox } from 'computesdk';
const clientSandbox = await Sandbox.connect({ url, token: token.token });

// Or use magic links (one-time auth URLs)
const link = await sandbox.magicLink.create({
  redirectUrl: 'https://myapp.com/editor',
});

Provider Configuration

Auto-detection from environment variables is recommended. All providers also require COMPUTESDK_API_KEY.

ProviderEnvironment Variables
E2BE2B_API_KEY
ModalMODAL_TOKEN_ID, MODAL_TOKEN_SECRET
RailwayRAILWAY_API_KEY, RAILWAY_PROJECT_ID, RAILWAY_ENVIRONMENT_ID
DaytonaDAYTONA_API_KEY
VercelVERCEL_TOKEN, VERCEL_TEAM_ID, VERCEL_PROJECT_ID
NamespaceNSC_TOKEN
RenderRENDER_API_KEY, RENDER_OWNER_ID

Detection order: E2B -> Railway -> Daytona -> Modal -> Runloop -> Vercel -> Cloudflare -> CodeSandbox

For explicit configuration:

compute.setConfig({
  computesdkApiKey: process.env.COMPUTESDK_API_KEY,
  provider: 'e2b',
  e2b: { apiKey: process.env.E2B_API_KEY }
});

Switch providers at runtime:

// E2B for data science
compute.setConfig({
  computesdkApiKey: 'key',
  provider: 'e2b',
  e2b: { apiKey: process.env.E2B_API_KEY }
});
const e2bSandbox = await compute.sandbox.create();

// Modal for GPU workloads
compute.setConfig({
  computesdkApiKey: 'key',
  provider: 'modal',
  modal: {
    tokenId: process.env.MODAL_TOKEN_ID,
    tokenSecret: process.env.MODAL_TOKEN_SECRET
  }
});
const modalSandbox = await compute.sandbox.create();

Multiple Compute Instances

import { compute, createCompute } from 'computesdk';

// Singleton (recommended)
const sandbox = await compute.sandbox.create();

// Multiple independent instances
const compute1 = createCompute();
const compute2 = createCompute();

Sandbox Info

const info = await sandbox.getInfo();
// info.id, info.provider, info.runtime, info.status, info.createdAt, info.timeout

TypeScript Types

import type {
  Sandbox,
  SandboxInfo,
  CodeResult,
  CommandResult,
  CreateSandboxOptions
} from 'computesdk';

Provider-Specific Skills

For provider-specific setup guides, install these skills:

npx skills add https://github.com/computesdk/sandbox-skills --skill e2b-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill vercel-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill daytona-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill modal-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill railway-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill namespace-sandbox
npx skills add https://github.com/computesdk/sandbox-skills --skill render-sandbox
  • e2b-sandbox — E2B Firecracker microVMs, sub-second cold starts
  • vercel-sandbox — Globally distributed serverless execution
  • daytona-sandbox — Full development workspace environments
  • modal-sandbox — GPU-accelerated execution for ML workloads
  • railway-sandbox — Self-hosted sandboxes on Railway infrastructure
  • namespace-sandbox — Custom CPU/RAM allocation, architecture control
  • render-sandbox — Self-hosted sandboxes with zero infrastructure setup

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.98%
按下载量换算31

Claude

29.11%
按下载量换算26

Cursor

20.04%
按下载量换算18

Gemini CLI

8.88%
按下载量换算8

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills