NOTE: This file may be a symlink placed in the root of a wire-task devcontainer. If appropriate or needed, it can be modified by rfiting the sym link which can be found in
/workspace/wire-devcontainerfrom within the container.
Containerized task isolation for parallel Claude Code sessions on Wire blockchain repos.
At minimum, the repositories required to run the full stack,
all have git worktrees, under /workspace
- wire-sysio
- wire-cdt
- wire-libraries-ts
- wire-tools-ts
- wire-ethereum
- wire-solana
- wire-vcpkg-registry
- wire-devcontainer
To use any of the code in the devcontainer,
your must first run the following:
devcontainer-e2e-buildNOTE: This is already on
$PATH. It builds all native dependencies (wire-cdt, wire-sysio) and links all local TypeScript packages. Only needed once per fresh container.
wire-devcontainer/
Dockerfile # Main devcontainer image (Ubuntu 24.04)
wire-tools-ts.Dockerfile # Multi-stage build for e2e test cluster (separate concern)
.devcontainer/
devcontainer.json # Container config: mounts, resources, env
scripts/
devcontainer-setup # One-time setup: validate repos, build image, symlink CLI
claude-task-env # Main CLI: `up` / `down` subcommands
assets/pkg/
fetched-v24.13.0-linux-x64 # Pre-built Node.js binary for @yao-pkg/pkg
Both scripts are Fish shell. They share a common preamble that resolves paths:
wireClaudeTaskScriptDir->scripts/wireDevContainerRoot-> this repo rootwireRepoRoot-> parent dir containing all Wire reposcodeRoot-> grandparent dirwireTaskRoot->$codeRoot/wire-tasks/
Run once to validate the environment. Checks all default repos exist, builds the Docker image if missing, creates the task root, and symlinks claude-task-env into ~/.local/bin/.
Must be run once inside a fresh wire-task devcontainer from a Fish login prompt. Requires IN_DEVCONTAINER, WIRE_WORKSPACE, CC, and CXX env vars (all set by the container image).
Performs the full build and link sequence:
- Installs
@protobuf-ts/pluginglobally (npm + pnpm) - Builds
wire-libraries-tsand globally links shared packages (sdk-core,shared,shared-node,shared-web) - Builds + globally links protoc plugins (
protoc-gen-solidity,protoc-gen-solana,protobuf-bundler) viapnpm run dist - Bootstraps vcpkg, configures + compiles
wire-cdt(CMake/Ninja, installs to~/.local) - Bootstraps vcpkg, configures + compiles
wire-sysio(CMake/Ninja, with system + test contracts) - Links
wire-oppTypeScript and Solidity model packages if present
Uses ccache and vcpkg shared caches, so subsequent runs (or runs in new containers with the same volumes) are fast.
CLI with up and down subcommands. Uses Fish argparse for option parsing.
up TASK_ID BRANCH [REPO...] - Creates worktrees, inits submodules, copies wire-opp, pins CPUs, launches devcontainer + Claude.
down TASK_ID - Removes container, worktrees, and task directories.
Always included in every task (defined in _wireDefaultRepos):
wire-sysio wire-cdt wire-libraries-ts wire-tools-ts wire-ethereum wire-solana wire-vcpkg-registry
Extra repos can be passed as positional args to up. Duplicates are filtered.
Ubuntu 24.04 base with: clang-18, cmake, ninja, ccache, Rust (stable), Go, Python 3, Node.js 24.14.1 (nvm), pnpm 10.32.1, Foundry, Solana CLI, Claude Code. Non-root dev user (UID 1000). Entrypoint is tini + fish.
All caches under /cache/ (ccache, vcpkg, pnpm, cargo) — mounted as Docker named volumes so they persist across tasks.
- Workspace bind-mounted from
$TASK_WORKTREEto/workspace - Container named
claude-$TASK_ID - 32 GB memory, CPU pinning via
$TASK_CPUS, 4096 PID limit - Cache volumes:
wire-ccache,wire-vcpkg,wire-pnpm,wire-cargo - Task-specific Claude config:
~/.claude-tasks/$TASK_ID->/home/dev/.claude-task
- Fish shell scripts, no bash
argparsefor all CLI argument parsingdiefor fatal errors (exit 255)runwrapper for commands that must succeed- Functional helpers:
set-default,set-or-default
- All paths are resolved relative to script location, not cwd
- CPU pinning formula:
base = (task_num - 1) * cores, rangebasetobase + cores - 1 wire-oppis copied (not worktree'd) since it may not be a standard git repo- Submodules are auto-initialized after worktree creation