Devbox
/install docker-devbox
Devbox — One-Command Docker Dev Environment
Create isolated Docker dev environments for any project with a single command.
How It Works
The scripts/devbox.sh script is bundled with this skill. It:
- Auto-detects your project type (framework, language, package manager)
- Reads your local language version (Node, Python, Go, Rust, Java, etc.)
- Generates a
docker-compose.dev.ymlwith the matching Docker image - Optionally attaches database services (PostgreSQL, MySQL, Redis, MongoDB, MinIO)
Usage
After installing this skill, run the bundled script directly:
# Find where the skill is installed
SKILL_DIR=$(clawhub list --json 2>/dev/null | python3 -c "import sys,json; print([s['folder'] for s in json.load(sys.stdin) if s.get('slug')=='docker-devbox'][0])" 2>/dev/null || echo "skills/docker-devbox")
# Run devbox
bash "$SKILL_DIR/scripts/devbox.sh" /path/to/project
# Or copy to PATH for convenience
cp "$SKILL_DIR/scripts/devbox.sh" /usr/local/bin/devbox
chmod +x /usr/local/bin/devbox
devbox /path/to/project
Quick Start
# Auto-detect project type
devbox /path/to/project
# Specify port + attach databases
devbox /path/to/project 8000 --with postgres,redis
# Force framework
devbox /path/to/project --framework java-spring
Supported Project Types
| Type | Detection | Default Port | Docker Image |
|---|---|---|---|
| Nuxt 3/4 | nuxt.config.* |
3000 | node:{ver}-bookworm |
| Next.js | next.config.* |
3000 | node:{ver}-bookworm |
| Vue + Vite | vite.config.* + vue |
5173 | node:{ver}-bookworm |
| React + Vite | vite.config.* + react |
5173 | node:{ver}-bookworm |
| Svelte | svelte.config.* |
5173 | node:{ver}-bookworm |
| VitePress | docs/.vitepress/ |
5173 | node:{ver}-bookworm |
| Node.js backend | package.json |
3000 | node:{ver}-bookworm |
| Python FastAPI | requirements.txt + fastapi |
8000 | python:{ver}-slim |
| Python Django | manage.py |
8000 | python:{ver}-slim |
| Python Flask | requirements.txt + flask |
5000 | python:{ver}-slim |
| Go | go.mod |
8080 | golang:{ver} |
| Rust | Cargo.toml |
8080 | rust:{ver} |
| Java (Spring Boot) | pom.xml + spring-boot |
8080 | eclipse-temurin:{ver}-jdk |
| Java (Maven) | pom.xml |
8080 | eclipse-temurin:{ver}-jdk |
| Java (Gradle) | build.gradle / .kts |
8080 | eclipse-temurin:{ver}-jdk |
| Kotlin | *.kt (no build.gradle) |
8080 | eclipse-temurin:21-jdk |
| Ruby on Rails | Gemfile + rails |
3000 | ruby:{ver}-slim |
| Ruby Sinatra | Gemfile |
4567 | ruby:{ver}-slim |
| PHP Laravel | composer.json + laravel |
5000 | php:{ver}-cli |
| PHP | composer.json |
8000 | php:{ver}-cli |
| C# / .NET | *.csproj / *.sln |
5000 | dotnet/sdk:{ver} |
| Swift | Package.swift |
8080 | swift:{ver} |
| Hugo | hugo.toml |
1313 | klakegg/hugo:ext-alpine |
| Static HTML | *.html |
80 | nginx:alpine |
Attach Database Services
devbox ./app --with postgres,redis
| Service | Image | Port |
|---|---|---|
postgres / pg |
postgres:16-alpine |
5432 |
mysql |
mysql:8-alpine |
3306 |
redis |
redis:7-alpine |
6379 |
mongo |
mongo:7 |
27017 |
minio |
minio/minio |
9000/9001 |
CLI Options
devbox \x3Cproject-path> [port] [options]
Options:
--framework \x3Ctype> Override auto-detection
--with \x3Cservices> Comma-separated services to attach
--env-file \x3Cpath> Environment variable file
--use-dockerfile Use project's existing Dockerfile
-h, --help Show help
Dependencies
Required:
docker+docker compose— the only hard requirement
Optional (for version detection):
node— Node.js version matchingpython3— Python version matchinggo— Go version matchingrustc— Rust version matchingjava— Java version matchingruby— Ruby version matchingphp— PHP version matchingdotnet— .NET version matchingswift— Swift version matchingpnpm/yarn/bun— Node.js package manager detection
Optional (for port conflict detection):
lsof— Detects host processes using a port (falls back to Docker-only check if missing)
Only the runtimes installed on your host are used. If a language is not installed, the script falls back to a sensible default version.
Included Files
scripts/devbox.sh — Main script (auto-detect + generate compose)
scripts/create-dev-env.sh — Backward-compatible wrapper
references/docker-templates.md — Ready-to-use compose templates
Docker Templates
See references/docker-templates.md for ready-to-use compose templates for each project type.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install docker-devbox - 安装完成后,直接呼叫该 Skill 的名称或使用
/docker-devbox触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Devbox 是什么?
One-command Docker dev environment for any project. Auto-detects 20+ types (Nuxt/Next/Vite/Python/Go/Rust/Java/Ruby/PHP/C#/Swift/Hugo), matches local languag... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 57 次。
如何安装 Devbox?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install docker-devbox」即可一键安装,无需额外配置。
Devbox 是免费的吗?
是的,Devbox 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Devbox 支持哪些平台?
Devbox 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin)。
谁开发了 Devbox?
由 Little Moon(@nciae-zyh)开发并维护,当前版本 v2.0.1。