pip로 Aider 설치하기: API 키 설정과 Git 저장소 터미널 페어 프로그래밍
aider-chat pip 설치, API 키, Git에서 aider 실행, 검토 가능한 변경 하나.
The first hour with terminal pair programming in a Git repo usually breaks on the wrong PyPI package, missing OPENAI_API_KEY or ANTHROPIC_API_KEY, or running outside a Git work tree—not on the prompt. Install with pip install aider-chat, export keys, run aider at the repo root, then land one change you can read in git diff.
검색어는 pip로 Aider를 설치해 터미널에서 페어 프로그래밍하는 방법. This page follows Aider docs at aider.chat for install, LLM setup, and Git integration. Aider is a separate open-source terminal tool, not this site’s meeting product. To walk a diff on a short call, open a room on wbmeet; see how to create and join a room.
What Aider does in the terminal
Aider is a Git-aware terminal pair programmer: you describe tasks in natural language, the model edits project files, and changes can be tracked with Git. The PyPI package is aider-chat; the CLI is usually aider. It supports OpenAI, Anthropic, and other providers via environment variables or a gitignored .env—never commit keys. You need Python 3.8+, git, and a initialized or cloned repository in the directory you start from.
Install Aider with pip
- 1
Python and Git
Check
python3 --version(3.8+) andgit --version. Use a virtualenv (python3 -m venv .venv, then activate) so the install does not touch system Python. - 2
Install aider-chat
Run
python -m pip install -U aider-chat. Verify withaider --version. If the command is missing, activate the venv or checkpip show aider-chatfor the scripts path. - 3
Optional pin
Teams may pin versions in
requirements-dev.txtwithout putting secrets there. Upgrade withpip install -U aider-chatand read release notes.
Configure OpenAI or Anthropic keys
- 1
Create keys in the vendor console
OpenAI: platform.openai.com. Anthropic: console.anthropic.com. Billing and regions follow each vendor. Do not paste live keys into tickets or Git.
- 2
Export environment variables
export OPENAI_API_KEY=…orexport ANTHROPIC_API_KEY=…. Aider also supports a repo-root.envthat must stay gitignored. Pick one provider and pass--modelwith a supported model id. - 3
Pick a model id
Start with a model listed in current Aider docs (e.g. a GPT-4o class or Claude Sonnet id). Wrong names yield 404/401—smoke-test with a read-only question first.
Pair-program in your Git repo
- 1
cd to the repo root
Work inside a directory with
.git. Rungit statusso you know what changed before and after Aider edits. - 2
Launch aider
Run
aideroraider --model MODEL. Scope context withaider path/to/file.pyon large trees. Ask for explanations first, then a small test or fix with “show the diff first.” - 3
Review diff before commit
Read
git diffline by line. Auto-commit behavior depends on flags and version; hour one: commit manually with your own message sogit revertstays easy.
# First hour · Aider · 2026-09
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -U aider-chat
export ANTHROPIC_API_KEY=...
cd /path/to/your/git/repo
aider --model sonnet
# task: one unit test; review git diff before commitComparison and pitfalls
| Step | Good for | First-hour note |
|---|---|---|
| pip aider-chat | Local / CI venv | Activate venv first |
| OPENAI / ANTHROPIC | Cloud models | Keys in env or .env only |
| Git repo | Tracked edits | status before edits |
| File-scoped start | Monorepos | Narrow context |
| git diff | Review | Manual commit first hour |
aider: command not found
Venv not active or scripts dir not on PATH.
401 / bad model
Check key, billing, and --model against vendor docs.
Too many files changed
Add fewer files; split tasks; insist on diff-first.
Official path:
pip install aider-chat→ set OPENAI/ANTHROPIC keys →aiderin a Git repo → reviewgit diff. Trust aider.chat for details.
- Vs Claude Code / Copilot CLI
- Different install and auth paths. See our Claude Code and Copilot CLI notes.
- OpenAI required?
- No—Anthropic and other supported providers work; see Aider’s LLM list.
- Not a meeting-product guide
- Only Aider’s first hour. Short call: wbmeet.
확인할 질문
Can I use Aider without an API key?
You need a callable LLM (or a supported local/OpenRouter setup per docs). Plan keys before expecting code edits.
Can I commit .env to Git?
No. Keep API keys in gitignored .env or the shell environment only.
Does Aider auto-push?
Depends on options and version; hour one: local commits only, push yourself after review.
Must the first task touch production?
No. Explain one file, then one reversible change such as a unit test.