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,76 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 10
4
+ ---
5
+
6
+ # File editing problems
7
+
8
+ Sometimes the LLM will reply with some code changes
9
+ that don't get applied to your local files.
10
+ In these cases, aider might say something like "Failed to apply edit to *filename*"
11
+ or other error messages.
12
+
13
+ This usually happens because the LLM is disobeying the system prompts
14
+ and trying to make edits in a format that aider doesn't expect.
15
+ Aider makes every effort to get the LLM
16
+ to conform, and works hard to deal with
17
+ LLM edits that are "almost" correctly formatted.
18
+
19
+ But sometimes the LLM just won't cooperate.
20
+ In these cases, here are some things you might try.
21
+
22
+ ## Don't add too many files
23
+
24
+ Many LLMs now have very large context windows,
25
+ but filling them with irrelevant code or conversation
26
+ can confuse the model.
27
+ Above about 25k tokens of context, most models start to become distracted and become less likely
28
+ to conform to their system prompt.
29
+
30
+ - Don't add too many files to the chat, *just* add the files you think need to be edited.
31
+ Aider also sends the LLM a [map of your entire git repo](https://aider.chat/docs/repomap.html), so other relevant code will be included automatically.
32
+ - Use `/drop` to remove files from the chat session which aren't needed for the task at hand. This will reduce distractions and may help the LLM produce properly formatted edits.
33
+ - Use `/clear` to remove the conversation history, again to help the LLM focus.
34
+ - Use `/tokens` to see how many tokens you are using for each message.
35
+
36
+ ## Use a more capable model
37
+
38
+ If possible try using GPT-4o, o3-mini, Claude 3.7 Sonnet, DeepSeek V3 or DeepSeek R1.
39
+ They are the strong and capable models.
40
+
41
+ Weaker models
42
+ are more prone to
43
+ disobeying the system prompt instructions.
44
+ Most local models are just barely capable of working with aider,
45
+ so editing errors are probably unavoidable.
46
+
47
+ ## Local models: context window and quantization
48
+
49
+ Be especially careful about the
50
+ [Ollama context window](https://aider.chat/docs/llms/ollama.html#setting-the-context-window-size)
51
+ when working with local models.
52
+ It defaults to be very small and silently discards data if you exceed it.
53
+
54
+ Local models which have been quantized are more likely to have editing problems
55
+ because they are not capable enough to follow aider's system prompts.
56
+
57
+ ## Try the whole edit format
58
+
59
+ Run aider with `--edit-format whole` if were using a different edit format.
60
+ You can see which edit format it is using in the announce lines:
61
+
62
+ ```
63
+ Aider v0.50.2-dev
64
+ Models: claude-3-5-sonnet-20240620 with ♾️ diff edit format
65
+ ```
66
+
67
+ ## Try architect mode
68
+
69
+ Run aider with `--architect` or `/chat-mode architect` to enable [architect mode](../usage/modes.md#architect-mode-and-the-editor-model).
70
+ This mode first proposes changes, then uses a separate model to handle the file edits.
71
+ This two-step process often produces more reliable edits, especially with models that have trouble
72
+ following edit format instructions.
73
+
74
+ ## More help
75
+
76
+ {% include help.md %}
@@ -0,0 +1,62 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 28
4
+ ---
5
+
6
+ # Dependency versions
7
+
8
+ Aider expects to be installed with the
9
+ correct versions of all of its required dependencies.
10
+
11
+ If you've been linked to this doc from a GitHub issue,
12
+ or if aider is reporting `ImportErrors`
13
+ it is likely that your
14
+ aider install is using incorrect dependencies.
15
+
16
+
17
+ ## Avoid package conflicts
18
+
19
+ If you are using aider to work on a python project, sometimes your project will require
20
+ specific versions of python packages which conflict with the versions that aider
21
+ requires.
22
+ If this happens, you may see errors like these when running pip installs:
23
+
24
+ ```
25
+ aider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.
26
+ ```
27
+
28
+ ## Install with aider-install, uv or pipx
29
+
30
+ If you are having dependency problems you should consider
31
+ [installing aider using aider-install, uv or pipx](/docs/install.html).
32
+ This will ensure that aider is installed in its own python environment,
33
+ with the correct set of dependencies.
34
+
35
+ ## Package managers like Homebrew, AUR, ports
36
+
37
+ Package managers often install aider with the wrong dependencies, leading
38
+ to import errors and other problems.
39
+
40
+ It is recommended to
41
+ [install aider using aider-install, uv or pipx](/docs/install.html).
42
+
43
+
44
+ ## Dependency versions matter
45
+
46
+ Aider pins its dependencies and is tested to work with those specific versions.
47
+ If you are installing aider directly with pip
48
+ you should be careful about upgrading or downgrading the python packages that
49
+ aider uses.
50
+
51
+ In particular, be careful with the packages with pinned versions
52
+ noted at the end of
53
+ [aider's requirements.in file](https://github.com/Aider-AI/aider/blob/main/requirements/requirements.in).
54
+ These versions are pinned because aider is known not to work with the
55
+ latest versions of these libraries.
56
+
57
+ Also be wary of upgrading `litellm`, as it changes versions frequently
58
+ and sometimes introduces bugs or backwards incompatible changes.
59
+
60
+ ## Replit
61
+
62
+ {% include replit-pipx.md %}
@@ -0,0 +1,54 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 28
4
+ ---
5
+
6
+ # Models and API keys
7
+
8
+ Aider needs to know which LLM model you would like to work with and which keys
9
+ to provide when accessing it via API.
10
+
11
+ ## Defaults
12
+
13
+ If you don't explicitly name a model, aider will try to select a model
14
+ for you to work with.
15
+
16
+ First, aider will check which
17
+ [keys you have provided via the environment, config files, or command line arguments](https://aider.chat/docs/config/api-keys.html).
18
+ Based on the available keys, aider will select the best model to use.
19
+
20
+ ## OpenRouter
21
+
22
+ If you have not provided any keys, aider will offer to help you connect to
23
+ [OpenRouter](http://openrouter.ai)
24
+ which provides both free and paid access to most popular LLMs.
25
+ Once connected, aider will select the best model available on OpenRouter
26
+ based on whether you have a free or paid account there.
27
+
28
+ ## Specifying model & key
29
+
30
+ You can also tell aider which LLM to use and provide an API key.
31
+ The easiest way is to use the `--model` and `--api-key`
32
+ command line arguments, like this:
33
+
34
+ ```
35
+ # Work with DeepSeek via DeepSeek's API
36
+ aider --model deepseek --api-key deepseek=your-key-goes-here
37
+
38
+ # Work with Claude 3.7 Sonnet via Anthropic's API
39
+ aider --model sonnet --api-key anthropic=your-key-goes-here
40
+
41
+ # Work with o3-mini via OpenAI's API
42
+ aider --model o3-mini --api-key openai=your-key-goes-here
43
+
44
+ # Work with Sonnet via OpenRouter's API
45
+ aider --model openrouter/anthropic/claude-3.7-sonnet --api-key openrouter=your-key-goes-here
46
+
47
+ # Work with DeepSeek Chat V3 via OpenRouter's API
48
+ aider --model openrouter/deepseek/deepseek-chat --api-key openrouter=your-key-goes-here
49
+ ```
50
+
51
+ For more information, see the documentation sections:
52
+
53
+ - [Connecting to LLMs](https://aider.chat/docs/llms.html)
54
+ - [Configuring API keys](https://aider.chat/docs/config/api-keys.html)
@@ -0,0 +1,79 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ excerpt: Use "/help <question>" to ask for help about using aider, customizing settings, troubleshooting, using LLMs, etc.
4
+ nav_order: 30
5
+ ---
6
+
7
+ # Using /help
8
+
9
+ Type `/help <question>` and
10
+ aider will respond with helpful information.
11
+ You can ask questions about using aider,
12
+ customizing settings, troubleshooting, using LLMs, etc.
13
+
14
+ Behind the scenes, aider has indexed all of its
15
+ [documentation](https://aider.chat/).
16
+ It uses the question to find relevant docs
17
+ and share them with the LLM to do
18
+ retrieval augmented generation (RAG)
19
+ The LLM also has the full context of your ongoing
20
+ aider chat,
21
+ so it can help with the exact issue you might be facing.
22
+
23
+
24
+ <div class="chat-transcript" markdown="1">
25
+
26
+ > Aider v0.42.1-dev
27
+ > Models: claude-3-5-sonnet with diff edit format
28
+ > Repo-map: using 1024 tokens
29
+ > Use /help \<question\> to ask for help, run with --help to see cmd line args
30
+
31
+ #### /help is the .env file global or for a git repo?
32
+
33
+ Based on the provided documentation, here's the answer to your question about the .env file in aider:
34
+
35
+ The .env file in aider can be both global and specific to a git repository. Aider looks for .env files in multiple locations, with the following priority order:
36
+
37
+ 1. Your home directory (global)
38
+ 2. The root of your git repo (repo-specific)
39
+ 3. The current directory
40
+ 4. A file specified with the `--env-file <filename>` parameter
41
+
42
+ If multiple .env files exist in these locations, they are loaded in the order listed above, with files loaded last taking priority. This means you can have a global .env file in your home directory with general settings, and then override or add to those settings with a repo-specific .env file in your git repository root.
43
+
44
+ Here are some relevant documentation links that you might find helpful:
45
+
46
+ - https://aider.chat/docs/config.html
47
+ - https://aider.chat/docs/config/dotenv.html
48
+
49
+ The ability to use both global and repo-specific .env files allows for flexible configuration, where you can set default values globally and override them on a per-project basis as needed.
50
+
51
+ </div>
52
+ <div class="chat-transcript" markdown="1">
53
+
54
+ #### /help can i use local LLMs?
55
+
56
+ Yes, you can use local LLMs with Aider. Here's a summary of the options:
57
+
58
+ 1. Ollama: Aider supports using local models through Ollama.
59
+
60
+ 2. OpenAI-compatible API: Aider can access local models that provide an OpenAI-compatible API.
61
+
62
+ 3. Other local models: Aider uses the LiteLLM package to connect to various LLM providers, which may include options for running models locally.
63
+
64
+ However, it's important to note that Aider works best with more capable models. Less capable models may have difficulty properly returning "code edits," which could result in Aider not being able to edit your files and commit changes effectively.
65
+
66
+ For more detailed information on using local LLMs and connecting to various models, you might want to check out these relevant documentation pages:
67
+
68
+ - https://aider.chat/docs/llms.html
69
+ - https://aider.chat/docs/llms/ollama.html
70
+ - https://aider.chat/docs/llms/openai-compat.html
71
+
72
+ Keep in mind that the performance and capabilities of local LLMs may vary depending on the specific model and your hardware resources.
73
+
74
+ </div>
75
+
76
+
77
+ ## Getting more help
78
+
79
+ {% include help.md %}
@@ -0,0 +1,96 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 25
4
+ ---
5
+
6
+ # Token limits
7
+
8
+ Every LLM has limits on how many tokens it can process for each request:
9
+
10
+ - The model's **context window** limits how many total tokens of
11
+ *input and output* it can process.
12
+ - Each model has limit on how many **output tokens** it can
13
+ produce.
14
+
15
+ Aider will report an error **if a model responds** indicating that
16
+ it has exceeded a token limit.
17
+ The error will include suggested actions to try and
18
+ avoid hitting token limits.
19
+
20
+ Here's an example error:
21
+
22
+ ```
23
+ Model gpt-3.5-turbo has hit a token limit!
24
+
25
+ Input tokens: 768 of 16385
26
+ Output tokens: 4096 of 4096 -- exceeded output limit!
27
+ Total tokens: 4864 of 16385
28
+
29
+ To reduce output tokens:
30
+ - Ask for smaller changes in each request.
31
+ - Break your code into smaller source files.
32
+ - Try using a stronger model like DeepSeek V3 or Sonnet that can return diffs.
33
+
34
+ For more info: https://aider.chat/docs/token-limits.html
35
+ ```
36
+
37
+ {: .note }
38
+ Aider never *enforces* token limits, it only *reports* token limit errors
39
+ from the API provider.
40
+ The token counts that aider reports are *estimates*.
41
+
42
+ ## Input tokens & context window size
43
+
44
+ The most common problem is trying to send too much data to a
45
+ model,
46
+ overflowing its context window.
47
+ Technically you can exhaust the context window if the input is
48
+ too large or if the input plus output are too large.
49
+
50
+ Strong models like GPT-4o and Sonnet have quite
51
+ large context windows, so this sort of error is
52
+ typically only an issue when working with weaker models.
53
+
54
+ The easiest solution is to try and reduce the input tokens
55
+ by removing files from the chat.
56
+ It's best to only add the files that aider will need to *edit*
57
+ to complete your request.
58
+
59
+ - Use `/tokens` to see token usage.
60
+ - Use `/drop` to remove unneeded files from the chat session.
61
+ - Use `/clear` to clear the chat history.
62
+ - Break your code into smaller source files.
63
+
64
+ ## Output token limits
65
+
66
+ Most models have quite small output limits, often as low
67
+ as 4k tokens.
68
+ If you ask aider to make a large change that affects a lot
69
+ of code, the LLM may hit output token limits
70
+ as it tries to send back all the changes.
71
+
72
+ To avoid hitting output token limits:
73
+
74
+ - Ask for smaller changes in each request.
75
+ - Break your code into smaller source files.
76
+ - Use a strong model like gpt-4o, sonnet or DeepSeek V3 that can return diffs.
77
+ - Use a model that supports [infinite output](/docs/more/infinite-output.html).
78
+
79
+ ## Other causes
80
+
81
+ Sometimes token limit errors are caused by
82
+ non-compliant API proxy servers
83
+ or bugs in the API server you are using to host a local model.
84
+ Aider has been well tested when directly connecting to
85
+ major
86
+ [LLM provider cloud APIs](https://aider.chat/docs/llms.html).
87
+ For serving local models,
88
+ [Ollama](https://aider.chat/docs/llms/ollama.html) is known to work well with aider.
89
+
90
+ Try using aider without an API proxy server
91
+ or directly with one of the recommended cloud APIs
92
+ and see if your token limit problems resolve.
93
+
94
+ ## More help
95
+
96
+ {% include help.md %}
@@ -0,0 +1,12 @@
1
+ ---
2
+ parent: Troubleshooting
3
+ nav_order: 20
4
+ ---
5
+
6
+ # Model warnings
7
+
8
+ {% include model-warnings.md %}
9
+
10
+ ## More help
11
+
12
+ {% include help.md %}
@@ -0,0 +1,11 @@
1
+ ---
2
+ nav_order: 60
3
+ has_children: true
4
+ description: How to troubleshoot problems with aider and get help.
5
+ ---
6
+
7
+ # Troubleshooting
8
+
9
+ Below are some approaches for troubleshooting problems with aider.
10
+
11
+ {% include help.md %}
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: Aider in your browser
3
+ highlight_image: /assets/browser.jpg
4
+ parent: Usage
5
+ nav_order: 800
6
+ description: Aider can run in your browser, not just on the command line.
7
+ ---
8
+ {% if page.date %}
9
+ <p class="post-date">{{ page.date | date: "%B %d, %Y" }}</p>
10
+ {% endif %}
11
+
12
+ # Aider in your browser
13
+
14
+ <div class="video-container">
15
+ <video controls loop poster="/assets/browser.jpg">
16
+ <source src="/assets/aider-browser-social.mp4" type="video/mp4">
17
+ <a href="/assets/aider-browser-social.mp4">Aider browser UI demo video</a>
18
+ </video>
19
+ </div>
20
+
21
+ <style>
22
+ .video-container {
23
+ position: relative;
24
+ padding-bottom: 101.89%; /* 1080 / 1060 = 1.0189 */
25
+ height: 0;
26
+ overflow: hidden;
27
+ }
28
+
29
+ .video-container video {
30
+ position: absolute;
31
+ top: 0;
32
+ left: 0;
33
+ width: 100%;
34
+ height: 100%;
35
+ }
36
+ </style>
37
+
38
+ Use aider's new experimental browser UI to collaborate with LLMs
39
+ to edit code in your local git repo.
40
+ Aider will directly edit the code in your local source files,
41
+ and [git commit the changes](https://aider.chat/docs/git.html)
42
+ with sensible commit messages.
43
+ You can start a new project or work with an existing git repo.
44
+ Aider works well with
45
+ GPT-4o, Sonnet 3.7, and DeepSeek Chat V3 & R1.
46
+ It also supports [connecting to almost any LLM](https://aider.chat/docs/llms.html).
47
+
48
+ Use the `--browser` switch to launch the browser version of aider:
49
+
50
+ ```
51
+ python -m pip install -U aider-chat
52
+
53
+ export OPENAI_API_KEY=<key> # Mac/Linux
54
+ setx OPENAI_API_KEY <key> # Windows, restart shell after setx
55
+
56
+ aider --browser
57
+ ```
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: Prompt caching
3
+ highlight_image: /assets/prompt-caching.jpg
4
+ parent: Usage
5
+ nav_order: 750
6
+ description: Aider supports prompt caching for cost savings and faster coding.
7
+ ---
8
+
9
+ # Prompt caching
10
+
11
+ Aider supports prompt caching for cost savings and faster coding.
12
+ Currently Anthropic provides caching for Sonnet and Haiku,
13
+ and DeepSeek provides caching for Chat.
14
+
15
+ Aider organizes the chat history to try and cache:
16
+
17
+ - The system prompt.
18
+ - Read only files added with `--read` or `/read-only`.
19
+ - The repository map.
20
+ - The editable files that have been added to the chat.
21
+
22
+ ![Prompt caching](/assets/prompt-caching.jpg)
23
+
24
+
25
+ ## Usage
26
+
27
+ Run aider with `--cache-prompts` or add that setting to your
28
+ [configuration files](/docs/config.html).
29
+
30
+ Due to limitations in the provider APIs, caching statistics and costs
31
+ are not available when streaming responses.
32
+ To turn off streaming, use `--no-stream`.
33
+
34
+ When caching is enabled, it will be noted for the main model when aider launches:
35
+
36
+ ```
37
+ Main model: claude-3-5-sonnet-20240620 with diff edit format, prompt cache, infinite output
38
+ ```
39
+
40
+ ## Preventing cache expiration
41
+
42
+ Aider can ping the provider to keep your prompt cache warm and prevent
43
+ it from expiring.
44
+ By default, Anthropic keeps your cache for 5 minutes.
45
+ Use `--cache-keepalive-pings N` to tell aider to ping
46
+ every 5 minutes to keep the cache warm.
47
+ Aider will ping up to `N` times over a period of `N*5` minutes
48
+ after each message you send.
49
+
@@ -0,0 +1,133 @@
1
+ ---
2
+ parent: Usage
3
+ nav_order: 50
4
+ description: Control aider with in-chat commands like /add, /model, etc.
5
+ ---
6
+
7
+ # In-chat commands
8
+ {: .no_toc }
9
+
10
+ - TOC
11
+ {:toc}
12
+
13
+ ## Slash commands
14
+
15
+ Aider supports commands from within the chat, which all start with `/`.
16
+
17
+ <!--[[[cog
18
+ from aider.commands import get_help_md
19
+ cog.out(get_help_md())
20
+ ]]]-->
21
+
22
+ |Command|Description|
23
+ |:------|:----------|
24
+ | **/add** | Add files to the chat so aider can edit them or review them in detail |
25
+ | **/architect** | Enter architect/editor mode using 2 different models. If no prompt provided, switches to architect/editor mode. |
26
+ | **/ask** | Ask questions about the code base without editing any files. If no prompt provided, switches to ask mode. |
27
+ | **/chat-mode** | Switch to a new chat mode |
28
+ | **/clear** | Clear the chat history |
29
+ | **/code** | Ask for changes to your code. If no prompt provided, switches to code mode. |
30
+ | **/commit** | Commit edits to the repo made outside the chat (commit message optional) |
31
+ | **/context** | Enter context mode to see surrounding code context. If no prompt provided, switches to context mode. |
32
+ | **/copy** | Copy the last assistant message to the clipboard |
33
+ | **/copy-context** | Copy the current chat context as markdown, suitable to paste into a web UI |
34
+ | **/diff** | Display the diff of changes since the last message |
35
+ | **/drop** | Remove files from the chat session to free up context space |
36
+ | **/edit** | Alias for /editor: Open an editor to write a prompt |
37
+ | **/editor** | Open an editor to write a prompt |
38
+ | **/editor-model** | Switch the Editor Model to a new LLM |
39
+ | **/exit** | Exit the application |
40
+ | **/git** | Run a git command (output excluded from chat) |
41
+ | **/help** | Ask questions about aider |
42
+ | **/history-search** | Fuzzy search your command history and paste the selected command into the chat. |
43
+ | **/lint** | Lint and fix in-chat files or all dirty files if none in chat |
44
+ | **/load** | Load and execute commands from a file |
45
+ | **/ls** | List all known files and indicate which are included in the chat session |
46
+ | **/map** | Print out the current repository map |
47
+ | **/map-refresh** | Force a refresh of the repository map |
48
+ | **/model** | Switch the Main Model to a new LLM |
49
+ | **/models** | Search the list of available models |
50
+ | **/multiline-mode** | Toggle multiline mode (swaps behavior of Enter and Meta+Enter) |
51
+ | **/paste** | Paste image/text from the clipboard into the chat. Optionally provide a name for the image. |
52
+ | **/quit** | Exit the application |
53
+ | **/read-only** | Add files to the chat that are for reference only, or turn added files to read-only |
54
+ | **/reasoning-effort** | Set the reasoning effort level (values: number or low/medium/high depending on model) |
55
+ | **/report** | Report a problem by opening a GitHub Issue |
56
+ | **/reset** | Drop all files and clear the chat history |
57
+ | **/run** | Run a shell command and optionally add the output to the chat (alias: !) |
58
+ | **/save** | Save commands to a file that can reconstruct the current chat session's files |
59
+ | **/settings** | Print out the current settings |
60
+ | **/test** | Run a shell command and add the output to the chat on non-zero exit code |
61
+ | **/think-tokens** | Set the thinking token budget, eg: 8096, 8k, 10.5k, 0.5M, or 0 to disable. |
62
+ | **/tokens** | Report on the number of tokens used by the current chat context |
63
+ | **/undo** | Undo the last git commit if it was done by aider |
64
+ | **/voice** | Record and transcribe voice input |
65
+ | **/weak-model** | Switch the Weak Model to a new LLM |
66
+ | **/web** | Scrape a webpage, convert to markdown and send in a message |
67
+
68
+ <!--[[[end]]]-->
69
+
70
+ {: .tip }
71
+ You can easily re-send commands or messages.
72
+ Use the up arrow ⬆ to scroll back
73
+ or CONTROL-R to search your message history.
74
+
75
+ ## Entering multi-line chat messages
76
+
77
+ {% include multi-line.md %}
78
+
79
+ ## Interrupting with CONTROL-C
80
+
81
+ It's always safe to use Control-C to interrupt aider if it isn't providing a useful response. The partial response remains in the conversation, so you can refer to it when you reply to the LLM with more information or direction.
82
+
83
+ ## Keybindings
84
+
85
+ The interactive prompt is built with [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) which provides emacs and vi keybindings.
86
+
87
+ ### Emacs
88
+
89
+ - `Up Arrow` : Move up one line in the current message.
90
+ - `Down Arrow` : Move down one line in the current message.
91
+ - `Ctrl-Up` : Scroll back through previously sent messages.
92
+ - `Ctrl-Down` : Scroll forward through previously sent messages.
93
+ - `Ctrl-A` : Move cursor to the start of the line.
94
+ - `Ctrl-B` : Move cursor back one character.
95
+ - `Ctrl-D` : Delete the character under the cursor.
96
+ - `Ctrl-E` : Move cursor to the end of the line.
97
+ - `Ctrl-F` : Move cursor forward one character.
98
+ - `Ctrl-K` : Delete from the cursor to the end of the line.
99
+ - `Ctrl-L` : Clear the screen.
100
+ - `Ctrl-N` : Move down to the next history entry.
101
+ - `Ctrl-P` : Move up to the previous history entry.
102
+ - `Ctrl-R` : Reverse search in command history.
103
+ - `Ctrl-X Ctrl-E` : Open the current input in an external editor
104
+ - `Ctrl-Y` : Paste (yank) text that was previously cut.
105
+
106
+
107
+ ### Vi
108
+
109
+ To use vi/vim keybindings, run aider with the `--vim` switch.
110
+
111
+ - `Up Arrow` : Move up one line in the current message.
112
+ - `Down Arrow` : Move down one line in the current message.
113
+ - `Ctrl-Up` : Scroll back through previously sent messages.
114
+ - `Ctrl-Down` : Scroll forward through previously sent messages.
115
+ - `Esc` : Switch to command mode.
116
+ - `i` : Switch to insert mode.
117
+ - `a` : Move cursor one character to the right and switch to insert mode.
118
+ - `A` : Move cursor to the end of the line and switch to insert mode.
119
+ - `I` : Move cursor to the beginning of the line and switch to insert mode.
120
+ - `h` : Move cursor one character to the left.
121
+ - `j` : Move cursor down one line.
122
+ - `k` : Move cursor up one line.
123
+ - `l` : Move cursor one character to the right.
124
+ - `w` : Move cursor forward one word.
125
+ - `b` : Move cursor backward one word.
126
+ - `0` : Move cursor to the beginning of the line.
127
+ - `$` : Move cursor to the end of the line.
128
+ - `x` : Delete the character under the cursor.
129
+ - `dd` : Delete the current line.
130
+ - `u` : Undo the last change.
131
+ - `Ctrl-R` : Redo the last undone change.
132
+
133
+