Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eugene1g/agent-safehouse/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Aider is a Python-based AI coding assistant (aider-chat package) that runs as a terminal CLI with an optional Streamlit web GUI. It provides file editing, shell command execution, web scraping, and git integration through a prompt_toolkit/rich-based REPL.
Installation:
Binary path:
Config:
Version: 0.86.3.dev (Apache-2.0 license, open source)
pipx install aider-chatBinary path:
~/.local/bin/aiderConfig:
~/.aider/, <git_root>/.aider.conf.ymlVersion: 0.86.3.dev (Apache-2.0 license, open source)
Sandbox Profile
The Aider profile (profiles/60-agents/aider.sb) grants access to:
Key Paths
| Path | Purpose |
|---|---|
~/.local/bin/aider | pipx-installed binary |
~/.aider/ | Main config/data directory |
~/.aider/analytics.json | Analytics UUID + opt-in state |
~/.aider/oauth-keys.env | OAuth-obtained API keys (OpenRouter) |
~/.aider/caches/ | Model pricing, version check, help index |
<git_root>/.aider.input.history | Readline history (prompt_toolkit) |
<git_root>/.aider.chat.history.md | Markdown chat log |
<git_root>/.aider.tags.cache.v4/ | SQLite-based repo map cache (diskcache) |
Running Aider in Safehouse
Basic Usage
Shell Function Wrapper
Add to~/.zshrc:
Authentication
Aider stores credentials in plain files (no keychain):| Method | Location | Format |
|---|---|---|
| OAuth keys | ~/.aider/oauth-keys.env | Dotenv (KEY="value") |
| .env files | ~/.env, <git_root>/.env, ./.env | Dotenv |
| YAML config | .aider.conf.yml (CWD, git root, ~) | YAML |
| Environment | *_API_KEY env vars | Various |
OAuth Flows
OpenRouter OAuth (browser + localhost callback):- Binds HTTP server on
localhost:8484-8584 - Opens browser to
https://openrouter.ai/auth - Saves key to
~/.aider/oauth-keys.env
- Exchanges
GITHUB_COPILOT_TOKENfor ephemeral OpenAI key - Endpoint:
https://api.github.com/copilot_internal/v2/token
Sandbox Considerations
Aider’s OAuth flow requires:--append-profile with a custom policy allowing network-bind.
Capabilities
LLM Tools
Aider provides these capabilities to the LLM:- File editing — Whole file replacement, diff-based edits, search/replace blocks
- Shell commands — Via
/runand/test(user-invoked, LLM suggests) - Git operations — Auto-commits via GitPython
- Web scraping —
/webcommand fetches URLs, optionally uses Playwright - Linting —
/lintruns flake8 or configured linters - Voice input —
/voicerecords audio and transcribes via OpenAI Whisper API
Subprocess Execution
Aider spawns subprocesses for:| Tool | Purpose |
|---|---|
git | Version control operations |
| Shell commands | User-invoked via /run and /test |
pip | Runtime installation of optional dependencies |
flake8 | Python linting |
| System editor | Opens vim/vi/notepad for /editor command |
pexpect | Interactive command execution (non-Windows) |
| Notification commands | terminal-notifier, osascript, notify-send |
playwright | Optional browser automation |
Network Access
Required Endpoints
| Endpoint | Purpose |
|---|---|
| LLM API endpoints (via litellm) | Chat completions (100+ providers) |
https://pypi.org/pypi/aider-chat/json | Version check (1x/day) |
https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json | Model pricing |
https://openrouter.ai/api/v1/* | OpenRouter OAuth and API |
https://api.github.com/copilot_internal/v2/token | GitHub Copilot token exchange |
https://us.i.posthog.com | Analytics (PostHog) |
| Arbitrary URLs | Web scraping via /web command |
Disabling Analytics
Special Integrations
Streamlit Web GUI
Aider’s--gui mode launches a Streamlit web server:
localhost:8501 (default). The sandbox blocks this by default. For web GUI:
Playwright (Web Scraping)
The/web command can use Playwright for JavaScript-rendered pages:
~/.cache/ms-playwright/. The sandbox profile does not grant this by default. Add:
Configuration Files
Search Order (Highest Priority First)
--env-file(CLI arg)./.env(current directory)<git_root>/.env~/.env~/.aider/oauth-keys.env
Config File Search
.aider.conf.ymlin CWD.aider.conf.ymlin git root~/.aider.conf.yml
Project Files
| File | Purpose |
|---|---|
<git_root>/.aiderignore | gitignore-style exclusion patterns |
<git_root>/.aider.tags.cache.v4/ | diskcache SQLite database for repo map |
Security Considerations
Attack Surface
- Shell command execution —
/runand/testcommands execute withshell=True - Runtime pip installs — Can download and run arbitrary Python code
- Clipboard polling — When
--copy-pasteenabled, polls every 0.5 seconds - Git operations — Can modify
.gitignore, git config, commit history - File access — Unrestricted read/write (advisory
.aiderignore) - Network access — Makes requests to 10+ endpoints, arbitrary URLs via
/web - Analytics — PostHog enabled by default
Recommended Safehouse Policy
Troubleshooting
”Cannot write to ~/.aider/analytics.json”
The sandbox blocks writes outside the workspace. Disable analytics:“OAuth callback server failed to bind”
The sandbox blocks port binding. Use API keys instead of OAuth:“Git operations fail”
Git requires workspace write access:Links
- Repository: github.com/Aider-AI/aider
- Documentation: aider.chat/docs
- PyPI: pypi.org/project/aider-chat