No description
  • Shell 95.8%
  • Dockerfile 4.2%
Find a file
Karamelmar dcc7a2aed7 Implement Option B: CS Core on host, agents inside container
- New lib/container.sh generates three files per project:
  - bin/claude: wrapper that routes every claude call into the
    agents container via `podman/docker exec --workdir $PWD`
  - start.sh: builds image if missing, starts detached container
    with project mounted at same absolute path as host, prepends
    bin/ to PATH, then launches CS Core on the host
  - stop.sh: stops and removes the agents container

- Container mounts project at identical host path so CS Core's
  working directory paths resolve correctly inside the container
- TTY detection in wrapper: uses -it when stdin is a terminal,
  -i otherwise (node-pty compatibility)
- Container stopped automatically when CS Core exits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:29:38 +01:00
lib Implement Option B: CS Core on host, agents inside container 2026-03-09 12:29:38 +01:00
templates Add Context Studio Wizard — project scaffolding CLI 2026-03-09 11:49:04 +01:00
README.md Add auto-install for missing prerequisites 2026-03-09 12:05:08 +01:00
wizard.sh Implement Option B: CS Core on host, agents inside container 2026-03-09 12:29:38 +01:00

🧙 Context Studio Wizard

Scaffold a fully configured multi-agent AI development environment in seconds.


What it does

One command. One conversation. A complete project drops out:

~/.context-studio/core/          ← 🔧 installed once, shared globally

~/projects/my-project/
├── .devcontainer/               ← 🐳 Node 22 · Rust · Claude Code · Electron deps
├── workflow/                    ← 🤖 agents, roles, A2A config, project docs
└── src/                         ← 💻 your code

Open in devcontainer → start Context Studio → talk to your agent team.


📋 Prerequisites

Tool Notes
🔀 git Auto-installed if missing
🐳 podman (preferred) or docker Auto-installed if missing
🔑 SSH key → github.com Must be set up manually
🗝️ ANTHROPIC_API_KEY Must be set in your environment

Auto-install supported on: Arch · Debian/Ubuntu · RHEL/Fedora · openSUSE

The wizard detects your distro and installs git and podman/docker automatically if they are missing. SSH key and API key must be set up by you.


🚀 Usage

./wizard.sh

The wizard guides you through:

  1. 🔧 Core setup — clones context-studio-core to ~/.context-studio/core/ (once)

  2. 📝 Project name & location

  3. ⚙️ Workflow — generate from scratch or clone an existing repo

  4. 🤖 Agent preset (if generating)

    Preset Agents
    minimal 🎯 coordinator · 2× coder · researcher · tester
    standard 🎯🎯 2× coordinator · 3× coder · 2× researcher · tester · reviewer
  5. Done — git repo initialized, devcontainer ready


📂 Open the project

🖥️ VS Code

code ~/projects/my-project   # → "Reopen in Container"

⌨️ CLI

cd ~/projects/my-project
docker build -t my-project .devcontainer/
docker run -it --rm \
  -v "$(pwd)":/workspace \
  -v "$HOME/.context-studio/core":/opt/context-studio/core \
  -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
  my-project bash

▶️ Start Context Studio (inside container)

node $CS_CORE_DIR/core/start.js                    # Electron UI
node $CS_CORE_DIR/core/start.js --ui-mode=headless # servers only

🌍 Mobility

Commit your project. On any machine:

git clone <your-project-repo>
cd my-project
code .   # done

Core is re-cloned automatically on first run. Only ANTHROPIC_API_KEY is needed on the host.


🗂️ Repository layout

🧙 wizard.sh               ← entry point
📁 lib/
   utils.sh                ← prompts, colors, helpers
   core.sh                 ← global core install/update
   project.sh              ← devcontainer + project scaffold
   workflow.sh             ← generate or clone workflow config
📁 templates/
   Dockerfile              ← Node 22 + Rust + build tools + Claude Code
   devcontainer.json       ← mounts, env vars, VS Code extensions
   agents-minimal.json     ← 5-agent preset
   agents-standard.json    ← 9-agent preset
   system.json             ← A2A server defaults
   📁 roles/               ← coordinator, coder, researcher, tester, reviewer
   📁 hooks/rules/         ← per-role tool restrictions