@vercel/dream
v0.2.1
Published
A CLI that runs OpenCode in a loop until specs are complete
Maintainers
Readme
@vercel/dream
Write a spec. Get a deployed app.
Dream is a CLI that turns markdown specifications into fully built applications on Vercel. It runs an AI agent in a loop, reading your specs, writing code, and producing a deployable build — no scaffolding, no boilerplate, no manual steps.
pnpm add @vercel/dreamHow it works
- You write a specification in
specs/ dreamreads it, plans the work, and starts building- The agent loops — reading, coding, verifying — until every requirement is met
- Output lands in
.vercel/output/ready to deploy
▲ dream · my-app
dir /Users/you/code/my-app
model vercel/anthropic/claude-opus-4.5
timeout 60.0m
max 100 iterations
● OpenCode ready
● Provider vercel connected
[1] Running session...
▸ read specs/app.md
▸ write PROGRESS.md
Starting with the HTML structure and core game logic.
▸ write .vercel/output/config.json
▸ write .vercel/output/static/index.html
✎ .vercel/output/static/index.html
▸ write .vercel/output/static/styles.css
✎ .vercel/output/static/styles.css
▸ write .vercel/output/static/app.js
✎ .vercel/output/static/app.js
All tasks complete. Verifying output structure.
▸ glob .vercel/output/**/*
12 tools · 48.2k→3.1k · $0.12
[1] ✓ Done (34.2s)
✓ Completed in 1 iteration(s) (34.2s)Quick start
# Scaffold a new project
dream init my-app
cd my-app
# Write your spec
cat > specs/app.md << 'EOF'
# Landing Page
A minimal dark-themed landing page with:
- Hero section with animated gradient title
- Feature grid (3 columns)
- Email signup form
EOF
# Build it
pnpm install
dreamSpecs
Specs are markdown files in the specs/ directory. Write what you want — the more detail, the better the output. The agent reads every .md file in the directory.
specs/
├── app.md # Main application spec
├── design.md # Visual design requirements
└── accessibility.md # A11y requirementsOutput
Dream produces Vercel Build Output API v3 — static files in .vercel/output/static/ with a config.json. Deploy to Vercel or serve anywhere.
Commands
| Command | Description |
|---------|-------------|
| dream | Build the project from specs |
| dream init | Scaffold a new dream project |
| dream models | List available models and auth status |
| dream config | Show project configuration |
Options
| Flag | Description | Default |
|------|-------------|---------|
| -m, --model | Model in provider/model format | vercel/anthropic/claude-opus-4.5 |
| -t, --timeout | Timeout in milliseconds | 3600000 (60m) |
| -i, --max-iterations | Maximum agent loops | 100 |
| -v, --verbose | Show all events | false |
| -d, --dir | Working directory | . |
Authentication
Dream uses the Vercel AI Gateway. Authenticate with either:
OIDC token (Vercel deployments & local dev):
vercel env pull # writes .env.local with VERCEL_OIDC_TOKEN
source .env.local
dreamAPI key:
export VERCEL_API_KEY=your_key
dreamRequirements
- OpenCode installed and available on PATH
- Node.js 18+
- A Vercel account with AI Gateway access
License
MIT
