How to Update microsandbox to the Latest Version: Complete CLI and SDK Upgrade Guide

Run msb update (or msb upgrade) to update the microsandbox CLI binary and libkrunfw library, then update your language SDKs via their respective package managers.

The microsandbox project ships a unified command-line tool called msb that manages the entire runtime. Keeping it current ensures you have the latest security patches, microVM features, and language SDK compatibility. This guide covers both host-side binary updates and SDK upgrades across all supported languages.

Updating the msb CLI Binary

The self-update mechanism is implemented in crates/cli/lib/commands/self_cmd.rs within the SelfCommand::Update handler. This command queries the GitHub releases API, downloads platform-specific artifacts, and performs an atomic replacement of your existing installation.

Basic Update Commands


# Preferred shorthand

msb update

# Equivalent alias

msb upgrade

# Force re-download even if already current

msb upgrade --force

The --force flag is useful when recovering from corrupted downloads or when verifying artifact integrity.

What Happens During Update

According to the superradcompany/microsandbox source code, the update flow performs these steps:

  1. Version check – Queries api.github.com/repos/superradcompany/microsandbox/releases/latest
  2. Artifact resolution – Selects msb binary and libkrunfw archive matching your platform/architecture
  3. Atomic replacement – Downloads to temporary location, then swaps executables
  4. Configuration preservation – Existing config files in ~/.config/microsandbox/ remain untouched

Verify the Update

msb --version

Compare the output against the GitHub releases page to confirm you're running the latest version.

Reinstalling via Install Script

If you originally installed via the one-liner script, you can re-run it for an equivalent result:


# macOS and Linux

curl -fsSL https://install.microsandbox.dev | sh

# Windows PowerShell

irm https://install.microsandbox.dev/windows | iex

The scripts/install.sh installation script ultimately invokes the same self-update routine as msb upgrade, making both approaches functionally identical.

Updating Language SDKs

The CLI update only affects the host binary. Projects using microsandbox's language bindings require separate SDK updates. The SDKs are located in the sdk/ directory of the repository and publish to their respective registries.

Rust SDK


# Update in existing project

cargo update -p microsandbox

# Or explicitly add latest

cargo add microsandbox@latest

Source: Published to crates.io/crates/microsandbox

Python SDK


# Using uv (recommended)

uv pip install -U microsandbox

# Or with pip

pip install -U microsandbox

Source: Published to PyPI

TypeScript SDK


# Update to latest

npm i microsandbox@latest

# Or update within semver range

npm update microsandbox

Source: Published to npm

Go SDK

go get -u github.com/superradcompany/microsandbox/sdk/go

Source: Module hosted at github.com/superradcompany/microsandbox/sdk/go

SDK README files in sdk/rust/README.md, sdk/python/README.md, sdk/node-ts/README.md, and sdk/go/README.md contain version-specific installation details.

Update Frequency and Compatibility

microsandbox follows semantic versioning. The CLI and SDK versions are decoupled—SDKs automatically download compatible runtime components on first use. However, running matching versions guarantees full feature support.

The top-level msb update and msb upgrade aliases were added in the July 2026 release, as documented in docs/changelog/2026-07-10.mdx. The CLI reference in docs/cli/sandbox-commands.mdx covers these commands under "Update msb and libkrunfw".

Complete Update Workflow


# 1. Update host binary and runtime

msb upgrade

# 2. Verify installation

msb --version

# 3. Update project SDKs (example: Python with uv)

cd my-project
uv pip install -U microsandbox

# 4. Verify SDK recognizes new runtime

msb doctor  # if available, checks runtime linkage

Summary

  • msb update or msb upgrade updates the CLI binary and libkrunfw library atomically
  • --force re-downloads even when versions match
  • SDK updates require separate package manager commands per language
  • Install script re-runs achieve the same result as self-update
  • Configuration persists across all update methods

Frequently Asked Questions

What does msb upgrade actually download?

The command downloads two artifacts from GitHub releases: the msb binary for your platform and the matching libkrunfw firmware library. Both are replaced atomically to prevent runtime corruption.

Can I downgrade to a previous version?

Yes. The msb self subcommand supports downgrade operations. Run msb downgrade <version> or consult docs/cli/sandbox-commands.mdx for version-specific syntax.

Do I need to restart running sandboxes after updating?

Existing microVMs continue running on their launched runtime. New sandbox invocations automatically use the updated msb binary and libkrunfw versions.

Why update SDKs separately from the CLI?

The SDKs provide language-specific APIs and type definitions. While they can auto-download compatible runtimes, updating ensures you have the latest API improvements, documentation, and static type definitions that match the CLI's capabilities.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →