Skip to main content

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 APIs
  • jq - Process JSON data
  • ffmpeg - Convert media files
  • pandoc - Convert document formats
  • git - 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:

  1. You say: "Add a reminder to call Sarah tomorrow at 2pm"
  2. AI reads: Your calendar context and preferences
  3. AI calls: Calendar CLI tool to create event
  4. AI writes: Updated calendar.json
  5. You get: Confirmation the reminder was added

Why This Approach?

vs SaaS Platforms (Zapier, IFTTT)

Marea PatternSaaS Platforms
Files you ownVendor database
Any CLI toolLimited integrations
Free (except AI API)Monthly fees
Git historyNo audit trail
Runs anywhereCloud only

vs Traditional Programming

Marea PatternTraditional Code
Natural languageWrite code
AI handles logicYou write logic
Files as stateDatabases
Learn by askingLearn syntax

Next Steps

Ready to get started?

  1. Install OpenCode - Our reference CLI tool
  2. Build your first automation
  3. Explore examples (coming soon)