promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Aider

CLI Options (Flags)

Collects the most important Aider CLI flags, grouped by model, automation, context, and other settings.

Aider's CLI flags can be combined at startup (e.g. aider --model ... --test-cmd ... --yes-always) or set via a config file/environment variables. The most important ones, grouped: Model: --model MODEL (main model, env AIDER_MODEL); --weak-model WEAK_MODEL (for commit messages/history summarization); --editor-model EDITOR_MODEL (writes the file edits in architect mode); --architect (activates architect mode directly); --reasoning-effort VALUE and --thinking-tokens VALUE (control reasoning depth/budget) Automation/Scripting: --message/-m/--msg (send a single message, process the reply, then exit - for scripts/CI); --message-file/-f (read the message from a file); --yes-always (auto-confirms every prompt without asking); --no-auto-commits (disables automatic committing of LLM changes, default is on); --test-cmd (define a test command) together with --auto-test or a one-off --test; --lint-cmd (lint commands per language) together with --auto-lint or a one-off --lint; --watch-files (watches files for special AI comments that trigger Aider) Context: --read FILE (add a file read-only, usable multiple times) or --file FILE (add it editable); --map-tokens VALUE (repository map size, 0 disables it); --map-refresh VALUE (auto/always/files/manual) Install/Other: --upgrade/--update (update Aider itself); --just-check-update (only check whether an update is available); --config/-c (custom config file); --env-file (custom .env file for API keys); --version; --help/-h

โœ… WHEN TO USE IT?

Use -m in scripts/CI pipelines for non-interactive single runs

aider --message 'Fix the failing test in test_auth.py' --yes-always --test-cmd 'pytest -q' in a CI job

Scope automation deliberately instead of allowing everything

aider --test-cmd 'pytest -q' --auto-test --no-auto-commits โ€” tests run automatically, but commits only after manual review

โ›” WHEN NOT TO?

Setting --yes-always by default on every interactive run without reviewing the suggestions

This also auto-confirms risky or unwanted changes without anyone seeing them first.

Better: Only use --yes-always in controlled script/CI contexts with --message; confirm suggestions manually when interactive

Letting API keys end up as plaintext flags in shell history

--openai-api-key/--anthropic-api-key as a command-line argument often stays visible in shell history and process lists.

Better: Set keys via --env-file/.env or environment variables like AIDER_ANTHROPIC_API_KEY instead

SOURCES