# webcoyote/clodpod architecture

> Architecture diagram of the GitHub repository webcoyote/clodpod, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/webcoyote/clodpod
- Repository: https://github.com/webcoyote/clodpod

## Overview

ClodPod is a macOS VM sandbox for running AI coding agents against mounted projects. The user invokes `clod`; the documented workflow builds or starts a VM, mounts selected projects, and opens an agent or shell inside it. Additional capabilities include named VM instances, isolation, port forwarding, memory budgeting, headless operation, and the bundled herdr multiplexer. The tree identifies likely implementation areas, but no source excerpts were provided, so relationships below are limited to those documented in the README.

Main entry points: [`clod`](https://github.com/webcoyote/clodpod/blob/main/clod) (clod CLI), [`lib/ssh.sh`](https://github.com/webcoyote/clodpod/blob/main/lib/ssh.sh) (SSH access), [`guest/install.sh`](https://github.com/webcoyote/clodpod/blob/main/guest/install.sh) (Guest provisioning), [`guest/home/lib/brewfile.sh`](https://github.com/webcoyote/clodpod/blob/main/guest/home/lib/brewfile.sh) (Project packages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and configuration"]
  node_clod["clod CLI"]
  node_commands["Command handling<br/>[commands.sh]"]
  node_configuration["Configuration<br/>[config.sh]"]
end

subgraph group_vm["VM lifecycle"]
  node_vm_build["Build base VM<br/>[build.sh]"]
  node_vm_runtime["VM runtime<br/>[vm.sh]"]
  node_ssh["SSH access<br/>[ssh.sh]"]
end

subgraph group_workspace["Projects and instances"]
  node_project_registry["Project registry<br/>[project.sh]"]
  node_instance_management["Named instances<br/>[instance.sh]"]
  node_state_db[("State database<br/>[db.sh]")]
end

subgraph group_guest["Guest environment"]
  node_guest_install["Guest provisioning<br/>[install.sh]"]
  node_guest_setup["Guest setup<br/>[configure.sh]"]
  node_base_packages["Base packages"]
  node_project_brewfile["Project packages<br/>[brewfile.sh]"]
  node_agent_tools["Agent launchers"]
  node_herdr["herdr multiplexer"]
end

node_user(("User"))
node_macos_vm["macOS VM platform"]
node_homebrew["Homebrew"]

node_user -->|"invokes"| node_clod
node_clod -->|"builds base"| node_vm_build
node_clod -->|"starts or stops"| node_vm_runtime
node_clod -->|"manages projects"| node_project_registry
node_clod -->|"manages instances"| node_instance_management
node_clod -->|"opens shell"| node_ssh
node_vm_build -->|"provisions guest"| node_guest_install
node_guest_install -->|"applies packages"| node_base_packages
node_guest_install -->|"uses"| node_homebrew
node_vm_runtime -->|"runs on"| node_macos_vm
node_ssh -->|"opens agents"| node_agent_tools
node_ssh -->|"reconciles packages"| node_project_brewfile
node_instance_management -->|"applies at creation"| node_project_brewfile
node_agent_tools -->|"includes"| node_herdr
node_project_brewfile -->|"uses"| node_homebrew

click node_clod "https://github.com/webcoyote/clodpod/blob/main/clod"
click node_commands "https://github.com/webcoyote/clodpod/blob/main/lib/commands.sh"
click node_configuration "https://github.com/webcoyote/clodpod/blob/main/lib/config.sh"
click node_vm_build "https://github.com/webcoyote/clodpod/blob/main/lib/build.sh"
click node_vm_runtime "https://github.com/webcoyote/clodpod/blob/main/lib/vm.sh"
click node_ssh "https://github.com/webcoyote/clodpod/blob/main/lib/ssh.sh"
click node_project_registry "https://github.com/webcoyote/clodpod/blob/main/lib/project.sh"
click node_instance_management "https://github.com/webcoyote/clodpod/blob/main/lib/instance.sh"
click node_state_db "https://github.com/webcoyote/clodpod/blob/main/lib/db.sh"
click node_guest_install "https://github.com/webcoyote/clodpod/blob/main/guest/install.sh"
click node_guest_setup "https://github.com/webcoyote/clodpod/blob/main/guest/configure.sh"
click node_base_packages "https://github.com/webcoyote/clodpod/blob/main/guest/Brewfile"
click node_project_brewfile "https://github.com/webcoyote/clodpod/blob/main/guest/home/lib/brewfile.sh"
click node_agent_tools "https://github.com/webcoyote/clodpod/tree/main/guest/home/bin"
click node_herdr "https://github.com/webcoyote/clodpod/blob/main/guest/home/bin/herdr"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_clod,node_commands,node_configuration,node_user toneBlue
class node_vm_build,node_vm_runtime,node_ssh toneAmber
class node_project_registry,node_instance_management,node_state_db toneMint
class node_guest_install,node_guest_setup,node_base_packages,node_project_brewfile,node_agent_tools,node_herdr toneRose
class node_macos_vm,node_homebrew toneIndigo
```

## Components

### CLI and configuration

- [clod CLI](https://github.com/webcoyote/clodpod/blob/main/clod): `clod`
- [Command handling](https://github.com/webcoyote/clodpod/blob/main/lib/commands.sh): `lib/commands.sh`
- [Configuration](https://github.com/webcoyote/clodpod/blob/main/lib/config.sh): `lib/config.sh`

### VM lifecycle

- [Build base VM](https://github.com/webcoyote/clodpod/blob/main/lib/build.sh): `lib/build.sh`
- [VM runtime](https://github.com/webcoyote/clodpod/blob/main/lib/vm.sh): `lib/vm.sh`
- [SSH access](https://github.com/webcoyote/clodpod/blob/main/lib/ssh.sh): `lib/ssh.sh`

### Projects and instances

- [Project registry](https://github.com/webcoyote/clodpod/blob/main/lib/project.sh): `lib/project.sh`
- [Named instances](https://github.com/webcoyote/clodpod/blob/main/lib/instance.sh): `lib/instance.sh`
- [State database](https://github.com/webcoyote/clodpod/blob/main/lib/db.sh): `lib/db.sh`

### Guest environment

- [Guest provisioning](https://github.com/webcoyote/clodpod/blob/main/guest/install.sh): `guest/install.sh`
- [Guest setup](https://github.com/webcoyote/clodpod/blob/main/guest/configure.sh): `guest/configure.sh`
- [Base packages](https://github.com/webcoyote/clodpod/blob/main/guest/Brewfile): `guest/Brewfile`
- [Project packages](https://github.com/webcoyote/clodpod/blob/main/guest/home/lib/brewfile.sh): `guest/home/lib/brewfile.sh`
- [Agent launchers](https://github.com/webcoyote/clodpod/tree/main/guest/home/bin): `guest/home/bin`
- [herdr multiplexer](https://github.com/webcoyote/clodpod/blob/main/guest/home/bin/herdr): `guest/home/bin/herdr`

### Other components

- **User**
- **macOS VM platform**
- **Homebrew**

## Connections

- User → clod CLI: invokes (evidence: `README.md`)
- clod CLI → Build base VM: builds base (evidence: `README.md`)
- clod CLI → VM runtime: starts or stops (evidence: `README.md`)
- clod CLI → Project registry: manages projects (evidence: `README.md`)
- clod CLI → Named instances: manages instances (evidence: `README.md`)
- clod CLI → SSH access: opens shell (evidence: `README.md`)
- Build base VM → Guest provisioning: provisions guest (evidence: `README.md`)
- Guest provisioning → Base packages: applies packages (evidence: `README.md`)
- Guest provisioning → Homebrew: uses (evidence: `README.md`)
- VM runtime → macOS VM platform: runs on (evidence: `README.md`)
- SSH access → Agent launchers: opens agents (evidence: `README.md`)
- SSH access → Project packages: reconciles packages (evidence: `README.md`)
- Named instances → Project packages: applies at creation (evidence: `README.md`)
- Agent launchers → herdr multiplexer: includes (evidence: `README.md`)
- Project packages → Homebrew: uses (evidence: `README.md`)
