Claudebox banner
boxlite-ai boxlite-ai

Claudebox

Development community

Description

Run Claude Code CLI in isolated micro-VMs

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

ClaudeBox [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/bCmaK4Ce)

Run Claude Code in hardware-isolated micro-VMs with persistent workspaces and a clean Python API.

[![Build Status](https://img.shields.io/github/actions/workflow/status/boxlite-labs/claudebox/ci.yml)](https://github.com/boxlite-labs/claudebox/actions) [![PyPI version](https://img.shields.io/pypi/v/claudebox.svg)](https://pypi.org/project/claudebox/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Overview

ClaudeBox uses [BoxLite](https://github.com/boxlite-ai/boxlite) to run Claude Code in lightweight local-first sandboxes. It gives you:

  • hardware isolation (not containers)
  • persistent workspaces under ~/.claudebox/sessions/
  • optional skills and templates for common stacks
  • security policies and resource limits
  • optional RL training hooks (rewards and trajectory export)

If you like the runtime, consider starring BoxLite.

Install

pip install claudebox

Requirements

  • Python 3.10+
  • BoxLite runtime
  • Docker - Used to pull and manage OCI images (the sandbox itself runs as a micro-VM, not a Docker container)

Authentication

export CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...

or:

export ANTHROPIC_API_KEY=sk-ant-...

Quick start

import asyncio
from claudebox import ClaudeBox

async def main():
    async with ClaudeBox() as box:
        result = await box.code("Create a hello world Python script")
        print(result.response)

asyncio.run(main())

Persistent sessions

from claudebox import ClaudeBox

async def main():
    async with ClaudeBox(session_id="my-project") as box:
        await box.code("Initialize a Node.js project with Express")

    async with ClaudeBox.reconnect("my-project") as box:
        await box.code("Add authentication endpoints")

    await ClaudeBox.cleanup_session(