podspawnpodspawn

Getting Started with podspawn dev

Clone a repo, run one command, get a full dev environment.

podspawn dev turns any directory with a podfile.yaml into a ready-to-use containerized dev environment. One command, no manual setup.

The flow

Clone and enter

git clone github.com/yourorg/yourproject
cd yourproject

Start the environment

podspawn dev

Podspawn reads the Podfile, builds a cached image, starts companion services, bind-mounts your code, and drops you into a shell.

Work

You're inside the container with all tools, services, and your code at /workspace. When you're done, exit the shell or run podspawn down.

What happens under the hood

Find Podfile -- looks for .podspawn/podfile.yaml, then podfile.yaml, then falls back to .devcontainer/devcontainer.json

Resolve extends -- if the Podfile uses extends:, the base is loaded and merged

Build image -- a Docker image is built from the merged Podfile (cached by content hash, so rebuilds only happen when the Podfile changes)

Start services -- companion containers (databases, caches) are created on a shared network

Mount workspace -- your local directory is bind-mounted into the container at /workspace/<dirname>

Run hooks -- on_create runs once on first start, on_start runs on every attach

Open shell -- you're dropped into the container's shell, in your workspace directory

Running commands

Instead of an interactive shell, pass a command after --:

podspawn dev -- make test
podspawn dev -- go build ./...
podspawn dev -- npm run lint

The command runs inside the Podfile environment and exits.

Lifecycle

Flags

FlagTypeDescription
--ephemeralbooleanDestroy container on exit instead of keeping it alive
--dotfilesbooleanApply your personal dotfiles from ~/.podspawn/config.yaml
--name <name>stringOverride the session name (default: derived from directory)
--freshbooleanDestroy any existing session and start clean
--ports 9090,9091stringForward additional ports beyond what the Podfile declares
--podfile <path>stringUse a specific Podfile instead of auto-detecting

No Podfile?

If no Podfile exists, run podspawn init to scaffold one:

podspawn init
# Detected: Go project (go.mod found)
# Base image? [ubuntu:24.04]
# ...
# Created podfile.yaml

See podspawn init for details.

How is this guide?

On this page