GitHub - jetpack-io/devbox: Instant, easy, and predictable development environments

基于Nix实现的开发环境工具

# 安装
curl -fsSL https://get.jetpack.io/devbox | bash

在某个目录下指向devbox init,会在目录下创建devbox.json

{
  "packages": [],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

然后尝试安装一个golang,如果是第一次执行,DevBox 会尝试先安装Nix(需要魔法)

# 安装 golang
devbox add go@1.17.6
devbox shell