Skip to content

feat(sdk,cli): add support for drives#196

Open
QuiiBz wants to merge 14 commits into
mainfrom
volumes
Open

feat(sdk,cli): add support for drives#196
QuiiBz wants to merge 14 commits into
mainfrom
volumes

Conversation

@QuiiBz
Copy link
Copy Markdown
Member

@QuiiBz QuiiBz commented May 19, 2026

This PR adds support for drives in beta. Drives are persistent storage that can be attached or detached to sandboxes. You can mount up to 4 drives per sandbox, with up to 1 TiB per drive

CLI:

sbx drives ls
sbx drives get-or-create --max-size <bytes>
sbx drives delete <drive>
sbx create --mount <drive>:/path[:read-only|read-write]

SDK:

const drive = await Drive.getOrCreate({
  name:  'my-drive',                           // unique per project
  maxSize: 1024 * 1024 * 1024 * 100  // optional, default 100 GiB
})

const sandbox = await Sandbox.create({
  name: 'my-sandbox',
  mounts: {
    '/mnt/storage': {               // can add up to 4 mounts
      drive: drive.name,
      mode: 'read-only'          // optional, defaults to 'read-write'
    }
  }
})

const { drives, pagination } = await Drive.list({ limit, since, until })
await drives.delete()

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sandbox Ready Ready Preview, Comment, Open in v0 May 26, 2026 4:19pm
sandbox-cli Ready Ready Preview, Comment, Open in v0 May 26, 2026 4:19pm
sandbox-sdk Ready Ready Preview, Comment, Open in v0 May 26, 2026 4:19pm
sandbox-sdk-ai-example Ready Ready Preview, Comment, Open in v0 May 26, 2026 4:19pm
workflow-code-runner Ready Ready Preview, Comment, Open in v0 May 26, 2026 4:19pm

Comment thread packages/sandbox/docs/index.md Outdated
Comment thread packages/sandbox/src/commands/drives.ts
Comment thread packages/vercel-sandbox/src/drive.ts
Comment thread packages/vercel-sandbox/src/api-client/api-client.ts Outdated
Comment thread packages/vercel-sandbox/src/volume.ts Outdated
Comment thread packages/sandbox/src/commands/volumes.ts Outdated
Comment thread packages/sandbox/src/commands/volumes.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants