Getting Started
Get Moltblock running in under a minute. No configuration required.
Requirements
- •Node.js 22 or later
- •An LLM API key (OpenAI, Anthropic, Google, or ZAI) — or a local LLM at localhost:1234
Quick Start
Run Moltblock directly with npx — no install needed:
# Set your API key
export OPENAI_API_KEY="your-key-here"
# Verify a task
npx moltblock "implement email validation" --jsonGlobal Install
For frequent use, install globally:
npm install -g moltblock
moltblock "your task description" --jsonProvider Auto-Detection
Moltblock automatically detects your LLM provider from environment variables. Set one of these:
| Variable | Provider |
|---|---|
| OPENAI_API_KEY | OpenAI (default) |
| ANTHROPIC_API_KEY | Anthropic / Claude |
| GOOGLE_API_KEY | Google Gemini |
| ZAI_API_KEY | ZAI |
If no key is set, Moltblock falls back to a local LLM at localhost:1234.
Configuration (Optional)
No config file is required. To customize model bindings, create moltblock.json in your project root:
{
"agent": {
"bindings": {
"generator": { "backend": "google", "model": "gemini-2.0-flash" },
"critic": { "backend": "google", "model": "gemini-2.0-flash" },
"judge": { "backend": "google", "model": "gemini-2.0-flash" }
}
}
}Output
With --json, Moltblock returns a structured result:
{
"verification_passed": true,
"verification_evidence": "All policy rules passed.",
"authoritative_artifact": "...",
"draft": "...",
"critique": "...",
"final_candidate": "..."
}