I code with AI for two cents a task and I am not even slightly sorry
Aider plus Gemini 2.5 Flash, bring your own free key, repo map on, auto-commit on. The whole setup, the config files, and the screenshot of a billing dashboard that still reads under a dollar.
Every few weeks somebody on a Discord I lurk in posts their monthly AI coding bill like it is a badge of honor. Eighty bucks. Two hundred. One guy bragged about four hundred dollars in a single month on a fancy agent rig and people clapped. I sat there on my 2017 ThinkPad and did the math on what I had spent that same month. It was forty one cents. Forty one. I screenshotted my dashboard, did not post it, and quietly felt amazing.
This is the setup that gets me there. It is Aider running in the terminal, pointed at Gemini 2.5 Flash, with my own free API key. No subscription. No seat license. No IDE that wants nine gigs of RAM to autocomplete a function. Two MCP servers, one git hook, three rules I actually follow. If you have ever felt a little sick watching tokens drain while a model rewrites a file you did not ask it to touch, this is for you.
Why Aider and not the shiny stuff
Aider is free and open source. It talks to whatever model you give it a key for, it lives in your terminal, and it commits its own changes to git so you always have an undo. That last part matters more than it sounds with a cheap model. Flash will occasionally do something dumb, and when it does I just type git reset --hard HEAD~1 and move on. No drama, no lost work.
The other tools are fine. Cursor is genuinely nice. But Cursor wants twenty dollars a month before I have typed a single prompt, and the whole point of me is that I will not pay twenty dollars a month for anything I can do with a free key and a config file. Aider charges me nothing. Google's free tier covers most of my day. The pennies I do spend are real usage, not rent.
Aider DocumentationThe official docs. Terminal pair programmer that wires any LLM to your local git repo, with auto-commits and a repo map. Read the model and repo-map pages first.aider.chatThe config that makes it cheap
Everything lives in one file at the repo root, .aider.conf.yml. This is the file. Not a stripped down version, the actual thing I commit. The lines that save me money are the model line, the repo map, and the context limits.
# .aider.conf.yml (lives at repo root, committed)
# This is the whole reason my bill is two cents a task.
# Cheap by default. Flash for everything.
model: gemini/gemini-2.5-flash
# I bring my own key, free tier from Google AI Studio.
# export GEMINI_API_KEY=... in my shell, never in here.
# Auto-commit every edit so I can git reset when Flash goes sideways.
auto-commits: true
attribute-author: false
attribute-committer: false
# Repo map is what keeps a cheap model grounded. Do not skip this.
map-tokens: 1024
map-refresh: auto
# Keep the context tiny. Tiny context = tiny bill.
cache-prompts: true
max-chat-history-tokens: 2048
# Lint after each edit, let me eyeball before I trust it.
auto-lint: true
lint-cmd: "eslint --fix"
auto-test: falsemodel: gemini/gemini-2.5-flashis the headline. Flash, always, until I say otherwise. Pro never loads unless I ask for it mid-session.map-tokens: 1024builds a tiny repo map so a small model knows what your codebase looks like without me pasting whole files in. Grounding for almost free.max-chat-history-tokens: 2048is me being ruthless. A short memory means a cheap prompt. If a task needs more history than that, it is too big and I should split it.auto-commits: trueis my safety net. Every edit becomes a commit, so a bad Flash answer is one reset away from gone.
I also keep a .aider.model.settings.yml so the edit format is locked to diffs (cheaper and safer than whole-file rewrites) and so Pro is defined but not used until I call it. This is the escalation hatch from rule two.
# .aider.model.settings.yml
# When Flash gives up on a hard file, /model swaps me to Pro for
# that one message, then I switch back. I never sit on Pro.
- name: gemini/gemini-2.5-flash
edit_format: diff
use_repo_map: true
send_undo_reply: false
examples_as_sys_msg: true
- name: gemini/gemini-2.5-pro
edit_format: diff
use_repo_map: true
# only loaded on demand with /model, see the escalation ruleTwo MCP servers, no more
I run exactly two MCP servers: filesystem and git. That is on purpose. Every server you add throws its tool definitions into the context window, and I just spent a whole section telling you context is money. Filesystem lets Flash read and write within the project. Git lets it see history and stay oriented. I do not need a browser, a database driver, or six SaaS connectors to rename a variable.
# .aider.conf.yml (mcp section)
# Two servers, that is it. Files and git. Anything fancier is just
# tokens I am paying for and tokens are money.
mcp-servers:
filesystem:
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
git:
command: uvx
args: ["mcp-server-git", "--repository", "."]One hook: commit every edit
There is exactly one piece of automation in this build, and Aider gives it to me for free: auto-commits. After every edit it makes, Aider stages and commits with a generated message. I do not write a hook script for this, I just leave the flag on. It is the cheapest insurance there is. When Flash hands me garbage, the previous good state is already a commit behind it.
I launch it through a shell alias so I never accidentally start on an expensive model. Muscle memory protects the wallet.
# ~/.zshrc
# How I actually launch it. Note: no Pro anywhere by default.
alias cheap='aider --model gemini/gemini-2.5-flash --no-auto-test'
# The one I run 95% of the time. Flash, repo map on, auto-commit on.
# When it stalls twice on the same file I type /model gemini/gemini-2.5-pro,
# get the one fix, then /model gemini/gemini-2.5-flash to go cheap again.The three rules I actually live by
A cheap model is a sharp tool with a short handle. The rules are not about ethics or code style, they are about keeping Flash inside the box where it is reliable. Break them and the pass rate falls off a cliff and you start re-running tasks, which costs more than just using a better model in the first place.
- Tiny scoped edits only. One function, one bug, one rename. The moment a request spans five files I split it into five prompts. Flash nails small things and flails at big ones.
- Escalate to Pro when it stalls. If Flash whiffs the same edit twice, I type /model gemini/gemini-2.5-pro, get the single fix, then drop straight back to Flash. I am on Pro for one message, not one session.
- Use the repo map to stay grounded. I never paste whole files when the map can carry the context for a fraction of the tokens. The map is the cheapest grounding you will ever buy.
The honest tradeoff, in a table
I am not going to sell you a fairy tale. This build sits in the C tier on the leaderboard for a reason. It is the cheapest thing that still works, not the best thing. Here is the real comparison so you can decide if your time is worth more than my forty cents.
| What you care about | This build (Flash) | A premium agent rig |
|---|---|---|
| Cost per task | ~$0.02 | $0.50 and up |
| First-try pass rate | around 66% | 90%+ |
| Best at | small scoped edits | whole features |
| Monthly bill, my usage | under $1 | $80 to $400 |
| Setup cost | free, BYO key | subscription per seat |
Two thirds of my tasks land on the first try for two cents. The other third I either reword, split smaller, or bounce to Pro for one message. I have run the numbers more than once. It is still cheaper than anything else by a mile.
Watch it before you build it
If you have never seen Aider drive a terminal, these two are the quickest way to get the shape of it. First one is the official overview, second is a hands-on starter. Neither is about being cheap specifically, but both show the loop I am running.
9:48
11:32Steal it, it costs you nothing
Grab a free Gemini key from Google AI Studio, install Aider, drop in the config above, and you are running. Adding this build writes the .aider.conf.yml, the model settings, and the two MCP servers into your repo so you can start cheap on day one. Tune the rules to your own discipline and your bill will look like mine.
That is it. No subscription got harmed in the making of this build. Now go check your own dashboard and tell me you cannot beat four hundred dollars a month.