How to Install Aider AI Pair Programming (2026)

Quick answer

To install aider ai pair programming in your terminal, run python -m pip install aider-install and then aider-install. Aider installs in its own separate Python environment and adds Python 3.12 for itself if your machine needs it. Then change into a git repository, start Aider with a model and key such as aider --model sonnet --api-key anthropic=, add only the files you want edited, and ask for one small change at a time. Aider costs $0 under the Apache-2.0 licence. In our worked example, 100 lean coding sessions a month cost $6 in model usage, or $20 for heavier repo-aware sessions, at official OpenAI gpt-6.2-sol prices.

Quick Answer

To install aider ai pair programming in your terminal, run python -m pip install aider-install and then aider-install. Aider installs in its own separate Python environment and adds Python 3.12 for itself if your machine needs it. Then change into a git repository, start Aider with a model and key such as aider --model sonnet --api-key anthropic=<key>, add only the files you want edited, and ask for one small change at a time. Aider costs $0 under the Apache-2.0 licence. In our worked example, 100 lean coding sessions a month cost $6 in model usage, or $20 for heavier repo-aware sessions, at official OpenAI gpt-6.2-sol prices checked on December 3, 2026.

In this article

  • How we checked this guide
  • Read this first: licence and positioning in plain words
  • What Aider replaces, and what it does not
  • How Aider, your repo, git, and models fit together
  • Routes to install aider ai pair programming
  • Requirements before you install
  • Step 1: prepare a safe git branch and workspace
  • Step 2: install Aider with aider-install
  • Step 3: use uv, pipx, or Docker when they fit better
  • Step 4: connect a model and protect your keys
  • Step 5: run your first safe pair-programming task
  • First-run security steps you must not skip
  • Backup and update routine
  • Common errors and fixes
  • Tips and tricks that save money
  • The real cost maths
  • When not to self-host Aider
  • Pros and cons
  • Our verdict
  • FAQ
  • Strategic Pivot
  • Sources

How we checked this guide

We checked this guide on December 3, 2026, against the official Aider GitHub repository, the official Aider installation docs, usage docs, LLM connection docs, and configuration docs. We checked comparison prices on official GitHub Docs for Muse plans and on the official OpenAI API pricing page for gpt-6.2-sol token rates. We did not copy install commands from roundups. Every command below comes from Aider’s own documentation or repository. Prices can change after publication, so the dated price note at the end tells you exactly when the figures were checked.

Read this first: licence and positioning in plain words

Aider official GitHub repository to install aider ai pair programming

Aider is an open-source AI pair programming tool that runs in your terminal. The official repository is Aider-AI/aider, and its licence is Apache License 2.0. In plain words, Apache-2.0 lets you use Aider for commercial work, modify it, and distribute it, as long as you keep the licence and copyright notices and accept that the software comes without warranty. There is no Aider seat fee, no Aider subscription, and no Aider cloud plan to buy. The tool itself is free.

Free does not mean costless. You still pay for the model you connect, unless you run a local model on your own hardware. You also pay with your time: you choose the files, review the diffs, run the tests, and decide what merges. Aider is a pair programmer, not an autonomous employee. It edits files you add to the chat, shows diffs, and commits changes to git. You stay responsible for the result.

Positioning matters because Aider is easy to confuse with bigger agent platforms. Our OpenHands guide covers a browser control center for coding agents. Aider is smaller and more direct: one terminal, one repository, one chat, and git commits as the safety net. If you want a visual agent dashboard, OpenHands fits better. If you live in the terminal and want surgical edits with full git history, Aider fits better.

One honest status note: the repository is not archived, but its release cadence has been slower than some newer coding agents. Pin your workflow to the documented install routes and test updates on a branch.

What Aider replaces, and what it does not

Aider replaces the copy-paste loop between a web chat and your editor. Instead of pasting code into a chat window, copying a snippet back, and fixing indentation by hand, you ask Aider in the terminal and it edits the files in place. It also replaces part of a paid editor assistant for terminal-first developers: you bring your own model key, so the model bill is visible and separate from the tool licence.

Aider does not replace code review. Every Aider commit still needs a human diff review, a test run, and a merge decision. It does not replace your issue tracker, your deployment pipeline, or your product judgment. It does not give you team policies, central billing controls, or admin audit logs. GitHub Copilot Business and Enterprise exist for organizations that need centralized management and policy control. Aider gives you freedom and a $0 licence; it does not give you an admin console.

Aider also does not replace a capable model. Weaker models may return code that Aider cannot apply as clean edits, so choose a model strong at editing code.

Best for: a solo developer, freelancer, or small technical team that works in git, wants model choice, and wants every AI edit recorded as a commit. Skip if: your team needs inline completions in an IDE, central policy controls, or a no-code interface. Aider is terminal-first by design.

How Aider, your repo, git, and models fit together

Think of Aider as four parts working together. First, the Aider command runs in your terminal inside a project folder. Second, your git repository gives Aider a map of the codebase and a history for every change. Third, the files you add to the chat are the files Aider may edit in detail. Fourth, the model you connect reads those files, proposes edits, and returns code changes that Aider applies.

Aider builds a repository map so the model can understand related files without you adding every file. Add only edit targets, let the map supply context, and use read-only files for reference material.

Git is the safety system. Aider commits each edit with a descriptive message. Review it, run /diff, or use /undo to discard it. A clean branch keeps Aider’s commits separate from your unfinished work.

Models are interchangeable. Aider can connect to cloud providers and local models, including local models through Ollama or OpenAI-compatible APIs. If you want a fully local setup, our Ollama guide explains the local model side. For most small businesses, a cloud model key is simpler to start, and a local model is a privacy or cost experiment to test after the workflow works.

Routes to install aider ai pair programming

RouteBest forMain requirementWatch out for
aider-installMost first installsPython 3.8-3.13 already installedInstalls Aider in a separate environment, which is a feature, not a bug
One-liner scriptMac, Linux, or Windows machines without a Python setupcurl, wget, or PowerShellYou are running a remote script, so only use the official aider.chat script
uv tool installDevelopers who already use uvuv, with Python 3.12 for AiderUse the documented --force --python python3.12 --with pip form
pipx installDevelopers who already use pipxPython 3.9-3.12Keep Aider isolated from project dependencies
DockerDisposable or shared test environmentsDocker and a git repo root/run commands execute inside the container, not on your host
Direct pipVirtual-environment users onlyPython 3.9-3.12 and a venvAider docs say the routes above are usually safer

The table makes the decision simple. Start with aider-install unless you already standardize on uv or pipx. Use Docker when you want a disposable environment or when a client project must stay isolated from your main Python setup. Avoid system package managers as your first choice, because Aider’s docs warn that they often install Aider with incorrect dependencies.

Requirements before you install

You need four things before the first session. First, a terminal on Mac, Linux, or Windows. Second, a git repository, or a project folder you are willing to put under git. Third, a model access path: a provider API key, a local model server, or an OpenAI-compatible endpoint. Fourth, a test or lint command for the project, even a simple one, so you can verify Aider’s edits instead of trusting them.

Python requirements depend on the route. The aider-install route starts from Python 3.8-3.13 and can install a separate Python 3.12 for Aider. The uv route uses your existing Python 3.8-3.13 to install uv, then uses Python 3.12 for Aider. The pipx and direct pip routes work with Python 3.9-3.12. Do not force Aider into a project virtual environment that also runs your application. Aider’s dependencies belong in Aider’s own environment.

Git must have your name and email configured, because Aider commits changes. In Docker, set them in the repository first; the container does not inherit your global git config.

Decide your spending guardrail first. Model usage is metered by your provider, not Aider, so set a budget alert before the first prompt.

Step 1: prepare a safe git branch and workspace

Start in a clean repository. Run git status and commit or stash your own unfinished work first. Then create a branch for the Aider trial, such as git switch -c aider-try. This branch is your sandbox. If Aider makes a mess, you can delete the branch and keep your main line clean.

Choose one small task for the first session. Good first tasks are a failing test fix, a small refactor in one file, a README correction, or a new utility function with a test. Bad first tasks are a framework migration, a payment-flow rewrite, or anything that touches secrets, migrations, and deployment in one prompt. Aider rewards narrow tasks with clear acceptance criteria.

Write down the verification command before you start, such as pytest or npm test. Pair programming without verification is just faster guessing.

Keep secrets out of the chat. Do not add .env files, keys, or customer exports; use .aiderignore and .gitignore discipline.

Step 2: install Aider with aider-install

Aider official install docs to install aider ai pair programming

The recommended first install is short:

python -m pip install aider-install
aider-install

Run those two commands in your normal terminal, not inside a project virtual environment that you need for other work. The installer places Aider in its own separate Python environment. If needed, it also installs a separate Python 3.12 for Aider. That separation is why this route is safer than a direct pip install into a busy environment.

After installation, change into your project and start Aider with a model:

cd /to/your/project
aider --model sonnet --api-key anthropic=<key>

Replace the model and key with your own. For daily use, store keys through environment variables or Aider’s documented configuration routes.

If the aider command is not found after installation, do not reinstall blindly. Check that the install finished without errors, open a new terminal so your PATH refreshes, and try python -m aider where Aider’s docs suggest it for direct pip environments. Most command-not-found problems are PATH or environment problems, not Aider code problems.

Step 3: use uv, pipx, or Docker when they fit better

Use uv when your team already standardizes on uv for Python tools. Aider’s documented uv route is:

python -m pip install uv
uv tool install --force --python python3.12 --with pip aider-chat@latest

Use pipx when pipx is already your isolated CLI manager:

python -m pip install pipx
pipx install aider-chat

Use Docker when you want the tool isolated from the host or when you are testing Aider on a shared machine. Aider publishes two Docker images: paulgauthier/aider for the core tool and paulgauthier/aider-full for the full extras. Run Docker from the root of your git repository so the volume mount maps the whole repo into the container. Set the repository git name and email first, because the container will not inherit your global git config.

In Docker, /run commands execute inside the container, not on your host. If tests need host tools or services, use a normal install.

Avoid direct pip unless you understand virtual environments. Aider’s docs allow python -m pip install -U --upgrade-strategy only-if-needed aider-chat, but they also say the routes above are usually safer. Treat direct pip as the expert route, not the beginner route.

Step 4: connect a model and protect your keys

Aider can connect to almost any LLM, including local models. The official LLM docs list cloud providers, free API providers with limits, local models through Ollama, and OpenAI-compatible APIs. Choose a model that is strong at code editing. A cheap model that cannot return clean edits is not cheap; it wastes retries and your review time.

Pick one primary model and keep it stable for a week so cost and quality stay comparable. Use /model to switch and /models to search.

Protect keys like passwords. Prefer environment variables or a local .env file that is ignored by git. Aider options can be set by command-line switches, an .aider.conf.yml file in your home directory or repo root, AIDER_xxx environment variables, or a .env file. If you put a key in a repo-level config file, make sure that file is not committed. A leaked model key can be abused by anyone who finds it, and the provider bill will still be yours.

Set a provider spending limit before scaling. Review usage weekly during the trial, separate experiment keys from production keys, and revoke any exposed key first.

Step 5: run your first safe pair-programming task

Aider official usage docs to install aider ai pair programming

Start Aider with the exact files for the task:

aider src/utils.py tests/test_utils.py

Or start Aider in the repo and use /add to add files inside the chat. Add only the files that need editing. If a file is reference-only, use /read-only so the model can see it without changing it. Use /ls to confirm which files are in the chat before you ask for an edit.

Ask for one change with a clear finish line. For example: “Add input validation to parse_amount so empty strings return 0, then update the existing test.” That prompt names the function, the behavior, and the test expectation. Compare that with “make this better,” which gives the model no boundary and gives you no clean review.

After Aider edits, inspect the result before you continue. Use /diff to see the change, run your test command, and read the commit Aider created. If the edit is wrong, use /undo and restate the task more narrowly. If the edit is right, keep the commit and move to the next small task. This loop — add files, ask narrowly, diff, test, keep or undo — is the whole Aider workflow.

Use modes deliberately: /ask for questions, /code for changes, /architect when a task needs planning first.

First-run security steps you must not skip

First, work on a branch. Never run your first Aider session on a production branch with uncommitted work. Second, keep secrets out of the chat. Do not add credential files, customer data, or production exports. Third, review every diff. Aider’s auto-commit is a safety feature only if you actually read the commits.

Fourth, control shell commands. Aider can run commands through /run and test workflows. Only run commands you understand, and be careful with commands that delete files, change permissions, or touch production services. In Docker, remember that /run executes inside the container. On a normal install, it executes on your machine with your permissions.

Fifth, limit model data exposure. Cloud models receive the code context you send. If a repository contains client code under a strict confidentiality agreement, get permission before sending code to a cloud provider, or use a local model. Aider’s local-model route exists for this reason, but local models still need hardware, setup, and quality testing.

Sixth, protect the repository itself. Back up the repo before large refactors, push your trial branch to a private remote if your workflow allows it, and keep branch protection on your main branch. Aider should never be the only copy of your work.

Backup and update routine

Your backup is git, used properly. Commit before Aider sessions, push branches you care about, and keep your remote repository backed up by your normal provider. Aider’s commits make review easy, but a local-only repository can still be lost with a laptop. A small business should treat the git remote as the backup and the local clone as disposable.

Update deliberately: re-run your install route, then test on a throwaway branch before client work. Keep the same tool manager that installed Aider.

Keep a short runbook: install route, primary model, test command, forbidden files, and branch rule.

Review model costs monthly against merged Aider commits. Rising cost without rising merged work means tasks or file selection are too broad.

Common errors and fixes

aider command not found. Open a new terminal, confirm the install route finished, and check your PATH. In direct pip environments, Aider’s docs suggest trying python -m aider. Do not install Aider again into a different environment until you know which environment owns the command.

The model returns code but files do not change. Aider’s docs say this usually means the model is not capable of returning proper code edits. Switch to a stronger editing model, reduce the task size, and add only the target files. Weak models create convincing text and unreliable edits.

Aider edits the wrong file or too many files. You probably added too many files or asked too broadly. Use /drop to remove files, /reset to clear the chat, and restart with the exact files for one task. Use read-only files for reference material.

Git commits fail. Check git config user.name and git config user.email. In Docker, set them in the repository before running the container. Also check for pre-commit hooks that reject Aider’s commits; Aider has a --git-commit-verify option for running pre-commit hooks when making commits.

Costs jump unexpectedly. Look at file selection first. Adding large files and broad directories sends more tokens. Use /ls to see what is in the chat, /drop what you do not need, and keep a provider budget alert on. The repo map already supplies context; you rarely need to add the whole tree.

Tests pass in Docker but fail on the host, or the reverse. Remember that Docker /run commands execute inside the container. Align the test environment, or use a normal install for host-specific projects. Do not debug the model when the real problem is the runtime.

Tips and tricks that save money

Add fewer files. This is the highest-value habit. Aider’s repo map helps the model understand the codebase, so your chat should contain the edit targets, not the entire project. Fewer files means fewer tokens, clearer edits, and faster reviews.

Ask before you edit. Use /ask to explain a legacy function, then switch to /code for the change. Understanding first prevents the expensive pattern of three wrong edits followed by a manual rewrite.

Use architect mode for multi-file changes. When a task touches several files, architect/editor mode can plan before editing. For one-file fixes, normal code mode is usually enough. Match the mode to the risk.

Keep prompts testable. Name the function, the expected behavior, and the test that proves it. A testable prompt produces a reviewable diff. A vague prompt produces a debate.

Use /undo early. If the first edit misses the point, undo and restate. Do not stack correction prompts on a bad edit until the chat context is full of confusion. A clean restatement is cheaper than a long repair conversation.

Keep naming, test, and formatting conventions in the repo where Aider and humans can both see them.

The real cost maths

GitHub Copilot official plans to install aider ai pair programming

Aider’s licence fee is $0 under Apache-2.0. The real cost is model usage plus your review time. To make the model cost concrete, we use official OpenAI gpt-6.2-sol prices checked on December 3, 2026: $2.00 per 1M input tokens and $10.00 per 1M output tokens. Your provider and model may differ, so treat this as a worked example, not a quote.

Lean scenario: a freelancer runs 100 Aider sessions a month. Each session sends 15,000 input tokens and receives 3,000 output tokens. Monthly input is 1,500,000 tokens, which costs $3.00. Monthly output is 300,000 tokens, which costs $3.00. Total model cost is $6.00 a month, or $72 a year. Aider licence cost is $0. Hosting cost is $0 on a machine you already own.

Heavier scenario: the same freelancer runs 100 repo-aware sessions with more context. Each session sends 60,000 input tokens and receives 8,000 output tokens. Monthly input is 6,000,000 tokens, which costs $12.00. Monthly output is 800,000 tokens, which costs $8.00. Total model cost is $20.00 a month, or $240 a year. The jump from $72 to $240 a year is not Aider’s licence. It is context size and task scope.

Now compare the paid anchor. Official GitHub Docs list Muse Pro at $10 USD per month, Pro+ at $39 USD per month, and Max at $100 USD per month for individuals. For organizations, Copilot Business is $19 USD per granted seat per month and Enterprise is $39 USD per granted seat per month, with pooled AI credits and usage beyond the pool charged at $0.01 USD per AI credit.

Copilot Pro therefore costs $120 a year for one individual before any overage logic. Aider’s lean example costs $72 a year in model usage with a $0 licence, which saves $48 a year against Copilot Pro in this narrow comparison. The heavier Aider example costs $240 a year, which is more than Copilot Pro. That is the honest lesson: Aider is not automatically cheaper. Aider is cheaper when your tasks stay lean and your model choice stays disciplined.

For a three-person team, Copilot Business at $19 per seat per month costs $57 a month, or $684 a year, before pooled-credit overage. Aider has no seat fee, but three developers using the heavier example would spend $60 a month in model usage, or $720 a year, plus their own review time. The team comparison therefore depends on workflow, not slogans. If your team needs Copilot’s IDE integration, policy controls, and pooled credits, the seat fee may be worth it. If your team is terminal-first and disciplined about file selection, Aider’s $0 licence keeps the tool layer free.

The save/share-worthy rule is simple: budget Aider by sessions and tokens, not by hope. Count your sessions for one week, multiply by your average input and output tokens, and price that volume on your provider’s official page before you roll Aider out to a team.

When not to self-host Aider

Skip Aider when nobody on the team uses git confidently. Aider’s safety model depends on branches, diffs, commits, and undo. Without git discipline, AI edits become untracked file changes, and untracked changes are how small projects break.

Skip Aider when your team needs inline IDE completions as the main workflow. Aider can be used alongside an editor, but it is not an inline completion engine. If your developers want ghost text in the editor all day, Copilot or a similar IDE assistant fits better.

Skip Aider when client contracts forbid sending code to cloud models and you have no local model capacity. A local model route exists, but it needs hardware and testing. Do not promise a client a private workflow you have not actually run.

Skip Aider when you need central admin controls from day one. Aider has no seat management, no organization policy console, and no pooled billing dashboard. Those are product features, not install settings. Choose a managed product when governance is the requirement.

Finally, skip any AI pair programmer when the codebase has no tests and no owner willing to review diffs. Aider can help you write tests, but it cannot create accountability. The tool is safe only inside a review habit.

Pros and cons

Pros: $0 Apache-2.0 licence with commercial use allowed; terminal-first workflow that fits existing editors; git auto-commits make every edit reviewable and undoable; repo map gives codebase context without adding every file; works with cloud and local models through provider keys or compatible APIs; install routes isolate Aider from project dependencies.

Cons: model usage is metered separately and can exceed a flat subscription when tasks are broad; weak models may fail to return clean edits; no IDE inline completion, admin console, or pooled team billing; git discipline is required for the safety model to work; Docker /run commands execute inside the container, which can confuse host-specific tests; release cadence should be tested on a branch rather than assumed.

Our verdict

Install aider ai pair programming with aider-install when you want a $0-licence terminal pair programmer that edits real files and records every change in git. That route keeps Aider isolated from your project environment, leaves model choice in your hands, and makes review a normal git diff instead of a copy-paste mystery.

Start with one branch, one model, one test command, and one small task. The maths is clear: $0 in Aider licence fees, with $6 a month in model usage for 100 lean sessions in our example, or $20 a month for heavier repo-aware sessions. Choose Copilot when IDE integration and team controls matter more than model freedom. Choose Aider when terminal workflow, git history, and visible token costs matter more.

FAQ

Is Aider free to use for a business?

Yes. Aider is free under the Apache-2.0 licence, which allows commercial use. You still pay for model usage unless you run a local model, and you still spend review time on every diff. There is no Aider subscription or seat fee.

What is the safest way to install Aider?

Use python -m pip install aider-install followed by aider-install for most first installs. It places Aider in a separate Python environment and can add Python 3.12 for Aider if needed. Work on a git branch, add only the target files, and review every commit.

What does Aider need to run?

Aider needs a terminal, a project folder that works best as a git repository, and a model access path such as a provider API key or a local model server. Python requirements depend on the route: aider-install starts from Python 3.8-3.13, while pipx and direct pip use Python 3.9-3.12.

How much does Aider cost?

Aider’s licence fee is $0. Model usage is separate. At official OpenAI gpt-6.2-sol prices checked on December 3, 2026, our example costs $6 a month for 100 lean sessions, or $20 a month for 100 heavier repo-aware sessions. Muse Pro, for comparison, is $10 USD per month on official GitHub Docs.

When should a small business skip Aider?

Skip Aider when the team does not use git confidently, needs IDE inline completions or central admin controls, cannot send code to cloud models and has no local model setup, or will not review diffs and run tests. In those cases, a managed IDE assistant or a stricter human-only workflow is safer.

Strategic Pivot

Before you buy any AI coding subscription, run your own numbers. Use our free AI Cost Calculator to compare a $0-licence tool plus metered model usage against a flat per-seat subscription for your actual session count. Then read our OpenHands guide if you want a browser agent control center, or our LangGraph guide if your next step is building stateful agents rather than pair programming. The right tool is the one whose cost and workflow you can explain in one minute.

Price note — updated December 3, 2026: Prices in this post were checked on December 3, 2026. When you are reading this, the price may be lower or higher. Check the official pricing page before buying.

Sources

Pros

  • $0 Apache-2.0 licence fee with commercial use allowed
  • terminal-first workflow that fits existing editors
  • git auto-commits make every edit reviewable and undoable
  • repo map gives codebase context without adding every file
  • works with cloud and local models through provider keys or compatible APIs
  • install routes isolate Aider from project dependencies

Cons

  • model usage is metered separately and can exceed a flat subscription when tasks are broad
  • weak models may fail to return clean edits
  • no IDE inline completion, admin console, or pooled team billing
  • git discipline is required for the safety model to work
  • Docker run commands execute inside the container, which can confuse host-specific tests
  • release cadence should be tested on a branch rather than assumed
Our verdict

Install aider ai pair programming with aider-install when you want a $0-licence terminal pair programmer that edits real files and records every change in git. That route keeps Aider isolated from your project environment, leaves model choice in your hands, and makes review a normal git diff instead of a copy-paste mystery. Start with one branch, one model, one test command, and one small task. The maths is clear: $0 in Aider licence fees, with $6 a month in model usage for 100 lean sessions in our example, or $20 a month for heavier repo-aware sessions. Choose Copilot when IDE integration and team controls matter more than model freedom. Choose Aider when terminal workflow, git history, and visible token costs matter more.

3 thoughts on “How to Install Aider AI Pair Programming (2026)”

Leave a Comment