New to DreamCode? Read the Complete Guide — architecture, skills, configuration, and advanced patterns.
An open-source AI coding agent with native dream thinking, 37-skill dynamic graph, memory consolidation, and scoring enforcement.
🔴 WARNING — Parallel Subagents & Cost
DreamCode spawns parallel subagent workers to analyze your code from multiple perspectives simultaneously. Each subagent runs its own LLM inference on a separate model instance and consumes API tokens independently.
Without configuration, subagents use the SAME model as the parent — multiplying your costs. A typical task spawns 3-5 subagents. At Claude Opus pricing (
$15/1M input tokens), that's $0.75 per task. With a cheaper model like$0.15/1M), the same task costs $0.0075 — 100x cheaper.gpt-4o-mini(How to configure:
- Parent model — The main agent that orchestrates and synthesizes. Selected via
/modelsin the TUI (or the model dialog in the footer).- Subagent model — The parallel workers that do analysis. Selected via the subagent model indicator in the TUI footer. Click it to open the model selector and pick a cheaper model (e.g.,
gpt-4o-mini,claude-3-haiku,deepseek-chat).- Clear subagent override — Use the "Clear" option in the subagent model dialog to reset back to the parent model.
The parent agent orchestrates. Subagents execute analysis in parallel. Don't pay premium prices for parallel workers.
Linux / macOS (bash):
curl -fsSL https://raw.githubusercontent.com/weebcoder101/dreamcode/stable-release/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/weebcoder101/dreamcode/stable-release/install.ps1 | iexWindows (WSL2):
# Inside WSL2 terminal — same as Linux
curl -fsSL https://raw.githubusercontent.com/weebcoder101/dreamcode/stable-release/install.sh | bashLinux / macOS (bash):
git clone https://github.com/weebcoder101/dreamcode && cd dreamcode && bash install.shWindows (PowerShell / cmd):
git clone https://github.com/weebcoder101/dreamcode; cd dreamcode; .\install.ps1Linux / macOS:
git clone -b stable-release https://github.com/weebcoder101/dreamcode
cd dreamcode
bun install
cd packages/opencode && OPENCODE_VERSION=1.4.0 bun run build --single
# The binary is at dist/dreamcode-<platform>-<arch>/bin/dreamcode
# Create a symlink so `dreamcode` is available globally:
mkdir -p ~/.local/bin
ln -sf "$(pwd)/dist/dreamcode-linux-x64/bin/dreamcode" ~/.local/bin/dreamcode
# (adjust "linux-x64" to your arch: darwin-x64, darwin-arm64, linux-arm64)
export PATH="$HOME/.local/bin:$PATH"
# Add the export line above to your ~/.bashrc or ~/.zshrc to make it permanent
# Verify
dreamcode --versionWindows (PowerShell):
git clone -b stable-release https://github.com/weebcoder101/dreamcode
cd dreamcode
bun install
cd packages\opencode; $env:OPENCODE_VERSION="1.4.0"; bun run build --single --skip-embed-web-ui
# The binary is at .\dist\dreamcode-windows-x64\bin\dreamcode.exe
# Copy it to a standard location and add to PATH:
$dst = "$env:LOCALAPPDATA\dreamcode\bin"
New-Item -ItemType Directory -Force -Path $dst | Out-Null
Copy-Item "$pwd\dist\dreamcode-windows-x64\bin\dreamcode.exe" "$dst\dreamcode.exe" -Force
$env:Path = "$dst;$env:Path"
# Add the path to your PowerShell profile for future sessions:
[Environment]::SetEnvironmentVariable("Path", "$dst;$env:Path", "User")
# Verify
dreamcode --versionTroubleshooting: If dreamcode: command not found, ensure the symlink target path or $dst directory is on your PATH. On Linux/macOS run echo $PATH to check; on Windows open a new PowerShell terminal.
| Requirement | Linux | macOS | Windows |
|---|---|---|---|
| bun ≥ 1.3.x | Auto-installed | Auto-installed | Auto-installed (source build) |
| Python ≥ 3.10 | Optional | Optional | Optional |
| pip3 | Optional | Optional | N/A |
| unzip | Auto-installed | Auto-installed | Built-in |
| Platform | Binary | Installer | Status |
|---|---|---|---|
| Linux x64 | dreamcode-linux-x64 |
install.sh |
✅ Primary |
| Linux arm64 | dreamcode-linux-arm64 |
install.sh |
✅ |
| macOS x64 (Intel) | dreamcode-darwin-x64 |
install.sh |
✅ |
| macOS arm64 (Apple Silicon) | dreamcode-darwin-arm64 |
install.sh |
✅ |
| Windows x64 | dreamcode-windows-x64 |
install.ps1 |
✅ |
| Windows arm64 | dreamcode-windows-arm64 |
install.ps1 |
-BuildFromSource |
After install, run:
# Start dreamcode in any project directory
dreamcode
# Or with an API key
OPENAI_API_KEY=your-key dreamcodeWindows PowerShell:
# Start dreamcode in any project directory
dreamcode
# Or with an API key
$env:OPENAI_API_KEY = "your-key"; dreamcode- Build fails on fresh clone: Run
cd packages/opencode && bun run build --single— ensuresbin/directory exists for the symlink. dreamcode: command not found(Linux/macOS): Add~/.local/binand~/.bun/binto your PATH, or re-run install.sh.dreamcodenot recognized (Windows): Open a new PowerShell terminal — PATH changes apply to new sessions.- Python skills not working: Run
pip3 install -r .dreamcode/requirements.txt - Sandbox mode not available (macOS): firejail is Linux-only; set
sandbox: falsein config.yaml.
DreamCode is a fork of opencode-go with:
- MiMo-Code's memory system (SQLite FTS5), dream prompts, actor system, task tracking
- Our skill system (37 skills, dynamic graph, model router, scoring)
- Native execution — skills are TypeScript tools, not external scripts
| Feature | OpenCode | DreamCode |
|---|---|---|
| Skills | External SKILL.md files | Native TypeScript tools |
| Memory | Basic | SQLite FTS5 with reconciliation |
| Dream | None | 6-phase memory consolidation |
| Scoring | None | Risk/reward enforcement |
| Model Router | None | 120+ NEURO models, domain-specific |
| Dynamic Graph | Static chain | 37-skill dependency graph |
| Subagents | Basic | Full lifecycle management |
| Context | Basic | Auto-checkpoint + reconstruction |
| Sandbox | On by default | Off by default, opt-in only |
| Feature | MiMo-Code | DreamCode |
|---|---|---|
| Skills | ~10 skills | 37 skills |
| Model Router | None | 120+ NEURO models |
| Scoring | None | Risk/reward enforcement |
| Dynamic Graph | None | 37-skill dependency graph |
| Chain Enforcer | None | Backtesting verification |
# Start dreamcode
dreamcode
# Or with API key
OPENAI_API_KEY=your-key dreamcodeDreamCode works best with the NEURO API — 120+ specialized AI models, completely free.
# Get your free key at https://neurometric.ai
export NEURO_API_KEY="your-key"Without NEURO, DreamCode falls back to local analysis only. With NEURO, you get domain-specific model routing, multi-perspective analysis, and up to 10 review iterations.
See GUIDE.md §19 — NEURO API for full setup.
DreamCode config lives at ~/.config/dreamcode/config.yaml:
sandbox: false # OFF by default — set to true to enable firejail
dream_mode: true # Enable 6-phase dream thinking
scoring: true # Enable scoring enforcement
model_router: true # Enable 120+ model routingSandbox is OFF by default. DreamCode runs with full filesystem access unless you explicitly enable sandbox mode. See GUIDE.md for details.
DreamCode has 37 native skills organized in a dynamic graph:
context-compactor, exhaustive-crosscheck, neuro, model-router, code-hardener, lint-fixer, pieces-ltm, automated-learning, chain-orchestrator, guardian-ai, breakthrough-overdrive-innovation, automation
planning, architecture, quality, security, testing, debugging, performance
python, frontend, react, api
git, git-feature-workflow, devops
quantum, data, research, deep-research, documentation
communication, product, refactoring, onboarding
User Prompt
↓
Sensor Gate (classify intent)
↓
Dynamic Graph (select skills)
↓
Dream Thinking (6 phases: research, ground, reflect, propose, build)
↓
Skill Chain (execute selected skills)
↓
Scoring (record points)
↓
Memory Consolidation (SQLite FTS5)
↓
Response
DreamCode includes full VS Code support:
.vscode/settings.json— TypeScript, formatting, file exclusions.vscode/tasks.json— Build, dev, test, typecheck, sensor gate.vscode/launch.json— Debug TUI, attach to running instance.vscode/extensions.json— Recommended extensions
DreamCode is designed for Antigravity IDE. Open your project in Antigravity and the .opencode/ config is auto-detected. See GUIDE.md for the full Antigravity workflow.
| Guide | Description |
|---|---|
| GUIDE.md | Complete walkthrough — architecture, 37 skills, NEURO, Pieces LTM, advanced patterns |
| SECURITY.md | Security policy, sandbox model, credential storage, vulnerability reporting |
| CONTRIBUTING.md | Development setup, PR guidelines, coding conventions |
| AGENTS.md | Build system, architecture, code patterns (internal developers — gitignored) |
| docs/ | Detailed guides for specific features |
- Dream Thinking — The 6-phase engine behind DREAM_INNOVATION mode
- 37 Skills Reference — Complete catalog with activation conditions and config
- Configuration Reference — Full YAML schema with all options
- NEURO API Setup — 120+ specialized models, free to use
- Sensor Gate — Intent classification, chain selection, spawn decisions
- OpenCode — Base agent framework
- MiMo-Code — Memory system, dream prompts, actor system
- MiMo — MiMo-7B RL model
- NEURO — 120+ specialized models
- Pieces — Long-term memory integration
MIT