New

CodeSandbox is now part of Together AI! We have joined forces to launch CodeSandbox SDK and bring code interpretation to generative AI.

Learn more
arrow_back
Changelog•

Private preview support, auto-wake & CodeSandbox SDK improvements

Here are the latest updates to CodeSandbox SDK, including some popular feature requests.
Private preview support, auto-wake & CodeSandbox SDK improvements

Hey hey 👋

We're back with another CodeSandbox update!

Here's what we've been cooking for the last few weeks.


What's new?

+-3

Private Preview Support 🔒

It's now possible to access preview URLs for private sandboxes! 🎉 If a sandbox is private, its previews won't be accessible unless a preview token is provided. Check out our Docs for details on creating preview tokens (code preview below).

Preview Token Example
+-3

Auto Wake Strategy 💤

When a sandbox is hibernated, we automatically wake it when it gets an HTTP request to any preview URL. In the past, this caused some confusion, because even WebSocket requests would wake the sandbox. In many cases, this meant that if a user had a preview open (with an HMR connection from the dev server) they would continuously wake the sandbox. Because of this, we have introduced an API to configure when a sandbox should be woken. Now, whenever you create, start or open a sandbox, you can configure this:

Sandbox Auto Wake Example

CodeSandbox SDK Improvements & Bug Fixes

+-3

Added support for -name, -vm-tier and -path to Snapshot Builder.

+-3

Added support for -since when listing sandboxes with the CLI.

+-3

Added the ability to define timeout when waiting for port!

+-3

Fixed running CSB SDK in modern Node versions in CJS env (thanks, Wylie!)

+-3

When hibernating and shutting down multiple sandboxes using the CLI, do it in parallel instead of sequentially.

+-3

When sandboxes run out of credits, we will hibernate them instead of shutting them down.



That's all - short & sweet!

We have some huge updates coming for CodeSandbox SDK, so stay tuned.

See you soon 👋


arrow_backBack to releases