Introduction to the Marea Pattern
Learn the core concepts behind Marea.dev and why this approach works for non-programmers.
The Three Pillars
1. Files
Files are your source of truth:
- Context files - Store information the AI needs (user preferences, project details, etc.)
- Data files - Structured data in JSON, CSV, or other formats
- Configuration - Settings that control your automations
- Version controlled - Use git to track changes over time
Example:
~/.marea/
context/
profile.md # Your personal info
projects.json # Active projects
data/
calendar.json # Cached calendar events
config/
settings.json # Automation preferences
2. CLI Tools
Command-line tools are your automation infrastructure:
- Pre-built - No need to write code, tools already exist
- Composable - Chain tools together to build complex workflows
- Universal - Available on macOS, Linux, Windows
- Powerful - Can do anything a programmer can do
Common CLI tools:
curl- Fetch data from APIsjq- Process JSON dataffmpeg- Convert media filespandoc- Convert document formatsgit- Version control- Custom scripts you find or create
3. AI
AI is your interface to files and tools:
- Natural language - Ask for what you want, don't write code
- Tool calling - AI invokes CLI commands for you
- File operations - AI reads context, writes data
- Model agnostic - Works with Claude, GPT, Gemini, or any model that supports tool calling
How It Works
graph LR
A[You: Natural language request] --> B[AI: Understands intent]
B --> C[AI: Reads context files]
C --> D[AI: Calls CLI tools]
D --> E[AI: Writes results to files]
E --> F[You: Get results]
Example workflow:
- You say: "Add a reminder to call Sarah tomorrow at 2pm"
- AI reads: Your calendar context and preferences
- AI calls: Calendar CLI tool to create event
- AI writes: Updated calendar.json
- You get: Confirmation the reminder was added
Why This Approach?
vs SaaS Platforms (Zapier, IFTTT)
| Marea Pattern | SaaS Platforms |
|---|---|
| Files you own | Vendor database |
| Any CLI tool | Limited integrations |
| Free (except AI API) | Monthly fees |
| Git history | No audit trail |
| Runs anywhere | Cloud only |
vs Traditional Programming
| Marea Pattern | Traditional Code |
|---|---|
| Natural language | Write code |
| AI handles logic | You write logic |
| Files as state | Databases |
| Learn by asking | Learn syntax |
Next Steps
Ready to get started?
- Install OpenCode - Our reference CLI tool
- Build your first automation
- Explore examples (coming soon)