$0/month — All Free Tools

Build with AI.
$0/month.

A complete guide to setting up a powerful local AI development workflow using free, open-source tools. No credit card required.

OpenCode
+
OpenRouter
+
Obsidian
+
AGENTS.md
What you'll be able to build:

All free. All running on your machine. Let's set it up.

In this guide:
  1. Install OpenCode — get your AI agent running in minutes (free via Zen)
  2. Upgrade to OpenRouter — unlock 29+ free models for more power
  3. Add Obsidian — supercharge your workflow with an AI-powered knowledge base
  4. AGENTS.md — teach your agent about your project
  5. Architecture — how it all connects
  6. Daily Workflow — what a typical day looks like
  7. Pro Tips — advanced config and optimizations
  8. Go Live — share what you built with the world
Prerequisites
  • A Mac (macOS 12+) or Linux machine (Ubuntu 20.04+, Fedora 36+, or similar)
  • Terminal access — this is the text-based window where you type commands. On Mac, open Terminal.app (search "Terminal" in Spotlight). On Linux, use any terminal app.
  • Internet connection for initial setup
  • 10-15 minutes of your time
  • macOS 12+ or Linux (Ubuntu 20.04+, Fedora 36+)
  • Terminal access
  • Node.js 18+ (or install via instructions below)
  • 10-15 minutes

Windows support coming soon.

1

Install OpenCode

OpenCode is a terminal-based AI agent that reads your files, understands context, and helps you with any task. It's open source and comes with Zen, a built-in gateway that includes free models. Just select one and start working — no accounts needed.

What's a terminal?
The terminal is a text-based window where you type commands instead of clicking buttons. Think of it as a direct conversation with your computer. Don't worry — we'll walk you through every command.
Already have Node.js?
Skip straight to npm install -g opencode below. If you prefer a different provider (OpenRouter, Anthropic, etc.), you can configure that in Step 2.

Installation

OpenCode is installed via npm. Make sure you have Node.js 18+ installed first.

brew install node  # if not installed
npm install -g opencode

# Verify installation
opencode --version
Don't have Homebrew? Click here to install it first

Homebrew is a package manager for Mac. Install it with this one command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the on-screen instructions. When done, close and reopen your terminal, then continue with the install command above.

sudo apt install nodejs npm  # Ubuntu/Debian
# or: sudo dnf install nodejs npm  # Fedora
npm install -g opencode

# Verify installation
opencode --version

Select Zen as Your Provider (Free)

OpenCode comes with Zen, a built-in model gateway with rotating free models. No API key needed, no credit card, no config files — just pick a model and go.

  1. Open your terminal and run opencode
  2. You'll see a welcome screen — select Zen as your provider
  3. Pick one of the free models (they're labeled as free)
  4. That's it — start using it immediately
# Launch OpenCode
opencode

# On the welcome screen:
# 1. Select "Zen" as your provider
# 2. Pick any free model from the list
# 3. Start working — no accounts or API keys needed
Why Zen?
Zen gives you instant access to free AI models with zero configuration. No accounts to create, no API keys to manage, no config files to edit. Just launch OpenCode, pick a model, and go. You can always upgrade to more powerful models later in Step 2.

Your First Task

Let's make sure everything works. Give OpenCode something fun:

# Navigate to any folder
cd ~/Desktop

# Launch OpenCode and give it a task
opencode "Make me a shopping list for a homemade lasagna dinner for 4 people, including ingredients I'd need and estimated quantities"

OpenCode will generate something like this:

## Lasagna Dinner for 4

### Pasta & Sauce
- Lasagna noodles: 12 sheets (one 16oz box)
- Crushed tomatoes: 1 can (28oz)
- Tomato paste: 1 small can (6oz)
- Olive oil: 2 tablespoons

### Meat & Dairy
- Ground beef: 1 lb
- Ricotta cheese: 15oz container
- Mozzarella cheese: 1 lb (shredded)
- Parmesan cheese: 1/2 cup (grated)
- Eggs: 1 large

### Vegetables & Herbs
- Yellow onion: 1 medium
- Garlic cloves: 4
- Fresh basil: 1 small bunch
- Dried oregano: 1 teaspoon
- Salt and pepper to taste

### Side Dish & Bread
- Garlic bread: 1 loaf
- Mixed salad greens: 1 bag (5oz)
- Salad dressing of choice: 1 bottle

If you see OpenCode generating a response like this — congratulations! You have a working AI agent on your machine. It can answer questions, write content, organize information, write code, and help you with anything you can describe in plain English.

OpenCode is now working with Zen as the backend. For access to more models and greater flexibility, continue to Step 2.

What OpenCode Does
OpenCode reads your entire project context, understands your codebase structure, and can write, edit, and refactor code — all from the terminal. It's like having a senior developer pair-programming with you.

Try These Prompts

Copy any of these and paste them into OpenCode to see what it can do:

Plan a week of healthy dinners for 2 people and create a combined shopping list
Organize my Downloads folder — sort files into subfolders by type (images, documents, videos, etc)
Write a professional email declining a meeting request politely
Create a simple budget tracker that reads a CSV file and shows spending by category
Summarize the key points from this article: [paste any article text here]
Create a Python script that renames all photos in a folder with the date they were taken
Prompt Tip
The more context you give, the better the output. Include file paths, error messages, or paste relevant code. AI agents work best when they know exactly what you're working with.
2

Upgrade to OpenRouter

Zen's free models are great for getting started. For more powerful and reliable models, upgrade to OpenRouter — it gives you access to 29+ free models from top providers. No credit card needed.

Why upgrade?
OpenRouter gives you access to a wide variety of models from different providers, each great at different things. Some models are better at writing code, others at creative writing, others at research. More choice means better results for your specific task.
OpenRouter advantage
Single API key, unified endpoint, 29+ free models. We recommend qwen/qwen3.6-plus:free as a great all-rounder. Browse free models at openrouter.ai/models — look for the :free suffix. See our Best Free Models guide for picks by task.

Sign Up & Get Your API Key

# 1. Go to https://openrouter.ai
# 2. Click "Sign Up" (GitHub, Google, or email)
# 3. Go to Settings → Keys
# 4. Click "Create Key"
# 5. Copy your key — it starts with "sk-or-v1-"

# Your free tier includes credits for free models
# No credit card required to start

Configure OpenCode with OpenRouter

Now point OpenCode at OpenRouter instead of Zen. Paste your API key in place of YOUR_KEY.

Terminal command (creates the file automatically):

mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.json << 'EOF'
{
  "provider": "openrouter",
  "model": "qwen/qwen3.6-plus:free",
  "api_key": "sk-or-v1-YOUR_KEY",
  "base_url": "https://openrouter.ai/api/v1"
}
EOF

Or edit manually — open ~/.config/opencode/config.json and paste:

{
  "provider": "openrouter",
  "model": "qwen/qwen3.6-plus:free",
  "api_key": "sk-or-v1-YOUR_KEY",
  "base_url": "https://openrouter.ai/api/v1"
}

Or if you prefer a different free model, try one of these alternatives:

qwen/qwen3.6-plus:free        — Best all-round free model
google/gemma-3-27b-it:free     — Google's open model
meta-llama/llama-4-scout:free  — Meta's latest open model
Choosing a Model
Replace your-chosen-model:free with any free model from OpenRouter's model list. Look for models with the :free suffix — for example, something like qwen/qwen3.6-plus:free. The available models change regularly, so browse the list and pick what suits your needs.
Pro Tip
You can also set the API key via environment variable: export OPENROUTER_API_KEY="sk-or-v1-..." — this keeps it out of config files.
Important
Free models have rate limits and may have lower priority during peak times. For production use, consider adding a small credit balance ($5-10) for paid models when you need guaranteed performance.

How Free Models Work on OpenRouter

OpenRouter offers models with a :free suffix at no cost. These are provided by model creators as a way to let developers try their models. The free tier is genuinely free — no hidden charges, no credit card required.

Free models may have:

  • Rate limits (requests per minute)
  • Lower priority during high traffic
  • Potential usage caps per day

The free tier allows up to 50 requests per day and 20 requests per minute. For personal development, this is usually enough. If you need more, purchasing 10+ credits raises the limit to 1,000 requests/day.

3

Add Obsidian as Your Knowledge Base

Supercharge your workflow with Obsidian. It's a powerful local-first note-taking app that stores your notes as plain Markdown files. With AI plugins, it becomes your personal knowledge base that can summarize, search, and generate content using the same free models from OpenRouter.

What's Obsidian?
Think of Obsidian as a supercharged notebook app. It stores all your notes as simple text files on your computer (not in the cloud). The AI plugin lets you ask questions about your notes, get summaries, and generate content — all using the free models you set up in Step 2.

Install Obsidian

Download Obsidian from obsidian.md — it's free for personal use on all platforms (macOS, Windows, Linux, iOS, Android).

# Download from obsidian.md or use Homebrew
brew install --cask obsidian
# Download the .deb or .AppImage from obsidian.md
# For Ubuntu/Debian:
sudo dpkg -i obsidian_*.deb
# Or use Snap:
sudo snap install obsidian --classic

Set Up the Copilot Plugin

The Copilot plugin brings AI directly into your Obsidian vault. Here's how to set it up:

  1. Open Obsidian and go to Settings → Community Plugins
  2. Click Browse and search for "Copilot"
  3. Install and enable the plugin
  4. In Copilot settings, set the provider to OpenRouter
  5. Enter your OpenRouter API key
  6. Select your preferred free model from OpenRouter (look for models with the :free suffix)

In the Copilot plugin settings, use these values:

{
  "provider": "openrouter",
  "apiKey": "sk-or-v1-YOUR_KEY",
  "model": "qwen/qwen3.6-plus:free",
  "baseUrl": "https://openrouter.ai/api/v1",
  "temperature": 0.7,
  "maxTokens": 4096
}

You can swap qwen/qwen3.6-plus:free for any model from the OpenRouter free models list.

What You Can Do with Obsidian + AI

  • Chat with your notes — Ask questions and get answers based on your vault content
  • Summarize long documents — One-click summaries of meeting notes, articles, research
  • Generate content — Draft blog posts, documentation, or creative writing
  • Tag and organize — AI suggests tags and categories for new notes
  • Translate — Translate notes between languages instantly
  • Extract action items — Pull tasks and todos from meeting notes automatically
Also Try: Smart Connections
The Smart Connections plugin uses embeddings to find related notes in your vault. Combined with Copilot, it creates a powerful AI-assisted knowledge management system — all running locally with free models.

Alternative: Obsidian Text Generator Plugin

Another excellent option is the Text Generator plugin, which supports OpenRouter out of the box and offers more granular control over prompts and templates.

4

AGENTS.md — Teach Your Agent About Your Project

This is the secret weapon that makes AI agents genuinely useful. Create an AGENTS.md file in your project root to give your AI agent context about your project's conventions, architecture, and standards.

Think of it as a cheat sheet
Imagine hiring a new developer and giving them a document that explains how your project works, what tools you use, and what rules to follow. AGENTS.md is exactly that — but for your AI agent. The better the cheat sheet, the better the agent performs.
AGENTS.md spec
OpenCode and other AI agents read AGENTS.md from the project root. It supports Markdown with sections for stack, conventions, architecture, and workflow rules. Nest additional AGENTS.md files in subdirectories for module-specific context.

Create Your AGENTS.md

Create an AGENTS.md file in your project root to give AI agents context about your project:

# Project: My SaaS App

## Tech Stack
- Next.js 15 (App Router)
- TypeScript
- Tailwind CSS + shadcn/ui
- PostgreSQL + Prisma
- Deployed on Vercel

## Coding Standards
- Use functional components with hooks
- Prefer server components where possible
- All API routes use tRPC
- Tests with Vitest + Testing Library
- ESLint + Prettier enforced

## Architecture
- /app — Next.js app router pages
- /components — Shared UI components
- /lib — Utilities and shared logic
- /server — Server actions and API routes
- /prisma — Database schema and migrations

## When Adding Features
1. Check if a similar component exists
2. Follow the existing file structure
3. Add tests for new functionality
4. Update this file if architecture changes

OpenCode reads this file automatically and uses it to understand your project conventions. This means every code suggestion follows your team's standards.

Why AGENTS.md Matters
Without context, AI agents make generic suggestions. With AGENTS.md, they understand your exact stack, conventions, and preferences. It's the difference between a junior dev and a senior dev who knows your codebase.

How It All Connects

Here's the architecture of your free AI development stack. Each tool plays a specific role, and together they create a powerful, private, and cost-free workflow.

System Architecture
OpenCode Terminal AI Agent
Coding & Refactoring
OpenRouter Free Model Access
Multi-Provider API
Obsidian Knowledge Base
AI-Powered Notes
OpenCode API
Obsidian API
OpenRouter — Free Model Hub 29+ free models · Search for :free on openrouter.ai
Models Responses
AGENTS.md Project Context
Agent Instructions
Your Code Generated & Refactored
Production Ready
Your Knowledge Local Notes Vault
AI-Enhanced Search

Finding Free Models on OpenRouter

OpenRouter regularly rotates which models are available for free. Rather than listing specific models that may come and go, here's how to find them and what to look for.

What to Look For Why It Matters Best For
Models with :free suffix Zero cost, no credit card needed Day-to-day coding, writing, research
Large open models (70B+ params) Better reasoning and code quality Architecture decisions, complex logic
Large context windows (100K+) Can read your entire codebase at once Refactoring, codebase analysis
Fast inference models Quick responses, less waiting Iterative coding, quick questions
Browse Free Models
Visit openrouter.ai/models and filter by "Free" to see what's currently available. The selection changes regularly as providers add and rotate models.
Example Model
As a reference, Qwen 3.6 Plus (free) is the kind of model to look for — a large, capable model offered at no cost. The exact models available will change, but the pattern stays the same: look for the :free suffix on OpenRouter.
Free Tier Limits
Free models often have rate limits (requests per minute) and may be slower during peak hours. For production work, consider upgrading to paid tiers — but for learning and prototyping, the free tier is more than enough.

Your Daily Workflow

Here's what a typical day looks like using this stack. It's designed to be frictionless — you spend time building, not configuring.

Morning — 9:00 AM
Review & Plan in Obsidian
Open your Obsidian vault. Use Copilot to summarize yesterday's notes. Ask: "What were my open tasks?" The AI scans your vault and lists pending items. Draft today's plan in a new daily note.
9:30 AM
Start Coding with OpenCode
Open your terminal, navigate to your project, and launch OpenCode. It reads your AGENTS.md for context. Describe what you want to build: "Create a user settings page with dark mode toggle, notification preferences, and profile editing." OpenCode plans the approach, writes the code, and creates tests.
11:00 AM
Research & Document in Obsidian
Hit a design decision? Open Obsidian and ask Copilot: "Compare Zustand vs Redux Toolkit for state management in a Next.js app." Get a detailed comparison. Save the answer as a note for future reference — your knowledge base grows with every question.
2:00 PM
Refactor & Review
Back in OpenCode: "Review the code I wrote this morning and suggest improvements." OpenCode analyzes your changes, suggests optimizations, and can apply them with your approval. It follows the standards in your AGENTS.md.
4:00 PM
Update Documentation
Tell OpenCode: "Update the README with the new features I added today." It reads the changed files and writes accurate documentation. Save key learnings to Obsidian for next time.
5:00 PM
Daily Retrospective
In Obsidian, ask Copilot to generate a daily summary from your notes. It compiles what you built, what you learned, and what's pending. Your knowledge base becomes a living record of your progress.

Pro Tips & Advanced Config

Level up your setup with these optimizations and advanced configurations.

Model Routing
Use different models for different tasks. Set qwen/qwen3.6-plus:free as your default all-rounder, then experiment with others from the Best Free Models guide. Configure this in your OpenCode config.
🔒
Secure Your API Key
Never commit API keys to git. Use a password manager or ~/.env file with proper permissions (chmod 600). Rotate your key periodically from the OpenRouter dashboard.
📚
Obsidian Vault Structure
Organize your vault with PARA method: Projects, Areas, Resources, Archives. AI works better with well-organized notes. Use consistent naming and tags for better search results.
🛠
AGENTS.md Templates
Create AGENTS.md templates for different project types (React, Python, Go, etc.). Copy the relevant template when starting a new project. Saves 30+ minutes of setup per project.
🚀
Temperature Settings
Use temperature 0.1-0.3 for code generation (deterministic, consistent). Use 0.7-0.9 for brainstorming and creative tasks in Obsidian. Lower temperature = more predictable output.
📈
Monitor Usage
Check your OpenRouter dashboard regularly to track usage. Set up alerts if you approach rate limits. The free tier is generous, but monitoring prevents surprises.
💾
Multiple Models
OpenRouter gives you access to many free models. Try different ones for different tasks -- use a coding model for code generation and a general model for writing and research. Check the OpenRouter dashboard for the latest free options.
📝
Prompt Templates
Create a snippets file with your most-used prompts: code review, bug fix, feature spec, documentation. Paste them into OpenCode or Obsidian Copilot for consistent, high-quality results every time.

Ready to Share What You Built?

You've built something with your AI agent. Now share it with the world — completely free.

What does "going live" mean?
Right now, your project lives on your computer. "Going live" means putting it on the internet so anyone can see it — like publishing a book instead of keeping your manuscript in a drawer. All the tools below are free.

GitHub — Store Your Code

Store your code and collaborate with others. Create a free account at github.com, then create a new repository and push your project there.

Cloudflare Pages — Deploy Your Site

Deploy your site for free with automatic SSL, CDN, and GitHub integration. Once you push to GitHub and connect to Cloudflare Pages, every git push deploys your site automatically.

# Connect your GitHub repo at dash.cloudflare.com
# Select your repo → Framework: None → Build: (leave empty) → Deploy

pages.cloudflare.com — 500 deploys/month free, unlimited bandwidth.

Umami — Add Analytics

Privacy-friendly analytics so you can see who's visiting your site. Self-host or use the cloud free tier.

<script defer src="https://cloud.umami.is/script.js" data-website-id="YOUR_ID"></script>

umami.is — 10K events/month free.

Zoho Mail — Professional Email

Get professional email on your custom domain. Free tier includes 5 users, 5GB/user.

zoho.com/mail — Connect your domain for professional email.

The full loop
Build with OpenCode, document in Obsidian, push to GitHub, deploy on Cloudflare Pages, track with Umami, communicate via Zoho Mail. Your entire workflow — from idea to live project — costs $0/month.

Ready to Build?

You now have everything you need to set up a powerful, free AI development workflow. Start with Step 1 and you'll be coding with AI in under 15 minutes.