π₯© Meatloaf β AI Agent Sandbox Runtime

Build. Run. Test. Ship. π
π¦ Install from npm: npm install -g meatloaf-cli
π npm: https://www.npmjs.com/package/meatloaf-cli
π GitHub: https://github.com/Atum246/meatloaf
Meatloaf is an open-source CLI tool that gives AI agents the power to not just write code, but to build, run, test, and ship applications autonomously. It bridges the gap between "generating code" and "delivering working software."
π€ Why Meatloaf?
AI agents can write thousands of lines of code, but they can't:
- π₯οΈ Spin up and interact with running services
- ποΈ See what the application actually looks like
- π§ͺ Test endpoints and verify behavior
- π Debug issues in real-time
- π Iterate on buildβtestβfix loops
Meatloaf changes that. It gives AI agents a body to interact with the digital world.
β‘ Quick Start
# Install
npm install -g meatloaf-cli
# Create a sandbox
meatloaf create --image node:20-alpine
# Run commands
meatloaf exec sandbox-abc123 "npm init -y && npm install express"
# Test endpoints
meatloaf test --url http://localhost:3000
# Take screenshots
meatloaf screenshot http://localhost:3000
# Full lifecycle
meatloaf up ./my-project
π― Commands
Sandbox Management
| Command | Description |
|---|
meatloaf create | π Create a new sandbox |
meatloaf destroy <id> | π Destroy a sandbox |
meatloaf list | π List all sandboxes |
meatloaf inspect <id> | π Inspect sandbox details |
meatloaf stop <id> | βΉοΈ Stop a sandbox |
meatloaf start <id> | π’ Start a sandbox |
meatloaf cleanup | π§Ή Remove orphaned sandboxes |
Execution
| Command | Description |
|---|
meatloaf exec <id> <cmd> | βΆοΈ Run a command |
meatloaf script <id> <file> | π Run a script file |
meatloaf upload <id> <file> | β¬οΈ Upload file to sandbox |
meatloaf download <id> <path> | β¬οΈ Download file from sandbox |
meatloaf shell <id> | π Interactive shell |
HTTP Testing
| Command | Description |
|---|
meatloaf test [url] | π HTTP request tester |
meatloaf batch <file> | π§ͺ Run batch tests |
meatloaf wait <id> | β³ Wait for endpoint ready |
meatloaf bench <url> | β‘ Load testing with latency percentiles |
Observation
| Command | Description |
|---|
meatloaf screenshot <url> | πΈ Capture screenshot |
meatloaf html <url> | π Get HTML snapshot |
meatloaf logs <id> | π View/stream logs |
meatloaf stats <id> | π Resource usage |
meatloaf monitor | π Live terminal dashboard |
Network Management
| Command | Description |
|---|
meatloaf network create/list/remove | π Docker networks |
meatloaf network connect/disconnect | π Attach sandboxes |
Volume Management
| Command | Description |
|---|
meatloaf volume create/list/remove/prune | πΎ Persistent storage |
Image Management
| Command | Description |
|---|
meatloaf image list/pull/remove/build | πΌοΈ Docker images |
meatloaf image inspect/history/tag/prune | πΌοΈ Image operations |
Multi-Container Orchestration
| Command | Description |
|---|
meatloaf compose up/down/ps/logs | πΌ Docker Compose-style |
Process Management
| Command | Description |
|---|
meatloaf ps list/kill/top/tree | π Process control |
Filesystem Operations
| Command | Description |
|---|
meatloaf fs ls/cat/find/write | π File operations |
meatloaf fs mkdir/rm/du/grep | π Directory operations |
Snapshots
| Command | Description |
|---|
meatloaf snapshot save/restore/list | πΈ State management |
meatloaf snapshot export/import | πΈ Tar export/import |
Health & Monitoring
| Command | Description |
|---|
meatloaf health check/watch/system | π₯ Health checks |
Port Management
| Command | Description |
|---|
meatloaf port scan/check/find/map | π Port operations |
Secrets Management
| Command | Description |
|---|
meatloaf secrets set/get/list/remove | π Encrypted secrets |
meatloaf secrets inject/export/import | π Secret injection |
Environment Profiles
| Command | Description |
|---|
meatloaf env create/show/list/delete | π Profile management |
meatloaf env set/unset/inject/merge/diff | π Variable operations |
Git Operations
| Command | Description |
|---|
meatloaf git clone/status/commit/push | π Git inside sandboxes |
meatloaf git diff/log | π Git history |
File Sync
| Command | Description |
|---|
meatloaf sync up/down/watch | π Sync files |
Proxy & Tunneling
| Command | Description |
|---|
meatloaf proxy start/forward/tunnel | π Port forwarding |
Scheduled Tasks
| Command | Description |
|---|
meatloaf cron add/list/remove/clear | β° Cron jobs |
Diff & Compare
| Command | Description |
|---|
meatloaf diff files/sb/changes | π Compare files |
Watch Mode
| Command | Description |
|---|
meatloaf watch <id> | ποΈ Auto-sync on changes |
Resource Quotas
| Command | Description |
|---|
meatloaf quota set/get/limits | π Resource limits |
Service Discovery
| Command | Description |
|---|
meatloaf discover resolve/lookup/register | π DNS resolution |
Audit Logging
| Command | Description |
|---|
meatloaf audit log/stats/clear/export | π Audit trail |
System
| Command | Description |
|---|
meatloaf system --prune --info | π§Ή System operations |
π€ AI Agent Integration
Meatloaf works seamlessly with:
OpenClaw
# Meatloaf works out of the box with OpenClaw agents
meatloaf create --image node:20-alpine
meatloaf exec sandbox-id "npm start"
meatloaf test --url http://localhost:3000
Claude Code / Cursor / VS Code
# Use meatloaf from any terminal-based AI agent
meatloaf up ./my-project --json # JSON output for parsing
Any AI Agent
# Detect environment
meatloaf agent --detect
# JSON output mode
meatloaf create --image python:3.12-slim --json
π Templates
meatloaf templates # List all
meatloaf init -t node-express
meatloaf init -t python-flask
meatloaf init -t static-site
meatloaf init -t go-gin
meatloaf init -t postgres
meatloaf init -t redis
π₯ Full Lifecycle Example
# One command to rule them all
meatloaf up ./my-app
# This will:
# 1. Create a sandbox
# 2. Upload your project files
# 3. Run setup commands (npm install, etc.)
# 4. Start the application
# 5. Wait for the endpoint to be ready
# 6. Report success
π§ͺ Batch Testing
Create a tests.json:
[
{ "name": "Home", "url": "http://localhost:3000", "method": "GET" },
{ "name": "Health", "url": "http://localhost:3000/health", "method": "GET" },
{ "name": "Create", "url": "http://localhost:3000/api/items", "method": "POST", "body": {"name": "test"} }
]
Run:
meatloaf batch tests.json
βοΈ Configuration
Meatloaf stores config in ~/.meatloaf/config.json:
{
"defaultImage": "node:20-alpine",
"sandboxTTL": 3600000,
"maxSandboxes": 10,
"screenshot": {
"width": 1280,
"height": 720
}
}
ποΈ Architecture
meatloaf/
βββ bin/meatloaf.js # Entry point
βββ src/
β βββ index.js # CLI definition
β βββ commands/
β β βββ sandbox.js # Sandbox lifecycle
β β βββ exec.js # Command execution
β β βββ http.js # HTTP testing
β β βββ screenshot.js # Screenshot capture
β β βββ logs.js # Log management
β β βββ init.js # Project templates
β βββ lib/
β β βββ docker.js # Docker engine
β β βββ http.js # HTTP client
β β βββ screenshot.js # Screenshot engine
β βββ utils/
β βββ logger.js # CLI output
β βββ config.js # Configuration
β βββ helpers.js # Utilities
βββ tests/
βββ integration.test.js # Test suite
π License
MIT β Use it, fork it, make it yours. π₯©
Built with β€οΈ for AI agents everywhere π€