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.
- Smart shopping list manager that suggests recipes
- Email assistant that drafts replies and sorts your inbox
- Research agent that summarizes any topic
- Finance tracker that categorizes your spending
- ...and anything else you can describe in plain English
All free. All running on your machine. Let's set it up.
- Install OpenCode — get your AI agent running in minutes (free via Zen)
- Upgrade to OpenRouter — unlock 29+ free models for more power
- Add Obsidian — supercharge your workflow with an AI-powered knowledge base
- AGENTS.md — teach your agent about your project
- Architecture — how it all connects
- Daily Workflow — what a typical day looks like
- Pro Tips — advanced config and optimizations
- Go Live — share what you built with the world
- 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.
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.
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
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.
- Open your terminal and run
opencode - You'll see a welcome screen — select Zen as your provider
- Pick one of the free models (they're labeled as free)
- 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
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.
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
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.
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
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.
export OPENROUTER_API_KEY="sk-or-v1-..." — this keeps it out of config files.
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.
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.
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:
- Open Obsidian and go to Settings → Community Plugins
- Click Browse and search for "Copilot"
- Install and enable the plugin
- In Copilot settings, set the provider to OpenRouter
- Enter your OpenRouter API key
- Select your preferred free model from OpenRouter (look for models with the
:freesuffix)
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
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.
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.
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.
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.
Coding & Refactoring
Multi-Provider API
AI-Powered Notes
:free on openrouter.ai
Agent Instructions
Production Ready
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 |
:free suffix on OpenRouter.
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.
Pro Tips & Advanced Config
Level up your setup with these optimizations and advanced configurations.
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.~/.env file with proper permissions (chmod 600). Rotate your key periodically from the OpenRouter dashboard.Ready to Share What You Built?
You've built something with your AI agent. Now share it with the world — completely 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) → Deploypages.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.
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.