[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81155":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":12,"stars30d":12,"stars90d":12,"forks30d":12,"starsTrendScore":12,"compositeScore":13,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":14,"fork":14,"defaultBranch":15,"hasWiki":16,"hasPages":14,"topics":17,"createdAt":9,"pushedAt":9,"updatedAt":18,"readmeContent":19,"aiSummary":20,"trendingCount":12,"starSnapshotCount":12,"syncStatus":21,"lastSyncTime":22,"discoverSource":23},81155,"bubblebox","nix-tools\u002Fbubblebox","nix-tools","Nix-based bubblewrap sandbox for CLIs (generalized claudebox)",null,"JavaScript",30,0,37,false,"main",true,[],"2026-06-12 04:01:32","# bubblebox\n\n[Bubblewrap][bubblewrap]\u002Fseatbelt-sandboxed launchers for CLIs. Generalizes numtide's\n[claudebox][claudebox] over an arbitrary CLI binary, so the same bubblewrap (Linux) \u002F seatbelt\n(macOS) wrapping serves multiple CLIs from one builder. Additional CLIs are welcome.\n\nLike numtide's claudebox, each CLI gets a generic NixOS with an isolated `$HOME` and...\n- `.\u002F` in read-write mode\n- `..\u002F` in read-only mode\n- (e.g.) `~\u002F.claude` in read-write mode \n- `\u002Frun\u002Fuser\u002F$UID` is hidden by default\n\n## Available CLIs\n\n- `claudebox` — Claude Code\n- `opencodebox` — [OpenCode](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode)\n- `hermesbox` — [Hermes Agent](https:\u002F\u002Fgithub.com\u002Fnousresearch\u002Fhermes-agent)\n- `pibox` — [pi agent](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\u002F)\n- `pingbox` — sandboxed ping for network diagnostics\n\n## This flake exposes\n\n- **apps** for running without installing\n- **packages** for installing into flakes\n- **overlays.default** — for adding all programs to `pkgs`\n\n## `nix run` without installing\n\n```sh\nnix run github:nix-tools\u002Fbubblebox#claudebox\nnix run github:nix-tools\u002Fbubblebox#opencodebox\nnix run github:nix-tools\u002Fbubblebox#hermesbox\nnix run github:nix-tools\u002Fbubblebox#pibox\nnix run github:nix-tools\u002Fbubblebox#pingbox -- -- hckrnews.com\n```\n\n## Adding a new CLI\n\nAdd an entry to the `boxes` attrset in `nix\u002Fpackages.nix`:\n\n```nix\nmybox = {\n  tool = pkgs.my-cli;\n  toolBinary = \"my-cli\";\n  homeBindings = [ \".my-cli\" ];\n  defaultArgs = [ ];\n  toolEnv = { };\n  description = \"Sandboxed environment for my-cli\";\n};\n```\n\nThis produces the corresponding package, app, and overlay attribute\nautomatically. The builder is `mkBubblebox` in `nix\u002Fbubblebox.nix`.\n\n## Forwarding arguments to the wrapped CLI\n\nEach box accepts its own flags (e.g. `--allow-ssh-agent`) and forwards anything\nafter a literal `--` to the wrapped CLI. So when you invoke a box directly:\n\n```sh\nclaudebox -- --continue\nopencodebox -- run \"fix the tests\"\n```\n\nUnder `nix run` you need **two** `--` separators: the first one ends `nix run`'s\nown arguments, the second one is consumed by the box and tells it to forward\nthe rest:\n\n```sh\nnix run github:nix-tools\u002Fbubblebox#claudebox -- -- --continue\nnix run github:nix-tools\u002Fbubblebox#claudebox -- --allow-ssh-agent -- --resume\nnix run github:nix-tools\u002Fbubblebox#opencodebox -- -- run \"fix the tests\"\n```\n\n## Add to `environment.systemPackages` via the overlay\n\n```nix\n{\n  nixpkgs.url = \"github:NixOS\u002Fnixpkgs\u002Fnixos-unstable\";\n  inputs.bubblebox.url = \"github:nix-tools\u002Fbubblebox\";\n  inputs.bubblebox.inputs.nixpkgs.follows = \"nixpkgs\";\n\n  outputs = { self, nixpkgs, bubblebox, ... }: {\n    nixosConfigurations.example = nixpkgs.lib.nixosSystem {\n      system = \"x86_64-linux\";\n      modules = [\n        ({ pkgs, ... }: {\n          nixpkgs.overlays = [ bubblebox.overlays.default ];\n          environment.systemPackages = [\n            pkgs.claudebox\n            pkgs.opencodebox\n            pkgs.hermesbox\n            pkgs.pibox\n          ];\n        })\n      ];\n    };\n  };\n}\n```\n\n## Minimal flake with a numtide devshell\n\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:NixOS\u002Fnixpkgs\u002Fnixpkgs-unstable\";\n    devshell.url = \"github:numtide\u002Fdevshell\";\n    flake-parts.url = \"github:hercules-ci\u002Fflake-parts\";\n    bubblebox.url = \"github:nix-tools\u002Fbubblebox\";\n  };\n\n  outputs = inputs:\n    inputs.flake-parts.lib.mkFlake { inherit inputs; } {\n      systems = [ \"x86_64-linux\" \"aarch64-linux\" \"aarch64-darwin\" ];\n      imports = [ inputs.devshell.flakeModule ];\n      perSystem = { pkgs, system, ... }: {\n        _module.args.pkgs = import inputs.nixpkgs {\n          inherit system;\n          config.allowUnfree = true;\n          overlays = [ inputs.bubblebox.overlays.default ];\n        };\n        devshells.default.packages = [\n          pkgs.claudebox\n          pkgs.opencodebox\n          pkgs.hermesbox\n          pkgs.pibox\n        ];\n      };\n    };\n}\n```\n\n`direnv allow` then `claudebox`, `opencodebox`, `hermesbox`, or `pibox`.\n\n## License\n\nMIT.\n\n[bubblewrap]: https:\u002F\u002Fgithub.com\u002Fcontainers\u002Fbubblewrap\n[claudebox]: https:\u002F\u002Fgithub.com\u002Fnumtide\u002Fclaudebox\n","bubblebox 是一个基于 Nix 的 CLI 沙箱工具，使用 Bubblewrap 或 Seatbelt 为命令行接口提供隔离环境。它允许开发者通过一个构建器为多个 CLI 创建沙箱，每个 CLI 都在一个通用的 NixOS 环境中运行，并且具有独立的 `$HOME` 目录以及自定义的读写权限设置。该项目支持多种 CLI 工具如 Claude Code、OpenCode 和 Hermes Agent 等，适用于需要在安全隔离环境中执行命令行操作的场景，比如开发测试、网络诊断等。用户可以通过 `nix run` 命令直接运行这些沙箱化的 CLI，而无需事先安装它们。此外，项目还提供了将这些工具添加到系统包集合中的方法，方便长期使用。",2,"2026-06-11 04:03:44","CREATED_QUERY"]