Aider Python Module

Aider exposes a Python module entrypoint (`python -m aider`) and an importable package (`aider.main.main`) so Aider can be embedded in Python scripts, CI workflows, and other agents. The same flags and configuration that drive the CLI apply to module invocation. There is no documented stable Python SDK contract beyond `main()` — the internal `Coder`, `Model`, `IO`, and `Commands` classes are public but versioned with the CLI and may change between releases.

API entry from apis.yml

apis.yml Raw ↑
aid: aider:python-module
name: Aider Python Module
description: Aider exposes a Python module entrypoint (`python -m aider`) and an importable package (`aider.main.main`)
  so Aider can be embedded in Python scripts, CI workflows, and other agents. The same flags and configuration
  that drive the CLI apply to module invocation. There is no documented stable Python SDK contract beyond
  `main()` — the internal `Coder`, `Model`, `IO`, and `Commands` classes are public but versioned with
  the CLI and may change between releases.
image: https://kinlane-productions.s3.amazonaws.com/apis-json/apis-json-logo.jpg
humanURL: https://github.com/Aider-AI/aider/blob/main/aider/main.py
baseURL: https://github.com/Aider-AI/aider
tags:
- Python
- Library
- Embedding
- Open Source
properties:
- type: SourceCode
  url: https://github.com/Aider-AI/aider/blob/main/aider/main.py
- type: PyPI
  url: https://pypi.org/project/aider-chat/
- type: Documentation
  url: https://aider.chat/docs/scripting.html
- type: Scripting
  url: https://aider.chat/docs/scripting.html