aider-ce 0.88.20__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. aider/__init__.py +20 -0
  2. aider/__main__.py +4 -0
  3. aider/_version.py +34 -0
  4. aider/analytics.py +258 -0
  5. aider/args.py +1056 -0
  6. aider/args_formatter.py +228 -0
  7. aider/change_tracker.py +133 -0
  8. aider/coders/__init__.py +36 -0
  9. aider/coders/agent_coder.py +2166 -0
  10. aider/coders/agent_prompts.py +104 -0
  11. aider/coders/architect_coder.py +48 -0
  12. aider/coders/architect_prompts.py +40 -0
  13. aider/coders/ask_coder.py +9 -0
  14. aider/coders/ask_prompts.py +35 -0
  15. aider/coders/base_coder.py +3613 -0
  16. aider/coders/base_prompts.py +87 -0
  17. aider/coders/chat_chunks.py +64 -0
  18. aider/coders/context_coder.py +53 -0
  19. aider/coders/context_prompts.py +75 -0
  20. aider/coders/editblock_coder.py +657 -0
  21. aider/coders/editblock_fenced_coder.py +10 -0
  22. aider/coders/editblock_fenced_prompts.py +143 -0
  23. aider/coders/editblock_func_coder.py +141 -0
  24. aider/coders/editblock_func_prompts.py +27 -0
  25. aider/coders/editblock_prompts.py +175 -0
  26. aider/coders/editor_diff_fenced_coder.py +9 -0
  27. aider/coders/editor_diff_fenced_prompts.py +11 -0
  28. aider/coders/editor_editblock_coder.py +9 -0
  29. aider/coders/editor_editblock_prompts.py +21 -0
  30. aider/coders/editor_whole_coder.py +9 -0
  31. aider/coders/editor_whole_prompts.py +12 -0
  32. aider/coders/help_coder.py +16 -0
  33. aider/coders/help_prompts.py +46 -0
  34. aider/coders/patch_coder.py +706 -0
  35. aider/coders/patch_prompts.py +159 -0
  36. aider/coders/search_replace.py +757 -0
  37. aider/coders/shell.py +37 -0
  38. aider/coders/single_wholefile_func_coder.py +102 -0
  39. aider/coders/single_wholefile_func_prompts.py +27 -0
  40. aider/coders/udiff_coder.py +429 -0
  41. aider/coders/udiff_prompts.py +115 -0
  42. aider/coders/udiff_simple.py +14 -0
  43. aider/coders/udiff_simple_prompts.py +25 -0
  44. aider/coders/wholefile_coder.py +144 -0
  45. aider/coders/wholefile_func_coder.py +134 -0
  46. aider/coders/wholefile_func_prompts.py +27 -0
  47. aider/coders/wholefile_prompts.py +65 -0
  48. aider/commands.py +2173 -0
  49. aider/copypaste.py +72 -0
  50. aider/deprecated.py +126 -0
  51. aider/diffs.py +128 -0
  52. aider/dump.py +29 -0
  53. aider/editor.py +147 -0
  54. aider/exceptions.py +115 -0
  55. aider/format_settings.py +26 -0
  56. aider/gui.py +545 -0
  57. aider/help.py +163 -0
  58. aider/help_pats.py +19 -0
  59. aider/helpers/__init__.py +9 -0
  60. aider/helpers/similarity.py +98 -0
  61. aider/history.py +180 -0
  62. aider/io.py +1608 -0
  63. aider/linter.py +304 -0
  64. aider/llm.py +55 -0
  65. aider/main.py +1415 -0
  66. aider/mcp/__init__.py +174 -0
  67. aider/mcp/server.py +149 -0
  68. aider/mdstream.py +243 -0
  69. aider/models.py +1313 -0
  70. aider/onboarding.py +429 -0
  71. aider/openrouter.py +129 -0
  72. aider/prompts.py +56 -0
  73. aider/queries/tree-sitter-language-pack/README.md +7 -0
  74. aider/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
  75. aider/queries/tree-sitter-language-pack/c-tags.scm +9 -0
  76. aider/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
  77. aider/queries/tree-sitter-language-pack/clojure-tags.scm +7 -0
  78. aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
  79. aider/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
  80. aider/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
  81. aider/queries/tree-sitter-language-pack/d-tags.scm +26 -0
  82. aider/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
  83. aider/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
  84. aider/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
  85. aider/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
  86. aider/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
  87. aider/queries/tree-sitter-language-pack/go-tags.scm +42 -0
  88. aider/queries/tree-sitter-language-pack/java-tags.scm +20 -0
  89. aider/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
  90. aider/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
  91. aider/queries/tree-sitter-language-pack/matlab-tags.scm +10 -0
  92. aider/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
  93. aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
  94. aider/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
  95. aider/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
  96. aider/queries/tree-sitter-language-pack/python-tags.scm +14 -0
  97. aider/queries/tree-sitter-language-pack/r-tags.scm +21 -0
  98. aider/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
  99. aider/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
  100. aider/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
  101. aider/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
  102. aider/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
  103. aider/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
  104. aider/queries/tree-sitter-languages/README.md +24 -0
  105. aider/queries/tree-sitter-languages/c-tags.scm +9 -0
  106. aider/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
  107. aider/queries/tree-sitter-languages/cpp-tags.scm +15 -0
  108. aider/queries/tree-sitter-languages/dart-tags.scm +91 -0
  109. aider/queries/tree-sitter-languages/elisp-tags.scm +8 -0
  110. aider/queries/tree-sitter-languages/elixir-tags.scm +54 -0
  111. aider/queries/tree-sitter-languages/elm-tags.scm +19 -0
  112. aider/queries/tree-sitter-languages/fortran-tags.scm +15 -0
  113. aider/queries/tree-sitter-languages/go-tags.scm +30 -0
  114. aider/queries/tree-sitter-languages/haskell-tags.scm +3 -0
  115. aider/queries/tree-sitter-languages/hcl-tags.scm +77 -0
  116. aider/queries/tree-sitter-languages/java-tags.scm +20 -0
  117. aider/queries/tree-sitter-languages/javascript-tags.scm +88 -0
  118. aider/queries/tree-sitter-languages/julia-tags.scm +60 -0
  119. aider/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
  120. aider/queries/tree-sitter-languages/matlab-tags.scm +10 -0
  121. aider/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
  122. aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
  123. aider/queries/tree-sitter-languages/php-tags.scm +26 -0
  124. aider/queries/tree-sitter-languages/python-tags.scm +12 -0
  125. aider/queries/tree-sitter-languages/ql-tags.scm +26 -0
  126. aider/queries/tree-sitter-languages/ruby-tags.scm +64 -0
  127. aider/queries/tree-sitter-languages/rust-tags.scm +60 -0
  128. aider/queries/tree-sitter-languages/scala-tags.scm +65 -0
  129. aider/queries/tree-sitter-languages/typescript-tags.scm +41 -0
  130. aider/queries/tree-sitter-languages/zig-tags.scm +3 -0
  131. aider/reasoning_tags.py +82 -0
  132. aider/repo.py +621 -0
  133. aider/repomap.py +1174 -0
  134. aider/report.py +260 -0
  135. aider/resources/__init__.py +3 -0
  136. aider/resources/model-metadata.json +776 -0
  137. aider/resources/model-settings.yml +2068 -0
  138. aider/run_cmd.py +133 -0
  139. aider/scrape.py +293 -0
  140. aider/sendchat.py +242 -0
  141. aider/sessions.py +256 -0
  142. aider/special.py +203 -0
  143. aider/tools/__init__.py +72 -0
  144. aider/tools/command.py +105 -0
  145. aider/tools/command_interactive.py +122 -0
  146. aider/tools/delete_block.py +182 -0
  147. aider/tools/delete_line.py +155 -0
  148. aider/tools/delete_lines.py +184 -0
  149. aider/tools/extract_lines.py +341 -0
  150. aider/tools/finished.py +48 -0
  151. aider/tools/git_branch.py +129 -0
  152. aider/tools/git_diff.py +60 -0
  153. aider/tools/git_log.py +57 -0
  154. aider/tools/git_remote.py +53 -0
  155. aider/tools/git_show.py +51 -0
  156. aider/tools/git_status.py +46 -0
  157. aider/tools/grep.py +256 -0
  158. aider/tools/indent_lines.py +221 -0
  159. aider/tools/insert_block.py +288 -0
  160. aider/tools/list_changes.py +86 -0
  161. aider/tools/ls.py +93 -0
  162. aider/tools/make_editable.py +85 -0
  163. aider/tools/make_readonly.py +69 -0
  164. aider/tools/remove.py +91 -0
  165. aider/tools/replace_all.py +126 -0
  166. aider/tools/replace_line.py +173 -0
  167. aider/tools/replace_lines.py +217 -0
  168. aider/tools/replace_text.py +187 -0
  169. aider/tools/show_numbered_context.py +147 -0
  170. aider/tools/tool_utils.py +313 -0
  171. aider/tools/undo_change.py +95 -0
  172. aider/tools/update_todo_list.py +156 -0
  173. aider/tools/view.py +57 -0
  174. aider/tools/view_files_matching.py +141 -0
  175. aider/tools/view_files_with_symbol.py +129 -0
  176. aider/urls.py +17 -0
  177. aider/utils.py +456 -0
  178. aider/versioncheck.py +113 -0
  179. aider/voice.py +205 -0
  180. aider/waiting.py +38 -0
  181. aider/watch.py +318 -0
  182. aider/watch_prompts.py +12 -0
  183. aider/website/Gemfile +8 -0
  184. aider/website/_includes/blame.md +162 -0
  185. aider/website/_includes/get-started.md +22 -0
  186. aider/website/_includes/help-tip.md +5 -0
  187. aider/website/_includes/help.md +24 -0
  188. aider/website/_includes/install.md +5 -0
  189. aider/website/_includes/keys.md +4 -0
  190. aider/website/_includes/model-warnings.md +67 -0
  191. aider/website/_includes/multi-line.md +22 -0
  192. aider/website/_includes/python-m-aider.md +5 -0
  193. aider/website/_includes/recording.css +228 -0
  194. aider/website/_includes/recording.md +34 -0
  195. aider/website/_includes/replit-pipx.md +9 -0
  196. aider/website/_includes/works-best.md +1 -0
  197. aider/website/_sass/custom/custom.scss +103 -0
  198. aider/website/docs/config/adv-model-settings.md +2261 -0
  199. aider/website/docs/config/agent-mode.md +194 -0
  200. aider/website/docs/config/aider_conf.md +548 -0
  201. aider/website/docs/config/api-keys.md +90 -0
  202. aider/website/docs/config/dotenv.md +493 -0
  203. aider/website/docs/config/editor.md +127 -0
  204. aider/website/docs/config/mcp.md +95 -0
  205. aider/website/docs/config/model-aliases.md +104 -0
  206. aider/website/docs/config/options.md +890 -0
  207. aider/website/docs/config/reasoning.md +210 -0
  208. aider/website/docs/config.md +44 -0
  209. aider/website/docs/faq.md +384 -0
  210. aider/website/docs/git.md +76 -0
  211. aider/website/docs/index.md +47 -0
  212. aider/website/docs/install/codespaces.md +39 -0
  213. aider/website/docs/install/docker.md +57 -0
  214. aider/website/docs/install/optional.md +100 -0
  215. aider/website/docs/install/replit.md +8 -0
  216. aider/website/docs/install.md +115 -0
  217. aider/website/docs/languages.md +264 -0
  218. aider/website/docs/legal/contributor-agreement.md +111 -0
  219. aider/website/docs/legal/privacy.md +104 -0
  220. aider/website/docs/llms/anthropic.md +77 -0
  221. aider/website/docs/llms/azure.md +48 -0
  222. aider/website/docs/llms/bedrock.md +132 -0
  223. aider/website/docs/llms/cohere.md +34 -0
  224. aider/website/docs/llms/deepseek.md +32 -0
  225. aider/website/docs/llms/gemini.md +49 -0
  226. aider/website/docs/llms/github.md +111 -0
  227. aider/website/docs/llms/groq.md +36 -0
  228. aider/website/docs/llms/lm-studio.md +39 -0
  229. aider/website/docs/llms/ollama.md +75 -0
  230. aider/website/docs/llms/openai-compat.md +39 -0
  231. aider/website/docs/llms/openai.md +58 -0
  232. aider/website/docs/llms/openrouter.md +78 -0
  233. aider/website/docs/llms/other.md +117 -0
  234. aider/website/docs/llms/vertex.md +50 -0
  235. aider/website/docs/llms/warnings.md +10 -0
  236. aider/website/docs/llms/xai.md +53 -0
  237. aider/website/docs/llms.md +54 -0
  238. aider/website/docs/more/analytics.md +127 -0
  239. aider/website/docs/more/edit-formats.md +116 -0
  240. aider/website/docs/more/infinite-output.md +165 -0
  241. aider/website/docs/more-info.md +8 -0
  242. aider/website/docs/recordings/auto-accept-architect.md +31 -0
  243. aider/website/docs/recordings/dont-drop-original-read-files.md +35 -0
  244. aider/website/docs/recordings/index.md +21 -0
  245. aider/website/docs/recordings/model-accepts-settings.md +69 -0
  246. aider/website/docs/recordings/tree-sitter-language-pack.md +80 -0
  247. aider/website/docs/repomap.md +112 -0
  248. aider/website/docs/scripting.md +100 -0
  249. aider/website/docs/sessions.md +203 -0
  250. aider/website/docs/troubleshooting/aider-not-found.md +24 -0
  251. aider/website/docs/troubleshooting/edit-errors.md +76 -0
  252. aider/website/docs/troubleshooting/imports.md +62 -0
  253. aider/website/docs/troubleshooting/models-and-keys.md +54 -0
  254. aider/website/docs/troubleshooting/support.md +79 -0
  255. aider/website/docs/troubleshooting/token-limits.md +96 -0
  256. aider/website/docs/troubleshooting/warnings.md +12 -0
  257. aider/website/docs/troubleshooting.md +11 -0
  258. aider/website/docs/usage/browser.md +57 -0
  259. aider/website/docs/usage/caching.md +49 -0
  260. aider/website/docs/usage/commands.md +133 -0
  261. aider/website/docs/usage/conventions.md +119 -0
  262. aider/website/docs/usage/copypaste.md +121 -0
  263. aider/website/docs/usage/images-urls.md +48 -0
  264. aider/website/docs/usage/lint-test.md +118 -0
  265. aider/website/docs/usage/modes.md +211 -0
  266. aider/website/docs/usage/not-code.md +179 -0
  267. aider/website/docs/usage/notifications.md +87 -0
  268. aider/website/docs/usage/tips.md +79 -0
  269. aider/website/docs/usage/tutorials.md +30 -0
  270. aider/website/docs/usage/voice.md +121 -0
  271. aider/website/docs/usage/watch.md +294 -0
  272. aider/website/docs/usage.md +102 -0
  273. aider/website/share/index.md +101 -0
  274. aider_ce-0.88.20.dist-info/METADATA +187 -0
  275. aider_ce-0.88.20.dist-info/RECORD +279 -0
  276. aider_ce-0.88.20.dist-info/WHEEL +5 -0
  277. aider_ce-0.88.20.dist-info/entry_points.txt +2 -0
  278. aider_ce-0.88.20.dist-info/licenses/LICENSE.txt +202 -0
  279. aider_ce-0.88.20.dist-info/top_level.txt +1 -0
@@ -0,0 +1,31 @@
1
+ ---
2
+ parent: Screen recordings
3
+ nav_order: 1
4
+ layout: minimal
5
+ highlight_image: /assets/recordings.jpg
6
+ description: See how a new command-line option is added to automatically accept edits proposed by the architect model, with implementation. Aider also updates the project's HISTORY file.
7
+ ---
8
+
9
+ # Add --auto-accept-architect feature
10
+
11
+ <script>
12
+ const recording_id = "auto-accept-architect";
13
+ const recording_url = "https://gist.githubusercontent.com/paul-gauthier/e7383fbc29c9bb343ee6fb7ee5d77e15/raw/c2194334085304bb1c6bb80814d791704d9719b6/707774.cast";
14
+ </script>
15
+
16
+ {% include recording.md %}
17
+
18
+ ## Commentary
19
+
20
+ - 0:01 We're going to add a new feature to automatically accept edits proposed by the architect model.
21
+ - 0:11 First, let's add the new switch.
22
+ - 0:40 Aider figured out that it should be passed to the Coder class.
23
+ - 0:48 Now we need to implement the functionality.
24
+ - 1:00 Let's do some manual testing.
25
+ - 1:28 That worked. Let's make sure we can turn it off too.
26
+ - 1:42 That worked too. Let's have aider update the HISTORY file to document the new feature.
27
+ - 2:00 Let's quickly tidy up the changes to HISTORY.
28
+ - 2:05 All done!
29
+
30
+
31
+
@@ -0,0 +1,35 @@
1
+ ---
2
+ parent: Screen recordings
3
+ nav_order: 1
4
+ layout: minimal
5
+ highlight_image: /assets/recordings.jpg
6
+ description: Follow along as aider is modified to preserve read-only files specified at launch when using the /drop command. Aider does this implementation and adds test coverage.
7
+ ---
8
+
9
+ # Don't /drop read-only files added at launch
10
+
11
+ <script>
12
+ const recording_id = "dont-drop-original-read-files";
13
+ const recording_url = "https://gist.githubusercontent.com/paul-gauthier/c2e7b2751925fb7bb47036cdd37ec40d/raw/08e62ab539e2b5d4b52c15c31d9a0d241377c17c/707583.cast";
14
+ </script>
15
+
16
+ {% include recording.md %}
17
+
18
+ ## Commentary
19
+
20
+ - 0:01 We're going to update the /drop command to keep any read only files that were originally specified at launch.
21
+ - 0:10 We've added files that handle the main CLI and in-chat slash commands like /drop.
22
+ - 0:20 Let's explain the needed change to aider.
23
+ - 1:20 Ok, let's look at the code.
24
+ - 1:30 I'd prefer not to use "hasattr()", let's ask for improvements.
25
+ - 1:45 Let's try some manual testing.
26
+ - 2:10 Looks good. Let's check the existing test suite to ensure we didn't break anything.
27
+ - 2:19 Let's ask aider to add tests for this.
28
+ - 2:50 Tests look reasonable, we're done!
29
+
30
+
31
+
32
+
33
+
34
+
35
+
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Screen recordings
3
+ has_children: true
4
+ nav_order: 75
5
+ has_toc: false
6
+ description: Screen recordings of aider building aider.
7
+ highlight_image: /assets/recordings.jpg
8
+ ---
9
+
10
+ # Screen recordings
11
+
12
+ Below are a series of screen recordings of the aider developer using aider
13
+ to enhance aider.
14
+ They contain commentary that describes how aider is being used,
15
+ and might provide some inspiration for your own use of aider.
16
+
17
+ {% assign sorted_pages = site.pages | where: "parent", "Screen recordings" | sort: "nav_order" %}
18
+ {% for page in sorted_pages %}
19
+ - [{{ page.title }}]({{ page.url | relative_url }}) - {{ page.description }}
20
+ {% endfor %}
21
+
@@ -0,0 +1,69 @@
1
+ ---
2
+ parent: Screen recordings
3
+ nav_order: 1
4
+ layout: minimal
5
+ highlight_image: /assets/recordings.jpg
6
+ description: Watch the implementation of a warning system that alerts users when they try to apply reasoning settings to models that don't support them. Includes adding model metadata, confirmation dialogs, refactoring, and comprehensive test coverage.
7
+ ---
8
+
9
+ # Warn when users apply unsupported reasoning settings
10
+
11
+ <script>
12
+ const recording_id = "model-accepts-settings";
13
+ const recording_url = "https://gist.githubusercontent.com/paul-gauthier/66b1b5aa7136147702c98afc4987c0d4/raw/4b5c7ddf7e80db1ff4dfa78fe158bc000fc42e0e/accepts-settings.cast";
14
+ </script>
15
+
16
+ {% include recording.md %}
17
+
18
+ ## Commentary
19
+
20
+ - 0:01 Users sometimes run aider with "reasoning" settings that aren't supported by the model they're using. This can cause LLM API calls to completely fail, with non-specific error messages from the API provider. We're going to warn users up front to prevent this.
21
+ - 0:25 Ok, let's ask aider to add a new model setting where we can note which reasoning settings it supports. And then print a warning if the user tries to apply an unsupported setting.
22
+ - 1:30 Looks like it's including some extra changes we don't want.
23
+ - 1:45 Let's have a look at the models code and clean up some stray lines.
24
+ - 2:00 It also made the warning logic too conservative. We want to warn unless the setting is explicitly known to be supported.
25
+ - 3:00 Ok, good. Now lets add a setting to silence these warnings for power users who are doing something intentional.
26
+ - 3:45 Now we need to update the database of model settings to annotate which models support which reasoning settings. We'll start with the code that handles "fallback" settings for known models on unknown providers.
27
+ - 4:45 Oh, we forgot to give aider the actual file with that code! Aider asks to see it.
28
+ - 5:00 Ok, we've confused aider by asking it to change code it couldn't see.
29
+ - 5:10 Let's clear the chat and refine the prompt and try again.
30
+ - 6:00 Ok, looks good. Let's move on and update the full model settings database YAML file. Each main model like "o1" appears here from many providers, like OpenAI, OpenRouter, etc. We want to update them all.
31
+ - 7:43 Let's interrupt and refine the prompt to be more clear about which models to update.
32
+ - 9:20 Looks good. Let's review the YAML file and eyeball all the relevant models.
33
+ - 10:20 Now let's do some manual testing.
34
+ - 10:41 Ok, it should not be warning us about using "thinking tokens" with Sonnet 3.7.
35
+ - 10:55 Let's see if aider can spot the problem?
36
+ - 11:28 That doesn't sound like a promising solution. Let's add more of the relevant code, clear history and try again.
37
+ - 12:00 Ok, let's try aider's proposed solution.
38
+ - 12:32 And see if it worked... Nope! Still getting the unneeded warning. Undo that change!
39
+ - 12:48 Time for some manual print debugging.
40
+ - 13:00 It seems like the "accept_settings" value is not being set?
41
+ - 14:30 Aha! I have a local model settings file for Sonnet which overrides aider's built in settings. And we did not update it. Let's add "accepts_settings" there.
42
+ - 14:45 That was the problem, it wasn't a bug.
43
+ - 14:59 Ok, let's add test coverage for all this stuff.
44
+ - 15:09 And while aider writes tests, let's use "git diff" to review all the changes we've made.
45
+ - 15:34 Aider is done writing tests, let's try them.
46
+ - 15:44 One passed, one failed. Let's eyeball the passing test first.
47
+ - 16:04 And let's see if aider can fix the failing test.
48
+ - 16:14 Aider needs to see another file, which makes sense.
49
+ - 16:29 It's found the problem, but is trying to "fix" the code. We want it to fix the test.
50
+ - 16:47 Ok, tests are passing.
51
+ - 16:55 We should stop and ask the user "are you sure?", not just flash a warning if they're about to break their API calls.
52
+ - 17:59 Ok, that confirmation dialog looks good.
53
+ - 18:35 This code is a little bit repetitive. Let's do a bit of refactoring.
54
+ - 19:44 Sonnet is messing up the code editing instructions, so aider is retrying.
55
+ - 19:54 Let's clear the chat history and try again.
56
+ - 20:25 Are tests still passing after the refactor?
57
+ - 20:55 Tests passed, good. Let's tweak the warning text.
58
+ - 21:10 And now let's have aider update the docs to explain these changes.
59
+ - 22:32 Let's proofread and edit the updated docs.
60
+ - 24:25 And a "git diff" of all the docs changes to do a final check.
61
+ - 24:56 Let's have aider update the project's HISTORY file.
62
+ - 25:35 We can refine the HISTORY entries a bit.
63
+ - 26:20 All done!
64
+
65
+
66
+
67
+
68
+
69
+
@@ -0,0 +1,80 @@
1
+ ---
2
+ parent: Screen recordings
3
+ nav_order: 0
4
+ layout: minimal
5
+ highlight_image: /assets/recordings.jpg
6
+ description: Watch how aider adds support for tons of new programming languages by integrating with tree-sitter-language-pack. Demonstrates using aider to script downloading a collection of files, and using ad-hoc bash scripts to have aider modify a collection of files.
7
+ ---
8
+
9
+ # Add language support via tree-sitter-language-pack
10
+
11
+ <script>
12
+ const recording_id = "tree-sitter-language-pack";
13
+ const recording_url = "https://gist.githubusercontent.com/paul-gauthier/a990333449b09e2793088a45eb1587f4/raw/364124781cca282907ccdc7567cdfc588a9b438b/tmp.redacted.cast";
14
+ </script>
15
+
16
+ {% include recording.md %}
17
+
18
+
19
+ ## Commentary
20
+
21
+ - 0:01 We're going to add a ton of new languages to aider via tree-sitter-language-pack.
22
+ - 0:10 First, lets try and find which languages it supports.
23
+ - 1:00 Ok, there's a language definitions json file
24
+ - 1:10 Does it have the github repos for each language?
25
+ - 1:29 Ok, this is what we need.
26
+ - 1:45 We need to get all the tags files from each repository for aider's repo-map. Let's have aider write a script to fetch them all.
27
+ - 2:05 We'll show aider the language definitions json file.
28
+ - 3:37 Looks like it can't find most of the tags.scm files.
29
+ - 4:19 Maybe we should have it try other branches besides master?
30
+ - 5:02 Ok, it seems to be downloading them now.
31
+ - 5:55 Let's make it so we can re-run the script and only download files we haven't fetched yet.
32
+ - 6:12 I see lots of tags files, so it's working.
33
+ - 6:30 Ok, restart to run with latest code. This will take awhile to fetch them all.
34
+ - 9:02 The Grep-AST module needs to know about all the new languages.
35
+ - 9:45 Let's have aider add them all, and register each using their commonly used file extensions.
36
+ - 10:15 Some of the languages need to be recognized by their base name, not by their extension.
37
+ - 11:15 Let's sanity check if Grep-AST can handle PowerShell, one of the new languages.
38
+ - 12:00 Looks like it's parsing PowerShell fine.
39
+ - 13:00 Ok, let's download all the tags files into the right spot in the aider repo.
40
+ - 14:00 This will take a minute...
41
+ - 16:07 Delete some no-op or empty tags files.
42
+ - 16:16 Let's commit all the unmodified tags files.
43
+ - 16:33 We need to update each tag file, so that aider can identify names of functions, classes, etc in all these languages.
44
+ - 17:01 Let's use a bash loop to script aider to modify each tags file.
45
+ - 17:12 I'm giving aider a read-only example of an already modified tags file, as an example to follow.
46
+ - 19:04 Looks like it correctly updated the first couple of tags files.
47
+ - 19:28 Let's grep to watch aider's progress working through the list of files.
48
+ - 20:20 It's working on the Dart language now...
49
+ - 20:50 E-lisp is up next...
50
+ - 21:30 This is going to take a little while...
51
+ - 24:39 Let's add a README file with attribution for these tags files.
52
+ - 26:55 Ok, all the files are updated with tags for definitions and references to named code objects.
53
+ - 27:10 Let's add test coverage to be sure these languages work with the repo-map.
54
+ - 27:19 Each language needs a "fixture" with some sample code to parse during the test. Let's show aider the layout of the fixtures directory.
55
+ - 27:50 We can use a bash loop to ask aider to add test coverage for each new tags file.
56
+ - 28:12 We'll pass the fixtures directory listing to aider.
57
+ - 28:52 Just need to fix the bash to correctly iterate through the list of tags files.
58
+ - 29:27 I forgot to ask aider to actually generate a sample code fixture for each language.
59
+ - 30:25 Lets run the repo-map tests to see if the first new test works.
60
+ - 30:37 Tests for the Arduino language failed, with an empty repo-map? That's not good.
61
+ - 31:52 Can aider figure out what's wrong?
62
+ - 32:27 Well, aider made the test pass by basically skipping Arduino.
63
+ - 32:36 Let me see if I can use Grep-AST on the new Arduino fixture code.
64
+ - 32:42 Oh! I'm not using the updated Grep-AST that knows about all the new languages.
65
+ - 32:54 Ok, now we're parsing Arduino code properly. Undo aider's bogus test fix.
66
+ - 33:05 Ok, arduino passes now but there seems to be a regression with tsx?
67
+ - 33:20 Can aider figure out why?
68
+ - 34:10 Let's check the parsers map.
69
+ - 35:00 Well, that's all for this recording. The tsx problem was due to a bad mapping from ".tsx" to "typescript" in the map that aider generated earlier.
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
@@ -0,0 +1,112 @@
1
+ ---
2
+ parent: More info
3
+ highlight_image: /assets/robot-ast.png
4
+ nav_order: 300
5
+ description: Aider uses a map of your git repository to provide code context to LLMs.
6
+ ---
7
+
8
+ # Repository map
9
+
10
+ ![robot flowchat](/assets/robot-ast.png)
11
+
12
+ Aider
13
+ uses a **concise map of your whole git repository**
14
+ that includes
15
+ the most important classes and functions along with their types and call signatures.
16
+ This helps aider understand the code it's editing
17
+ and how it relates to the other parts of the codebase.
18
+ The repo map also helps aider write new code
19
+ that respects and utilizes existing libraries, modules and abstractions
20
+ found elsewhere in the codebase.
21
+
22
+ ## Using a repo map to provide context
23
+
24
+ Aider sends a **repo map** to the LLM along with
25
+ each change request from the user.
26
+ The repo map contains a list of the files in the
27
+ repo, along with the key symbols which are defined in each file.
28
+ It shows how each of these symbols are defined, by including the critical lines of code for each definition.
29
+
30
+ Here's a part of
31
+ the repo map of aider's repo, for
32
+ [base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)
33
+ and
34
+ [commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)
35
+ :
36
+
37
+ ```
38
+ aider/coders/base_coder.py:
39
+ ⋮...
40
+ │class Coder:
41
+ │ abs_fnames = None
42
+ ⋮...
43
+ │ @classmethod
44
+ │ def create(
45
+ │ self,
46
+ │ main_model,
47
+ │ edit_format,
48
+ │ io,
49
+ │ skip_model_availabily_check=False,
50
+ │ **kwargs,
51
+ ⋮...
52
+ │ def abs_root_path(self, path):
53
+ ⋮...
54
+ │ def run(self, with_message=None):
55
+ ⋮...
56
+
57
+ aider/commands.py:
58
+ ⋮...
59
+ │class Commands:
60
+ │ voice = None
61
+
62
+ ⋮...
63
+ │ def get_commands(self):
64
+ ⋮...
65
+ │ def get_command_completions(self, cmd_name, partial):
66
+ ⋮...
67
+ │ def run(self, inp):
68
+ ⋮...
69
+ ```
70
+
71
+ Mapping out the repo like this provides some key benefits:
72
+
73
+ - The LLM can see classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module just based on the details shown in the map.
74
+ - If it needs to see more code, the LLM can use the map to figure out which files it needs to look at. The LLM can ask to see these specific files, and aider will offer to add them to the chat context.
75
+
76
+ ## Optimizing the map
77
+
78
+ Of course, for large repositories even just the repo map might be too large
79
+ for the LLM's context window.
80
+ Aider solves this problem by sending just the **most relevant**
81
+ portions of the repo map.
82
+ It does this by analyzing the full repo map using
83
+ a graph ranking algorithm, computed on a graph
84
+ where each source file is a node and edges connect
85
+ files which have dependencies.
86
+ Aider optimizes the repo map by
87
+ selecting the most important parts of the codebase
88
+ which will
89
+ fit into the active token budget.
90
+ The optimization identifies and maps the portions of the code base
91
+ which are most relevant to the current state of the chat.
92
+
93
+ The token budget is
94
+ influenced by the `--map-tokens` switch, which defaults to 1k tokens.
95
+ Aider adjusts the size of the repo map dynamically based on the state of the chat. It will usually stay within that setting's value. But it does expand the repo map
96
+ significantly at times, especially when no files have been added to the chat and aider needs to understand the entire repo as best as possible.
97
+
98
+
99
+ The sample map shown above doesn't contain *every* class, method and function from those
100
+ files.
101
+ It only includes the most important identifiers,
102
+ the ones which are most often referenced by other portions of the code.
103
+ These are the key pieces of context that the LLM needs to know to understand
104
+ the overall codebase.
105
+
106
+
107
+ ## More info
108
+
109
+ Please check the
110
+ [repo map article on aider's blog](https://aider.chat/2023/10/22/repomap.html)
111
+ for more information on aider's repository map
112
+ and how it is constructed.
@@ -0,0 +1,100 @@
1
+ ---
2
+ parent: More info
3
+ nav_order: 400
4
+ description: You can script aider via the command line or python.
5
+ ---
6
+
7
+ # Scripting aider
8
+
9
+ You can script aider via the command line or python.
10
+
11
+ ## Command line
12
+
13
+ Aider takes a `--message` argument, where you can give it a natural language instruction.
14
+ It will do that one thing, apply the edits to the files and then exit.
15
+ So you could do:
16
+
17
+ ```bash
18
+ aider --message "make a script that prints hello" hello.js
19
+ ```
20
+
21
+ Or you can write simple shell scripts to apply the same instruction to many files:
22
+
23
+ ```bash
24
+ for FILE in *.py ; do
25
+ aider --message "add descriptive docstrings to all the functions" $FILE
26
+ done
27
+ ```
28
+
29
+ Use `aider --help` to see all the
30
+ [command line options](/docs/config/options.html),
31
+ but these are useful for scripting:
32
+
33
+ ```
34
+ --stream, --no-stream
35
+ Enable/disable streaming responses (default: True) [env var:
36
+ AIDER_STREAM]
37
+ --message COMMAND, --msg COMMAND, -m COMMAND
38
+ Specify a single message to send GPT, process reply then exit
39
+ (disables chat mode) [env var: AIDER_MESSAGE]
40
+ --message-file MESSAGE_FILE, -f MESSAGE_FILE
41
+ Specify a file containing the message to send GPT, process reply,
42
+ then exit (disables chat mode) [env var: AIDER_MESSAGE_FILE]
43
+ --yes Always say yes to every confirmation [env var: AIDER_YES]
44
+ --auto-commits, --no-auto-commits
45
+ Enable/disable auto commit of GPT changes (default: True) [env var:
46
+ AIDER_AUTO_COMMITS]
47
+ --dirty-commits, --no-dirty-commits
48
+ Enable/disable commits when repo is found dirty (default: True) [env
49
+ var: AIDER_DIRTY_COMMITS]
50
+ --dry-run, --no-dry-run
51
+ Perform a dry run without modifying files (default: False) [env var:
52
+ AIDER_DRY_RUN]
53
+ --commit Commit all pending changes with a suitable commit message, then exit
54
+ [env var: AIDER_COMMIT]
55
+ ```
56
+
57
+
58
+ ## Python
59
+
60
+ You can also script aider from python:
61
+
62
+ ```python
63
+ from aider.coders import Coder
64
+ from aider.models import Model
65
+
66
+ # This is a list of files to add to the chat
67
+ fnames = ["greeting.py"]
68
+
69
+ model = Model("gpt-4-turbo")
70
+
71
+ # Create a coder object
72
+ coder = Coder.create(main_model=model, fnames=fnames)
73
+
74
+ # This will execute one instruction on those files and then return
75
+ coder.run("make a script that prints hello world")
76
+
77
+ # Send another instruction
78
+ coder.run("make it say goodbye")
79
+
80
+ # You can run in-chat "/" commands too
81
+ coder.run("/tokens")
82
+
83
+ ```
84
+
85
+ See the
86
+ [Coder.create() and Coder.__init__() methods](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)
87
+ for all the supported arguments.
88
+
89
+ It can also be helpful to set the equivalent of `--yes` by doing this:
90
+
91
+ ```python
92
+ from aider.io import InputOutput
93
+ io = InputOutput(yes=True)
94
+ # ...
95
+ coder = Coder.create(model=model, fnames=fnames, io=io)
96
+ ```
97
+
98
+ {: .note }
99
+ The python scripting API is not officially supported or documented,
100
+ and could change in future releases without providing backwards compatibility.
@@ -0,0 +1,203 @@
1
+ # Session Management
2
+
3
+ Aider provides session management commands that allow you to save, load, and manage your chat sessions. This is particularly useful for:
4
+
5
+ - Continuing work on complex projects across multiple sessions
6
+ - Recreating specific development environments
7
+ - Archiving important conversations and file configurations
8
+
9
+ ## Session Commands
10
+
11
+ ### `/save-session <name>`
12
+ Save the current chat session to a named file in `.aider/sessions/`.
13
+
14
+ ### Auto-Save and Auto-Load
15
+ Aider can automatically save and load sessions using command line options:
16
+
17
+ **Auto-save:**
18
+ ```bash
19
+ aider --auto-save
20
+ ```
21
+
22
+ **Auto-load:**
23
+ ```bash
24
+ aider --auto-load
25
+ ```
26
+
27
+ **In configuration files:**
28
+ ```yaml
29
+ auto-save: true
30
+ auto-load: true
31
+ ```
32
+
33
+ When `--auto-save` is enabled, aider will automatically save your session as 'auto-save' when you exit. When `--auto-load` is enabled, aider will automatically load the 'auto-save' session on startup if it exists.
34
+
35
+ **Usage:**
36
+ ```
37
+ /save-session my-project-session
38
+ ```
39
+
40
+ **What gets saved:**
41
+ - Chat history (both done and current messages)
42
+ - All files in the chat (editable, read-only, and read-only stubs)
43
+ - Current model and edit format settings
44
+ - Auto-commit, auto-lint, and auto-test settings
45
+ - Session metadata (timestamp, version)
46
+
47
+ ### `/load-session <name>`
48
+ Load a previously saved session by name or file path.
49
+
50
+ **Usage:**
51
+ ```
52
+ /load-session my-project-session
53
+ ```
54
+
55
+ **What gets loaded:**
56
+ - Restores chat history and file configurations
57
+ - Recreates the exact session state
58
+ - Preserves all settings and model configurations
59
+
60
+ ### `/list-sessions`
61
+ List all available saved sessions in `.aider/sessions/`.
62
+
63
+ **Usage:**
64
+ ```
65
+ /list-sessions
66
+ ```
67
+
68
+ **Shows:**
69
+ - Session names
70
+ - Model used
71
+ - Edit format
72
+ - Creation timestamp
73
+
74
+ ## How Sessions Work
75
+
76
+ ### Session Storage
77
+ Sessions are stored as JSON files in the `.aider/sessions/` directory within your project. Each session file contains:
78
+
79
+ ```json
80
+ {
81
+ "version": "1.0",
82
+ "timestamp": 1700000000,
83
+ "session_name": "my-session",
84
+ "model": "gpt-4",
85
+ "edit_format": "diff",
86
+ "chat_history": {
87
+ "done_messages": [...],
88
+ "cur_messages": [...]
89
+ },
90
+ "files": {
91
+ "editable": ["file1.py", "file2.js"],
92
+ "read_only": ["docs/README.md"],
93
+ "read_only_stubs": []
94
+ },
95
+ "settings": {
96
+ "root": "/path/to/project",
97
+ "auto_commits": true,
98
+ "auto_lint": false,
99
+ "auto_test": false
100
+ }
101
+ }
102
+ ```
103
+
104
+ ### Session File Location
105
+ - **Relative paths**: Files within your project are stored with relative paths
106
+ - **Absolute paths**: External files are stored with absolute paths
107
+
108
+ ## Use Cases
109
+
110
+ ### Project Continuation
111
+ ```
112
+ # Start working on a project
113
+ /add src/main.py src/utils.py
114
+ # ... have a conversation ...
115
+ /save-session my-project
116
+
117
+ # Later, continue where you left off
118
+ /load-session my-project
119
+ ```
120
+
121
+ ### Multiple Contexts
122
+ ```
123
+ # Work on frontend
124
+ /add src/components/*.jsx src/styles/*.css
125
+ /save-session frontend-work
126
+
127
+ # Switch to backend
128
+ /reset
129
+ /add server/*.py database/*.sql
130
+ /save-session backend-work
131
+
132
+ # Easily switch between contexts
133
+ /load-session frontend-work
134
+ ```
135
+
136
+ ## Best Practices
137
+
138
+ ### Naming Conventions
139
+ - Use descriptive names: `feature-auth-session`, `bugfix-issue-123`
140
+ - Include dates if needed: `2024-01-project-setup`
141
+
142
+ ### File Management
143
+ - Session files include all file paths, so they work best when project structure is stable
144
+ - External files (outside the project root) are stored with absolute paths
145
+ - Missing files are skipped with warnings during loading
146
+
147
+ ### Version Control
148
+ - Consider adding `.aider/sessions/` to your `.gitignore` if sessions contain sensitive information
149
+
150
+ ## Troubleshooting
151
+
152
+ ### Session Not Found
153
+ If `/load-session` reports "Session not found":
154
+ - Check that the session file exists in `.aider/sessions/`
155
+ - Verify the session name matches exactly
156
+ - Use `/list-sessions` to see available sessions
157
+
158
+ ### Missing Files
159
+ If files are reported as missing during loading:
160
+ - The files may have been moved or deleted
161
+ - Session files store relative paths, so directory structure changes can affect this
162
+ - External files must exist at their original locations
163
+
164
+ ### Corrupted Sessions
165
+ If a session fails to load:
166
+ - Check the session file is valid JSON
167
+ - Verify the session version is compatible
168
+ - Try creating a new session and compare file structures
169
+
170
+ ## Related Commands
171
+ - `/reset` - Clear chat history and drop files (useful before loading a session)
172
+
173
+ ## Examples
174
+
175
+ ### Complete Workflow
176
+ ```
177
+ # Start a new project session
178
+ /add package.json src/main.js src/components/
179
+ # ... work on the project ...
180
+ /save-session react-project
181
+
182
+ # Later, continue working
183
+ /load-session react-project
184
+ # All files and chat history are restored
185
+ ```
186
+
187
+ ### Session with External Files
188
+ ```
189
+ # Include documentation from outside the project
190
+ /read-only ~/docs/api-reference.md
191
+ /save-session project-with-docs
192
+ ```
193
+
194
+ ### Multiple Model Sessions
195
+ ```
196
+ # Save session with specific model
197
+ /model gpt-5
198
+ /save-session gpt4-session
199
+
200
+ # Try different model
201
+ /model claude-sonnet-4.5
202
+ /save-session claude-session
203
+ ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 28
4
+ ---
5
+
6
+ # Aider not found
7
+
8
+ In some environments the `aider` command may not be available
9
+ on your shell path.
10
+ This can occur because of permissions/security settings in your OS,
11
+ and often happens to Windows users.
12
+
13
+ You may see an error message like this:
14
+
15
+ > aider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
16
+
17
+ Below is the most fail safe way to run aider in these situations:
18
+
19
+ ```
20
+ python -m aider
21
+ ```
22
+
23
+ You should also consider
24
+ [installing aider using aider-install, uv or pipx](/docs/install.html).