Demonstrates running Claude Code inside a Modal container. Claude Code adds a checkout API endpoint to a simple pottery shop Express app — entirely autonomously in the cloud.
- Install Modal:
pip install modal - Authenticate:
modal setup - Create a Modal secret named
anthropic-api-keywith your Anthropic API key:modal secret create anthropic-api-key ANTHROPIC_API_KEY="sk-ant-..."
modal run run_claude_in_modal.pyThis builds a container with Node.js and Claude Code, copies in the pottery shop app, and asks Claude Code to add a POST /api/checkout endpoint. The output shows Claude's work and the resulting git diff.
pottery-shop/— A minimal Express API with product listingsrun_claude_in_modal.py— Modal script that builds the image and runs Claude Code