# ๐Ÿง™ Context Studio Wizard > Scaffold a fully configured multi-agent AI development environment in seconds. --- ## โœจ What it does One command. A complete project drops out: ``` ~/.context-studio/core/ โ† ๐Ÿ”ง installed once, shared globally ~/Projects/my-project/ โ”œโ”€โ”€ .devcontainer/ โ† ๐Ÿณ Node 22 ยท Rust ยท Claude Code โ”œโ”€โ”€ workflow/ โ† ๐Ÿค– agents, roles, A2A config, project docs โ”œโ”€โ”€ src/ โ† ๐Ÿ’ป your code โ”œโ”€โ”€ bin/claude โ† ๐Ÿ”€ wrapper: routes claude โ†’ container โ”œโ”€โ”€ start.sh โ† โ–ถ๏ธ start container + Context Studio UI โ”œโ”€โ”€ stop.sh โ† โน๏ธ stop the agents container โ””โ”€โ”€ update.sh โ† ๐Ÿ”„ update core, claude-code, OS packages ``` Run `./start.sh` โ†’ Podman container starts โ†’ Electron UI opens โ†’ agents prime automatically โ†’ talk to your team. --- ## ๐Ÿ—๏ธ Architecture (Option B) ``` HOST CONTAINER (cs-) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Context Studio Core (Electron) Claude Code binary A2A agent servers (node) โ†โ”€โ”€โ”€ bin/claude wrapper routes Electron UI every claude call here workflow management mounted at same abs path ``` - **CS Core + all agent servers** run on the host (no display issues, native Electron) - **Claude Code binary** runs inside the Podman container as the current user (not root) - **`bin/claude`** is prepended to PATH so CS Core's server process finds it automatically - **Paths match** host โ†” container (project mounted at the same absolute path) --- ## ๐Ÿ“‹ 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 credentials | API key or `claude auth login` โ€” wizard checks automatically | **Auto-install supported on:** Arch ยท Debian/Ubuntu ยท RHEL/Fedora ยท openSUSE --- ## ๐Ÿš€ Usage ```bash ./wizard.sh ``` The wizard guides you through: 1. ๐Ÿ”ง **Prerequisites** โ€” checks git, podman/docker, Anthropic credentials 2. ๐Ÿ”ง **Core setup** โ€” clones `context-studio-core` to `~/.context-studio/core/` (once, shared) 3. ๐Ÿ“ **Project name & location** 4. โš™๏ธ **Workflow** โ€” generate from scratch _or_ clone an existing repo 5. ๐Ÿค– **Agent preset** _(if generating)_ | Preset | Agents | |--------|--------| | `minimal` | 5 agents: coordinator ยท 2ร— coder ยท researcher ยท tester | | `standard` | 9 agents: 2ร— coordinator ยท 3ร— coder ยท 2ร— researcher ยท tester ยท reviewer | 6. โœ… **Done** โ€” project created, git repo initialized **Ctrl+C at any point** โ†’ confirmation prompt โ†’ reverts all created files (installed packages kept). > โš ๏ธ **First `./start.sh`** builds the container image. Expect 5โ€“15 min. Subsequent starts are instant. --- ## ๐Ÿ”‘ Anthropic credentials The wizard checks for credentials in this order: 1. `ANTHROPIC_API_KEY` environment variable 2. `~/.claude/.credentials.json` (default `claude auth login` location) 3. `~/.claude.json` 4. `$CLAUDE_CONFIG_DIR/.credentials.json` / `$CLAUDE_CONFIG_DIR/.claude.json` 5. `~/.anthropic/.credentials.json` If none found, you're prompted to enter an API key (masked input) with an option to save it to `~/.zshrc` / `~/.bashrc`. All credential files that exist are **mounted read-only** into the container so Claude Code can authenticate. --- ## โ–ถ๏ธ Starting your project ```bash cd ~/Projects/my-project ./start.sh ``` This will: 1. Build the container image if not yet built (first run: 5โ€“15 min) 2. Start the Podman container (agents run inside as your user, not root) 3. Register the project with Context Studio (required for server startup) 4. Launch the Context Studio Electron UI 5. Agents start, prime automatically โ€” no trust dialogs, no manual steps 6. When you close the UI โ†’ container is stopped automatically ```bash ./stop.sh # force-stop container without closing the UI ./update.sh # update core, claude-code inside container, OS packages ``` --- ## ๐Ÿ”„ How `bin/claude` works CS Core on the host needs to call `claude`. Instead of using the host's `claude`, `start.sh` prepends `bin/claude` to `PATH`. This wrapper: 1. Checks the agents container is running 2. Relays the call into the container via `podman exec` 3. Falls back to project root as workdir if cwd isn't mounted in the container 4. Creates the CS Core ready marker (`/tmp/cs-ready-`) after 3s so `/prime` injection isn't delayed --- ## ๐Ÿ—‚๏ธ Repository layout ``` ๐Ÿง™ wizard.sh โ† entry point ๐Ÿ“ lib/ utils.sh โ† prompts, colors, gum helpers prereqs.sh โ† auto-install git + podman/docker + API key check core.sh โ† global core install/update project.sh โ† devcontainer + project scaffold workflow.sh โ† generate or clone workflow config container.sh โ† generates start/stop/update/bin/claude ๐Ÿ“ 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 ``` --- ## โš ๏ธ Hard rules - **`~/.context-studio/core/` source is READ-ONLY** โ€” never modify source files, commit, or push to it - `~/.context-studio/core/config/electron-config.js` is a config file โ€” safe to edit (e.g. timeouts) - The wizard only clones and `npm install`s core; it never touches core source --- ## ๐ŸŒ Portability Commit your project. On any machine: ```bash git clone cd my-project ./start.sh # wizard re-runs if core missing; image builds on first run ```