[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73939":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},73939,"boxlite","boxlite-ai\u002Fboxlite","boxlite-ai","Compute substrate for AI agents: lightweight enough to live on your laptop, elastic enough to scale into the cloud and unleash unlimited resources.","https:\u002F\u002Fboxlite.ai\u002F",null,"TypeScript",2116,133,22,27,0,5,13,70,15,81.88,"Apache License 2.0",false,"main",[26,27,28,29,30,31,32,33,34,35],"ai-agents","containers","golang","python","rust","sandbox","security","serverless","typescript","virtualization","2026-06-12 04:01:12","# BoxLite [![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?logo=discord&logoColor=white)](https:\u002F\u002Fgo.boxlite.ai\u002Fdiscord)\n\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fboxlite-ai\u002Fboxlite?style=social)](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite)\n[![Build](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite\u002Factions\u002Fworkflows\u002Fbuild-wheels.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite\u002Factions\u002Fworkflows\u002Fbuild-wheels.yml)\n[![Lint](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite\u002Factions\u002Fworkflows\u002Flint.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite\u002Factions\u002Fworkflows\u002Flint.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fboxlite-ai\u002Fboxlite\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fboxlite-ai\u002Fboxlite)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0)\n\nCompute substrate for AI agents: lightweight enough to live on your laptop, elastic enough to scale into the cloud and unleash unlimited resources.\n\n\n## What is BoxLite?\n\nBoxLite lets you spin up **lightweight VMs** (\"Boxes\") and run **OCI containers inside them**. Unlike\nephemeral sandboxes that destroy state after each execution, BoxLite Boxes are **persistent workspaces** —\ninstall packages, create files, build up environment state, then come back later and pick up where you left off.\n\n**Why BoxLite**\n\n- **Stateful**: Boxes retain packages, files, and environment across stop\u002Frestart. No rebuilding on every interaction.\n- **Lightweight**: small footprint, fast boot, async-first API for high concurrency.\n- **Hardware isolation**: each Box runs its own kernel — not just namespaces or containers.\n- **No daemon**: embed as a library, no root, no background service.\n- **OCI compatible**: use standard Docker images (`python:slim`, `node:alpine`, `alpine:latest`).\n- **Network policy + secret placeholders**: restrict outbound access with `allow_net` and inject real HTTP(S) secrets from host-side `secrets`.\n- **Local-first**: runs entirely on your machine — no cloud account needed. Scale out when ready.\n\n## Python Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\n```bash\npip install boxlite\n```\n\nRequires Python 3.10+.\n\n### Run\n\n```python\nimport asyncio\nimport boxlite\n\n\nasync def main():\n    async with boxlite.SimpleBox(image=\"python:slim\") as box:\n        result = await box.exec(\"python\", \"-c\", \"print('Hello from BoxLite!')\")\n        print(result.stdout)\n\n\nasyncio.run(main())\n```\n\n\u003C\u002Fdetails>\n\n\n## Node.js Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\n```bash\nnpm install @boxlite-ai\u002Fboxlite\n```\n\nRequires Node.js 18+.\n\n### Run\n\n```javascript\nimport { SimpleBox } from '@boxlite-ai\u002Fboxlite';\n\nasync function main() {\n  const box = new SimpleBox({ image: 'python:slim' });\n  try {\n    const result = await box.exec('python', '-c', \"print('Hello from BoxLite!')\");\n    console.log(result.stdout);\n  } finally {\n    await box.stop();\n  }\n}\n\nmain();\n```\n\n\u003C\u002Fdetails>\n\n\n## Rust Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\n```bash\ncargo add boxlite tokio futures --features tokio\u002Fmacros,tokio\u002Frt-multi-thread\n```\n\n### Run\n\n```rust\nuse boxlite::{BoxCommand, BoxOptions, BoxliteRuntime, RootfsSpec};\nuse futures::StreamExt;\n\n#[tokio::main]\nasync fn main() -> Result\u003C(), Box\u003Cdyn std::error::Error>> {\n    let runtime = BoxliteRuntime::default_runtime();\n    let options = BoxOptions {\n        rootfs: RootfsSpec::Image(\"alpine:latest\".into()),\n        ..Default::default()\n    };\n\n    let litebox = runtime.create(options, None).await?;\n    let mut execution = litebox\n        .exec(BoxCommand::new(\"echo\").arg(\"Hello from BoxLite!\"))\n        .await?;\n\n    let mut stdout = execution.stdout().unwrap();\n    while let Some(line) = stdout.next().await {\n        println!(\"{}\", line);\n    }\n\n    Ok(())\n}\n```\n\n\u003C\u002Fdetails>\n\n\n## Go Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\n```bash\ngo get github.com\u002Fboxlite-ai\u002Fboxlite\u002Fsdks\u002Fgo\ngo run github.com\u002Fboxlite-ai\u002Fboxlite\u002Fsdks\u002Fgo\u002Fcmd\u002Fsetup\n```\n\nRequires Go 1.24+ with CGO enabled. The setup step downloads the prebuilt native library (one-time).\n\n### Run\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\n\tboxlite \"github.com\u002Fboxlite-ai\u002Fboxlite\u002Fsdks\u002Fgo\"\n)\n\nfunc main() {\n\trt, err := boxlite.NewRuntime()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer rt.Close()\n\n\tctx := context.Background()\n\tbox, err := rt.Create(ctx, \"alpine:latest\", boxlite.WithName(\"my-box\"))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer box.Close()\n\n\tresult, err := box.Exec(ctx, \"echo\", \"Hello from BoxLite!\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Print(result.Stdout)\n}\n```\n\n\u003C\u002Fdetails>\n\n\n## CLI Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\n```bash\ncurl -fsSL https:\u002F\u002Fsh.boxlite.ai | sh\n```\n\nInstalls to `$HOME\u002F.local\u002Fbin\u002Fboxlite`. The runtime is embedded in the\nbinary — no extra setup. For alternatives (`cargo install boxlite-cli`,\nversion pinning, custom install dir) and release-artifact verification,\nsee the [CLI Reference's Installation & Verification section](.\u002Fdocs\u002Freference\u002Fcli\u002FREADME.md#installation--verification).\n\n### Run\n\n```bash\nboxlite run python:slim python -c \"print('Hello from BoxLite!')\"\n```\n\n\u003C\u002Fdetails>\n\n\n## REST API Quick Start\n\n\u003Cdetails>\n\u003Csummary>View guide\u003C\u002Fsummary>\n\n### Install\n\nInstall the `boxlite` CLI — see [CLI Quick Start](#cli-quick-start). The\nREST server ships with the same binary. For release-artifact verification,\nsee the [CLI Reference's Installation & Verification section](.\u002Fdocs\u002Freference\u002Fcli\u002FREADME.md#installation--verification).\n\n### Start the server\n\n```bash\nboxlite serve\n# Listening on 0.0.0.0:8100\n```\n\n### Use it\n\n```bash\n# Create a box\ncurl -s -X POST http:\u002F\u002Flocalhost:8100\u002Fv1\u002Fdefault\u002Fboxes \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"image\": \"alpine:latest\"}'\n\n# Run a command (replace BOX_ID from the response above)\ncurl -s -X POST http:\u002F\u002Flocalhost:8100\u002Fv1\u002Fdefault\u002Fboxes\u002FBOX_ID\u002Fexec \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"command\": \"echo\", \"args\": [\"Hello from BoxLite!\"]}'\n```\n\nAll CLI commands also work against a running server:\n\n```bash\nboxlite --url http:\u002F\u002Flocalhost:8100 list\nboxlite --url http:\u002F\u002Flocalhost:8100 exec BOX_ID -- echo \"Hello!\"\n```\n\n\u003C\u002Fdetails>\n\n\n## Next steps\n\n- Run more real-world scenarios in [Examples](.\u002Fexamples\u002F)\n- Learn how images, disks, networking, and isolation work in [Architecture](.\u002Fdocs\u002Farchitecture\u002F)\n\n## Features\n\n- **Compute**: CPU\u002Fmemory limits, async-first API, streaming stdout\u002Fstderr, metrics\n- **Storage**: volume mounts (ro\u002Frw), persistent disks (QCOW2), copy-on-write\n- **Networking**: outbound internet, port forwarding (TCP\u002FUDP), network metrics\n- **Images**: OCI pull + caching, custom rootfs support\n- **Security**: hardware isolation (KVM\u002FHVF), OS sandboxing (seccomp\u002Fsandbox-exec), resource limits\n- **Image Registry Configuration**: Configure custom registries via config file (`--config`), CLI flags (`--registry`), or SDK options. See the [configuration guide](.\u002Fdocs\u002Fguides\u002Fimage-registry-configuration.md).\n- **SDKs**: Rust (Rust 1.88+), Python (Python 3.10+), C (C11-compatible compiler), Node.js (Node.js 18+), Go (Go 1.24+)\n- **REST API**: built-in HTTP server (`boxlite serve`) — use BoxLite from any language or tool via curl\n\n## Architecture\n\nHigh-level overview of how BoxLite embeds a runtime and runs OCI containers inside micro-VMs.\nFor details, see [Architecture](.\u002Fdocs\u002Farchitecture\u002F).\n\n\u003Cdetails>\n\u003Csummary>Show diagram\u003C\u002Fsummary>\n\n```\n┌──────────────────────────────────────────────────────────────┐\n│  Your Application                                            │\n│  ┌───────────────────────────────────────────────────────┐   │\n│  │  BoxLite Runtime (embedded library)                   │   │\n│  │                                                        │   │\n│  │  ╔════════════════════════════════════════════════╗   │   │\n│  │  ║ Jailer (OS-level sandbox)                      ║   │   │\n│  │  ║  ┌──────────┐  ┌──────────┐  ┌──────────┐      ║   │   │\n│  │  ║  │  Box A   │  │  Box B   │  │  Box C   │      ║   │   │\n│  │  ║  │ (VM+Shim)│  │ (VM+Shim)│  │ (VM+Shim)│      ║   │   │\n│  │  ║  │┌────────┐│  │┌────────┐│  │┌────────┐│      ║   │   │\n│  │  ║  ││Container││  ││Container││  ││Container││      ║   │   │\n│  │  ║  │└────────┘│  │└────────┘│  │└────────┘│      ║   │   │\n│  │  ║  └──────────┘  └──────────┘  └──────────┘      ║   │   │\n│  │  ╚════════════════════════════════════════════════╝   │   │\n│  └───────────────────────────────────────────────────────┘   │\n└──────────────────────────────────────────────────────────────┘\n                              │\n              Hardware Virtualization + OS Sandboxing\n             (KVM\u002FHypervisor.framework + seccomp\u002Fsandbox-exec)\n```\n\n**Security Layers:**\n- Hardware isolation (KVM\u002FHypervisor.framework)\n- OS-level sandboxing (seccomp on Linux, sandbox-exec on macOS)\n- Resource limits (cgroups, rlimits)\n- Environment sanitization\n\n\u003C\u002Fdetails>\n\n## Documentation\n\n- [API & CLI Reference](.\u002Fdocs\u002Freference\u002F) — SDK API references (Python, Node.js, Rust, C) and the `boxlite` CLI reference\n- [Examples](.\u002Fexamples\u002F) — Sample code for common use cases\n- [Architecture](.\u002Fdocs\u002Farchitecture\u002F) — How BoxLite works under the hood\n\n## Supported Platforms\n\n| Platform       | Architecture          | Status           |\n|----------------|-----------------------|------------------|\n| macOS          | Apple Silicon (ARM64) | ✅ Supported     |\n| Linux          | x86_64                | ✅ Supported     |\n| Linux          | ARM64                 | ✅ Supported     |\n| Windows (WSL2) | x86_64                | ✅ Supported     |\n| macOS          | Intel (x86_64)        | 🚀 Coming soon |\n\n## System Requirements\n\n| Platform       | Requirements                                   |\n|----------------|------------------------------------------------|\n| macOS          | Apple Silicon, macOS 12+                       |\n| Linux          | KVM enabled (`\u002Fdev\u002Fkvm` accessible)            |\n| Windows (WSL2) | WSL2 with KVM support, user in `kvm` group     |\n\n## Getting Help\n\n- [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fboxlite-ai\u002Fboxlite\u002Fissues) — Bug reports and feature requests\n- [Discord](https:\u002F\u002Fgo.boxlite.ai\u002Fdiscord) — Questions and community support\n- [Security Policy](.\u002FSECURITY.md) — How to privately report a vulnerability\n\n## Contributing\n\nWe welcome contributions! See [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) for guidelines.\n\n## License\n\nLicensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.\n","BoxLite 是一个为AI代理设计的计算基底，既轻量到可以在笔记本上运行，又能弹性扩展至云端以利用无限资源。其核心功能包括支持创建持久化的工作空间（即轻量级虚拟机“Boxes”），并在其中运行OCI容器；具备状态保持能力，使得环境配置和文件在重启后依然可用；提供硬件级别的隔离与异步优先的API接口，确保高并发场景下的性能。此外，BoxLite无需守护进程即可作为库嵌入使用，并且兼容标准Docker镜像。适用于需要快速开发、测试或部署AI应用但又不想牺牲安全性和灵活性的开发者，尤其适合那些希望从本地开始然后无缝迁移到云上的项目。",2,"2026-06-11 03:47:58","high_star"]