一键导入
dev-environment
Start the local sandbox-api development environment with hot-reload. Use when developing or testing changes to the sandbox-api Go code locally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Start the local sandbox-api development environment with hot-reload. Use when developing or testing changes to the sandbox-api Go code locally.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add or update a Blaxel Sandbox Hub image/template under hub/. Use when adding a new hub image, sandbox image, runtime image, template.json, Dockerfile, hidden/internal image, or workflow-dispatch build option in the blaxel-ai/sandbox repository.
Deploy a Playwright sandbox (chromium or firefox) on Blaxel and run e2e tests against it. Use to validate that playwright hub images work end-to-end (browser connection, page navigation, DOM interaction) after changes.
Poll CI status on a branch until the "Build and Push Sandbox" workflow completes. Use after pushing to develop or any branch where you need to confirm the build succeeded before proceeding.
Watch CI until the "Build and Push Sandbox" workflow completes. For dev deployments, watches the develop branch. For prod deployments, watches the latest tag. Use after merging into develop or pushing a release tag.
Deploy the app to the dev environment. Use after a PR is marked as reviewable (ready for review) so reviewers can check out the changes running in dev.
Run the full end-to-end test suite against a custom sandbox image deployed locally or on Blaxel. Use before merging significant changes to validate the complete sandbox-api binary, not just unit/integration tests.
| name | dev-environment |
| description | Start the local sandbox-api development environment with hot-reload. Use when developing or testing changes to the sandbox-api Go code locally. |
The sandbox-api runs inside Docker with Air for hot-reload. Changes to Go files in sandbox-api/ are picked up automatically without restarting the container.
Install dev dependencies (one-time):
make dependencies
This installs:
air — hot-reload for Goswag — OpenAPI doc generationyq — YAML processor (via brew)Important: Before starting, kill any existing process on port 8080:
lsof -ti :8080 | xargs kill -9 2>/dev/null || true
docker-compose up dev
This starts the dev service defined in docker-compose.yaml, which:
docker/alpine.Dockerfile./sandbox-api and ./tmp as volumesSANDBOX_DEV_MODE=true8080 (sandbox-api) and 3010air for hot-reloadWait for this log line before testing:
Starting Sandbox API server on :8080
curl http://localhost:8080/health
Or test the filesystem endpoint:
curl http://localhost:8080/filesystem/~
If you want to skip Docker and run air directly on the host:
lsof -ti :8080 | xargs kill -9 2>/dev/null || true
make api
This runs air with SANDBOX_LOG_DIR=./tmp/log from the sandbox-api/ directory. Requires Go installed locally.
For testing the production-like image without hot-reload:
docker-compose up dev-slim
This builds from docker/slim.Dockerfile — no volume mounts, no hot-reload.
make test
Runs go test -v ./... from within sandbox-api/. These are fast in-process tests.
make docker-build
Builds blaxel/sandbox-api:latest. To run it:
make docker-run
Dev logs are written to ./tmp/log/ on the host (mounted from the container). Tail them with:
tail -f tmp/log/*.log