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,294 @@
1
+ ---
2
+ title: Aider in your IDE
3
+ #highlight_image: /assets/browser.jpg
4
+ parent: Usage
5
+ nav_order: 750
6
+ description: Aider can watch your files and respond to AI comments you add in your favorite IDE or text editor.
7
+ ---
8
+
9
+ # Aider in your IDE
10
+
11
+ <div class="video-container">
12
+ <video controls loop poster="/assets/watch.jpg">
13
+ <source src="/assets/watch.mp4" type="video/mp4">
14
+ <a href="/assets/watch.mp4">Aider browser UI demo video</a>
15
+ </video>
16
+ </div>
17
+
18
+ <style>
19
+ .video-container {
20
+ position: relative;
21
+ padding-bottom: 102.7%; /1.027 */
22
+ height: 0;
23
+ overflow: hidden;
24
+ }
25
+
26
+ .video-container video {
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ width: 100%;
31
+ height: 100%;
32
+ }
33
+ </style>
34
+
35
+ ## AI comments
36
+
37
+ If you run aider with `--watch-files`, it will watch all files in your repo
38
+ and look for any AI coding instructions you add using your favorite IDE or text editor.
39
+
40
+ Specifically, aider looks for one-liner comments (# ... or // ...) that either start or end with `AI`, `AI!` or `AI?` like these:
41
+
42
+ ```python
43
+ # Make a snake game. AI!
44
+ # What is the purpose of this method AI?
45
+ ```
46
+
47
+ Or in `//` comment languages...
48
+
49
+ ```js
50
+ // Write a protein folding prediction engine. AI!
51
+ ```
52
+
53
+ Aider will take note of all the comments that start or end with `AI`.
54
+ Comments that include `AI!` with an exclamation point or `AI?` with a question
55
+ mark are special.
56
+ They trigger aider to take action to collect *all* the AI comments and use them
57
+ as your instructions.
58
+
59
+ - `AI!` triggers aider to make changes to your code.
60
+ - `AI?` triggers aider to answer your question.
61
+
62
+ See the demo video above that shows aider working with AI comments in VSCode.
63
+
64
+
65
+ ## Example
66
+
67
+ For example, if you included this AI comment in your code:
68
+
69
+ ```js
70
+ function factorial(n) // Implement this. AI!
71
+ ```
72
+
73
+ Then aider would update the file and implement the function:
74
+
75
+ ```js
76
+ function factorial(n) {
77
+ if (n === 0 || n === 1) {
78
+ return 1;
79
+ } else {
80
+ return n * factorial(n - 1);
81
+ }
82
+ }
83
+ ```
84
+
85
+ ## Comment styles
86
+
87
+ Aider only watches for these types of **one-liner** comments:
88
+
89
+ ```
90
+ # Python and bash style
91
+ // Javascript style
92
+ -- SQL style
93
+ ```
94
+
95
+ Aider will look for those comment types in all files.
96
+ You can use them into any code file you're editing, even if they aren't the
97
+ correct comment syntax for that language.
98
+
99
+ ## Multiple uses
100
+
101
+ This capability is quite flexible and powerful, and can be used in many ways.
102
+
103
+ ### In-context instructions
104
+
105
+ You can add an AI comment in the function you want changed,
106
+ explaining the change request in-context right where you want the changes.
107
+
108
+ ```javascript
109
+ app.get('/sqrt/:n', (req, res) => {
110
+ const n = parseFloat(req.params.n);
111
+
112
+ // Add error handling for NaN and less than zero. AI!
113
+
114
+ const result = math.sqrt(n);
115
+ res.json({ result: result });
116
+ });
117
+ ```
118
+
119
+ ### Multiple comments
120
+
121
+ You can add multiple `AI` comments without the `!`,
122
+ before triggering aider with a final `AI!`.
123
+ Also keep in mind that you can spread the AI comments across
124
+ multiple files, if you want to coordinate changes in multiple places.
125
+ Just use `AI!` last, to trigger aider.
126
+
127
+ ```python
128
+ @app.route('/factorial/<int:n>')
129
+ def factorial(n):
130
+ if n < 0:
131
+ return jsonify(error="Factorial is not defined for negative numbers"), 400
132
+
133
+ # AI: Refactor this code...
134
+
135
+ result = 1
136
+ for i in range(1, n + 1):
137
+ result *= i
138
+
139
+ # ... into to a compute_factorial() function. AI!
140
+
141
+ return jsonify(result=result)
142
+ ```
143
+
144
+ ### Long form instructions
145
+
146
+ You can add a block of comments, with longer instructions.
147
+ Just be sure to start or end one of the lines with `AI` or `AI!` to draw
148
+ aider's attention to the block.
149
+
150
+ ```python
151
+ # Make these changes: AI!
152
+ # - Add a proper main() function
153
+ # - Use Click to process cmd line args
154
+ # - Accept --host and --port args
155
+ # - Print a welcome message that includes the listening url
156
+
157
+ if __name__ == "__main__":
158
+ app.run(debug=True)
159
+ ```
160
+
161
+ ### Add a file to the aider chat
162
+
163
+ Rather than using `/add` to add a file inside the aider chat, you can
164
+ simply put an `#AI` comment in it and save the file.
165
+ You can undo/remove the comment immediately if you like, the file
166
+ will still be added to the aider chat.
167
+
168
+ ## Also use aider chat in the terminal
169
+
170
+ It can be really helpful to get a change started with AI comments.
171
+ But sometimes you want to build on or refine those changes.
172
+ You can of course continue to do that with AI comments,
173
+ but it can sometimes be effective to switch over to the aider terminal chat.
174
+ The chat has the history of the AI comments you just made,
175
+ so you can continue on naturally from there.
176
+
177
+ You can also use the normal aider chat in your terminal to work with
178
+ many of aider's more advanced features:
179
+
180
+ - Use `/undo` to revert changes you don't like. Although you may also be able to use your IDE's undo function to step back in the file history.
181
+ - Use [chat modes](https://aider.chat/docs/usage/modes.html) to ask questions or get help.
182
+ - Manage the chat context with `/tokens`, `/clear`, `/drop`, `/reset`.
183
+ Adding an AI comment will add the file to the chat.
184
+ Periodically, you may want remove extra context that is no longer needed.
185
+ - [Fix lint and test errors](https://aider.chat/docs/usage/lint-test.html).
186
+ - Run shell commands.
187
+ - Etc.
188
+
189
+
190
+ ## You can be lazy
191
+
192
+ The examples above all show AI
193
+ comments with full sentences, proper capitalization, punctuation, etc.
194
+ This was done to help explain how AI comments work, but is not needed in practice.
195
+
196
+ Most LLMs are perfectly capable of dealing with ambiguity and
197
+ inferring implied intent.
198
+ This often allows you to be quite lazy with your AI comments.
199
+ In particular, you can start and end comments with lowercase `ai` and `ai!`,
200
+ but you can also be much more terse with the request itself.
201
+ Below are simpler versions of some of the examples given above.
202
+
203
+ When the context clearly implies the needed action, `ai!` might be all you
204
+ need. For example, to implement a factorial function
205
+ in a program full of other math functions either of these
206
+ approaches would probably work:
207
+
208
+ ```js
209
+ function factorial(n) // ai!
210
+ ```
211
+
212
+ Or...
213
+
214
+ ```js
215
+ // add factorial() ai!
216
+ ```
217
+
218
+ Rather than a long, explicit comment like "Add error handling for NaN and less than zero,"
219
+ you can let aider infer more about the request.
220
+ This simpler comment may be sufficient:
221
+
222
+ ```javascript
223
+ app.get('/sqrt/:n', (req, res) => {
224
+ const n = parseFloat(req.params.n);
225
+
226
+ // add error handling ai!
227
+
228
+ const result = math.sqrt(n);
229
+ res.json({ result: result });
230
+ });
231
+ ```
232
+
233
+ Similarly, this refactor probably could have been requested with fewer words, like this:
234
+
235
+ ```python
236
+ @app.route('/factorial/<int:n>')
237
+ def factorial(n):
238
+ if n < 0:
239
+ return jsonify(error="Factorial is not defined for negative numbers"), 400
240
+
241
+ # ai refactor...
242
+
243
+ result = 1
244
+ for i in range(1, n + 1):
245
+ result *= i
246
+
247
+ # ... to compute_factorial() ai!
248
+
249
+ return jsonify(result=result)
250
+ ```
251
+
252
+ As you use aider with your chosen LLM, you can develop a sense for how
253
+ explicit you need to make your AI comments.
254
+
255
+ ## Behind the scenes
256
+
257
+ Aider sends your AI comments to the LLM with the
258
+ [repo map](https://aider.chat/docs/repomap.html)
259
+ and all the other code context you've added to the chat.
260
+
261
+ It also pulls out and highlights the AI comments with specific context, showing the LLM
262
+ exactly how they fit into the code base.
263
+
264
+ ```
265
+ The "AI" comments below marked with █ can be found in the code files I've shared with you.
266
+ They contain your instructions.
267
+ Make the requested changes.
268
+ Be sure to remove all these "AI" comments from the code!
269
+
270
+ todo_app.py:
271
+ ⋮...
272
+ │class TodoList:
273
+ ⋮...
274
+ │ def __init__(self):
275
+ │ """Initialize an empty todo list"""
276
+ ⋮...
277
+
278
+ │ def list_tasks(self):
279
+ │ """Display all tasks"""
280
+ █ # Implement this. AI!
281
+
282
+ │def main():
283
+ │ todo = TodoList()
284
+
285
+ ⋮...
286
+ ```
287
+
288
+ --------
289
+
290
+ #### Credits
291
+
292
+ *This feature was inspired by
293
+ the way [Override](https://github.com/oi-overide) watches for file changes
294
+ to find prompts embedded within `//> a specific set of delimiters <//`.*
@@ -0,0 +1,102 @@
1
+ ---
2
+ nav_order: 30
3
+ has_children: true
4
+ description: How to use aider to pair program with AI and edit code in your local git repo.
5
+ ---
6
+
7
+ # Usage
8
+
9
+ Run `aider` with the source code files you want to edit.
10
+ These files will be "added to the chat session", so that
11
+ aider can see their
12
+ contents and edit them for you.
13
+ They can be existing files or the name of files you want
14
+ aider to create for you.
15
+
16
+ ```
17
+ aider <file1> <file2> ...
18
+ ```
19
+
20
+ At the aider `>` prompt, ask for code changes and aider
21
+ will edit those files to accomplish your request.
22
+
23
+
24
+ ```
25
+ $ aider factorial.py
26
+
27
+ Aider v0.37.1-dev
28
+ Models: gpt-4o with diff edit format, weak model gpt-3.5-turbo
29
+ Git repo: .git with 258 files
30
+ Repo-map: using 1024 tokens
31
+ Use /help to see in-chat commands, run with --help to see cmd line args
32
+ ───────────────────────────────────────────────────────────────────────
33
+ > Make a program that asks for a number and prints its factorial
34
+
35
+ ...
36
+ ```
37
+
38
+ {% include help-tip.md %}
39
+
40
+ ## Adding files
41
+
42
+ To edit files, you need to "add them to the chat".
43
+ Do this
44
+ by naming them on the aider command line.
45
+ Or, you can use the in-chat
46
+ `/add` command to add files. With no arguments, `/add` will open a fuzzy finder that lets you select files from your repository. This feature is enabled if you have `fzf` installed. Otherwise, `/add` requires file paths as arguments.
47
+
48
+
49
+ Only add the files that need to be edited for your task.
50
+ Don't add a bunch of extra files.
51
+ If you add too many files, the LLM can get overwhelmed
52
+ and confused (and it costs more tokens).
53
+ Aider will automatically
54
+ pull in content from related files so that it can
55
+ [understand the rest of your code base](https://aider.chat/docs/repomap.html).
56
+
57
+ You can use aider without adding any files,
58
+ and it will try to figure out which files need to be edited based
59
+ on your requests.
60
+
61
+ {: .tip }
62
+ You'll get the best results if you think about which files need to be
63
+ edited. Add **just** those files to the chat. Aider will include
64
+ relevant context from the rest of your repo.
65
+
66
+ ## Read-only files
67
+
68
+ You can also add files to the chat as "read-only" files. Aider can see these files for context, but can't edit them. This is useful for providing reference documentation, specifications, or examples of existing code that you don't want the AI to modify.
69
+
70
+ Use the `/read-only` command to add files in read-only mode. Like `/add`, running `/read-only` with no arguments will open a fuzzy finder to select files if `fzf` is installed.
71
+
72
+ If you run `/read-only` with no arguments and don't select any files, it will convert all editable files currently in the chat to read-only. This is a convenient way to protect a set of files from being modified after you've added them for context.
73
+
74
+ You can also move a file from read-only to editable by using `/add` on a file that is already in the chat as read-only.
75
+
76
+ ## LLMs
77
+
78
+ {% include works-best.md %}
79
+
80
+ ```
81
+ # o3-mini
82
+ $ aider --model o3-mini --api-key openai=<key>
83
+
84
+ # Claude 3.7 Sonnet
85
+ $ aider --model sonnet --api-key anthropic=<key>
86
+ ```
87
+
88
+ Or you can run `aider --model XXX` to launch aider with
89
+ another model.
90
+ During your chat you can switch models with the in-chat
91
+ `/model` command.
92
+
93
+ ## Making changes
94
+
95
+ Ask aider to make changes to your code.
96
+ It will show you some diffs of the changes it is making to
97
+ complete you request.
98
+ [Aider will git commit all of its changes](/docs/git.html),
99
+ so they are easy to track and undo.
100
+
101
+ You can always use the `/undo` command to undo AI changes that you don't
102
+ like.
@@ -0,0 +1,101 @@
1
+ ---
2
+ nav_exclude: true
3
+ ---
4
+
5
+ <meta http-equiv="Content-Security-Policy"
6
+ content="default-src 'self';
7
+ script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com;
8
+ connect-src http: https:;
9
+ style-src 'self' 'unsafe-inline';">
10
+
11
+ # Shared aider chat transcript
12
+
13
+ A user has shared the following transcript of a pair programming chat session
14
+ created using <a href="https://aider.chat">aider</a>.
15
+ Aider is a command line tool that lets you pair program with GPT-3.5 or
16
+ GPT-4, to edit code stored in your local git repository.
17
+
18
+ The transcript is based on <a id="mdurl" href="">this chat transcript data</a>.
19
+
20
+ <div class="chat-transcript" id="shared-transcript">
21
+ </div>
22
+
23
+ ## Transcript format
24
+
25
+ <div class="chat-transcript" markdown="1">
26
+
27
+ > This is output from the aider tool.
28
+
29
+ #### These are chat messages written by the user.
30
+
31
+ Chat responses from GPT are in a blue font like this,
32
+ and often include colorized "diffs" where GPT is editing code:
33
+
34
+
35
+ ```python
36
+ hello.py
37
+ <<<<<<< ORIGINAL
38
+ print("hello")
39
+ =======
40
+ print("goodbye")
41
+ >>>>>>> UPDATED
42
+ ```
43
+ </div>
44
+
45
+ <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
46
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.0.6/purify.min.js"></script>
47
+ <script>
48
+ function isValidUrl(url) {
49
+ try {
50
+ const urlObj = new URL(url);
51
+ return urlObj.protocol === 'http:' || urlObj.protocol === 'https:';
52
+ } catch {
53
+ return false;
54
+ }
55
+ }
56
+
57
+ // Configure marked with secure defaults
58
+ marked.setOptions({
59
+ headerIds: false,
60
+ mangle: false
61
+ });
62
+
63
+ window.onload = function() {
64
+ var urlParams = new URLSearchParams(window.location.search);
65
+ var conv = urlParams.get('mdurl');
66
+ if (!conv || !isValidUrl(conv)) {
67
+ document.querySelector('#shared-transcript').innerHTML =
68
+ '<div style="color: red; padding: 1em;">Error: Invalid or missing URL provided</div>';
69
+ return;
70
+ }
71
+ document.getElementById('mdurl').href = conv;
72
+ // Check if the URL is a non-raw GitHub gist
73
+ var gistRegex = /^https:\/\/gist\.github\.com\/([^\/]+)\/([a-f0-9]+)$/;
74
+ var match = gistRegex.exec(conv);
75
+ if (match) {
76
+ // If it is, convert it into a raw URL
77
+ conv = 'https://gist.githubusercontent.com/' + match[1] + '/' + match[2] + '/raw';
78
+ }
79
+ fetch(conv)
80
+ .then(response => response.text())
81
+ .then(markdown => {
82
+ // Ensure every line that starts with '>' ends with exactly 2 spaces
83
+ markdown = markdown.split('\n').map(function(line) {
84
+ if (line.startsWith('>')) {
85
+ return line.trimEnd() + ' ';
86
+ }
87
+ return line;
88
+ }).join('\n');
89
+ var html = marked.parse(markdown);
90
+ var sanitizedHtml = DOMPurify.sanitize(html);
91
+ var divElement = document.querySelector('#shared-transcript');
92
+ divElement.innerHTML = sanitizedHtml;
93
+ })
94
+ .catch(error => {
95
+ console.error('Error fetching markdown:', error);
96
+ document.querySelector('#shared-transcript').innerHTML =
97
+ '<div style="color: red; padding: 1em;">Error: Failed to load chat transcript</div>';
98
+ });
99
+ }
100
+ </script>
101
+
@@ -0,0 +1,187 @@
1
+ Metadata-Version: 2.4
2
+ Name: aider-ce
3
+ Version: 0.88.20
4
+ Summary: Aider is AI pair programming in your terminal
5
+ Project-URL: Homepage, https://github.com/dwash96/aider-ce
6
+ Classifier: Development Status :: 4 - Beta
7
+ Classifier: Environment :: Console
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Topic :: Software Development
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE.txt
19
+ Requires-Dist: pydub>=0.25.1
20
+ Requires-Dist: configargparse>=1.7.1
21
+ Requires-Dist: GitPython>=3.1.45
22
+ Requires-Dist: jsonschema>=4.25.0
23
+ Requires-Dist: rich>=14.1.0
24
+ Requires-Dist: prompt_toolkit
25
+ Requires-Dist: backoff>=2.2.1
26
+ Requires-Dist: pathspec>=0.12.1
27
+ Requires-Dist: diskcache>=5.6.3
28
+ Requires-Dist: grep_ast
29
+ Requires-Dist: packaging>=25.0
30
+ Requires-Dist: sounddevice>=0.5.2
31
+ Requires-Dist: soundfile>=0.13.1
32
+ Requires-Dist: beautifulsoup4>=4.13.4
33
+ Requires-Dist: PyYAML>=6.0.2
34
+ Requires-Dist: diff-match-patch>=20241021
35
+ Requires-Dist: pypandoc>=1.15
36
+ Requires-Dist: litellm>=1.75.0
37
+ Requires-Dist: flake8>=7.3.0
38
+ Requires-Dist: importlib_resources
39
+ Requires-Dist: pyperclip>=1.9.0
40
+ Requires-Dist: posthog>=6.4.1
41
+ Requires-Dist: mixpanel>=4.10.1
42
+ Requires-Dist: pexpect>=4.9.0
43
+ Requires-Dist: json5>=0.12.0
44
+ Requires-Dist: psutil>=7.0.0
45
+ Requires-Dist: watchfiles>=1.1.0
46
+ Requires-Dist: socksio>=1.0.0
47
+ Requires-Dist: pillow>=11.3.0
48
+ Requires-Dist: shtab>=1.7.2
49
+ Requires-Dist: oslex>=0.1.3
50
+ Requires-Dist: google-generativeai>=0.8.5
51
+ Requires-Dist: mcp>=1.12.3
52
+ Requires-Dist: networkx>=3.4.2
53
+ Requires-Dist: scipy>=1.15.3
54
+ Requires-Dist: importlib-metadata>=7.2.1
55
+ Requires-Dist: tree-sitter==0.23.2; python_version < "3.10"
56
+ Requires-Dist: tree-sitter>=0.25.1; python_version >= "3.10"
57
+ Provides-Extra: dev
58
+ Requires-Dist: pytest; extra == "dev"
59
+ Requires-Dist: pytest-asyncio; extra == "dev"
60
+ Requires-Dist: pytest-env; extra == "dev"
61
+ Requires-Dist: pip-tools; extra == "dev"
62
+ Requires-Dist: lox; extra == "dev"
63
+ Requires-Dist: matplotlib; extra == "dev"
64
+ Requires-Dist: pandas; extra == "dev"
65
+ Requires-Dist: typer; extra == "dev"
66
+ Requires-Dist: imgcat; extra == "dev"
67
+ Requires-Dist: pre-commit; extra == "dev"
68
+ Requires-Dist: cogapp; extra == "dev"
69
+ Requires-Dist: semver; extra == "dev"
70
+ Requires-Dist: codespell; extra == "dev"
71
+ Requires-Dist: uv; extra == "dev"
72
+ Requires-Dist: google-cloud-bigquery; extra == "dev"
73
+ Provides-Extra: help
74
+ Requires-Dist: llama-index-embeddings-huggingface; extra == "help"
75
+ Requires-Dist: numpy>=1.26.4; extra == "help"
76
+ Provides-Extra: browser
77
+ Requires-Dist: streamlit; extra == "browser"
78
+ Provides-Extra: playwright
79
+ Requires-Dist: playwright; extra == "playwright"
80
+ Dynamic: license-file
81
+
82
+ ## Project Roadmap/Goals
83
+
84
+ The current priorities are to improve core capabilities and user experience of the Aider project
85
+
86
+ 1. **Base Asynchronicity (aider-ce coroutine-experiment branch)**
87
+ * [x] Refactor codebase to have the main loop run asynchronously
88
+ * [x] Update test harness to work with new asynchronous methods
89
+
90
+ 2. **Repo Map Accuracy** - [Discussion](https://github.com/dwash96/aider-ce/issues/45)
91
+ * [x] [Bias page ranking toward active/editable files in repo map parsing](https://github.com/Aider-AI/aider/issues/2405)
92
+ * [ ] [Include import information in repo map for richer context](https://github.com/Aider-AI/aider/issues/2688)
93
+ * [ ] [Handle non-unique symbols that break down in large codebases](https://github.com/Aider-AI/aider/issues/2341)
94
+
95
+ 3. **Context Discovery** - [Discussion](https://github.com/dwash96/aider-ce/issues/46)
96
+ * [ ] Develop AST-based search capabilities
97
+ * [ ] Enhance file search with ripgrep integration
98
+ * [ ] Implement RAG (Retrieval-Augmented Generation) for better code retrieval
99
+ * [ ] Build an explicit workflow and local tooling for internal discovery mechanisms
100
+
101
+ 4. **Context Delivery** - [Discussion](https://github.com/dwash96/aider-ce/issues/47)
102
+ * [ ] Use workflow for internal discovery to better target file snippets needed for specific tasks
103
+ * [ ] Add support for partial files and code snippets in model completion messages
104
+
105
+ 5. **TUI Experience** - [Discussion](https://github.com/dwash96/aider-ce/issues/48)
106
+ * [ ] Add a full TUI (probably using textual) to have a visual interface competitive with the other coding agent terminal programs
107
+ * [x] Re-integrate pretty output formatting
108
+ * [ ] Implement a response area, a prompt area with current auto completion capabilities, and a helper area for management utility commands
109
+
110
+ 6. **Agent Mode** - [Discussion](https://github.com/dwash96/aider-ce/issues/111)
111
+ * [x] Renaming "navigator mode" to "agent mode" for simplicity
112
+ * [x] Add an explicit "finished" internal tool
113
+ * [x] Add a configuration json setting for agent mode to specify allowed local tools to use, tool call limits, etc.
114
+ * [ ] Add a RAG tool for the model to ask questions about the codebase
115
+ * [ ] Make the system prompts more aggressive about removing unneeded files/content from the context
116
+ * [ ] Add a plugin-like system for allowing agent mode to use user-defined tools in simple python files
117
+ * [ ] Add a dynamic tool discovery tool to allow the system to have only the tools it needs in context
118
+
119
+ ### Documentation and Other Notes
120
+ * [Agent Mode](https://github.com/dwash96/aider-ce/blob/main/aider/website/docs/config/agent-mode.md)
121
+ * [MCP Configuration](https://github.com/dwash96/aider-ce/blob/main/aider/website/docs/config/mcp.md)
122
+ * [Session Management](https://github.com/dwash96/aider-ce/blob/main/aider/website/docs/sessions.md)
123
+ * [Aider Original Documentation (still mostly applies)](https://aider.chat/)
124
+ * [Discord Community](https://discord.gg/McwdCRuqkJ)
125
+
126
+ ### Installation Instructions
127
+ This project can be installed using several methods:
128
+
129
+ ### Package Installation
130
+ ```bash
131
+ pip install aider-ce
132
+ ```
133
+
134
+ or
135
+
136
+ ```bash
137
+ uv pip install aider-ce
138
+ ```
139
+
140
+ The package exports an `aider-ce` command that accepts all of Aider's configuration options
141
+
142
+ ### Tool Installation
143
+ ```bash
144
+ uv tool install --python python3.12 aider-ce
145
+ ```
146
+
147
+ Use the tool installation so aider doesn't interfere with your development environment
148
+
149
+ ### Merged PRs
150
+
151
+ * [MCP: #3937](https://github.com/Aider-AI/aider/pull/3937)
152
+ * [MCP Multi Tool Response](https://github.com/quinlanjager/aider/pull/1)
153
+ * [Navigator Mode: #3781](https://github.com/Aider-AI/aider/pull/3781)
154
+ * [Navigator Mode Large File Count](https://github.com/Aider-AI/aider/commit/b88a7bda649931798209945d9687718316c7427f)
155
+ * [Fix navigator mode auto commit](https://github.com/dwash96/aider-ce/issues/38)
156
+ * [Qwen 3: #4383](https://github.com/Aider-AI/aider/pull/4383)
157
+ * [Fuzzy Search: #4366](https://github.com/Aider-AI/aider/pull/4366)
158
+ * [Map Cache Location Config: #2911](https://github.com/Aider-AI/aider/pull/2911)
159
+ * [Enhanced System Prompts: #3804](https://github.com/Aider-AI/aider/pull/3804)
160
+ * [Repo Map File Name Truncation Fix: #4320](https://github.com/Aider-AI/aider/pull/4320)
161
+ * [Read Only Stub Files For Context Window Management : #3056](https://github.com/Aider-AI/aider/pull/3056)
162
+
163
+ ### Other Updates
164
+
165
+ * [Added Remote MCP Tool Calls With HTTP Streaming](https://github.com/Aider-AI/aider/commit/a86039f73579df7c32fee910967827c9fccdec0d)
166
+ * [Enforce single tool call at a time](https://github.com/Aider-AI/aider/commit/3346c3e6194096cef64b1899b017bde36a65f794)
167
+ * [Upgraded MCP dep to 1.12.3 for Remote MCP Tool Calls](https://github.com/dwash96/aider-ce/commit/a91ee1c03627a31093364fd2a09e654781b1b879)
168
+ * [Updated base Python version to 3.12 to better support navigator mode (might consider undoing this, if dependency list supports it)](https://github.com/dwash96/aider-ce/commit/9ed416d523c11362a3ba9fc4c02134e0e79d41fc)
169
+ * [Suppress LiteLLM asyncio errors that clutter output](https://github.com/Aider-AI/aider/issues/6)
170
+ * [Updated Docker File Build Process](https://github.com/Aider-AI/aider/commit/cbab01458d0a35c03b30ac2f6347a74fc2b9f662)
171
+ * [Manually install necessary ubuntu dependencies](https://github.com/dwash96/aider-ce/issues/14)
172
+ * [.gitignore updates](https://github.com/dwash96/aider-ce/commit/7c7e803fa63d1acd860eef1423e5a03220df6017)
173
+ * [Experimental Context Compaction For Longer Running Generation Tasks](https://github.com/Aider-AI/aider/issues/6)
174
+ * [Edit Before Adding Files and Reflecting](https://github.com/dwash96/aider-ce/pull/22)
175
+ * [Fix Deepseek model configurations](https://github.com/Aider-AI/aider/commit/c839a6dd8964d702172cae007375e299732d3823)
176
+ * [Relax Version Pinning For Easier Distribution](https://github.com/dwash96/aider-ce/issues/18)
177
+ * [Remove Confirm Responses from History](https://github.com/Aider-AI/aider/pull/3958)
178
+ * [Benchmark Results By Language](https://github.com/dwash96/aider-ce/pull/27)
179
+ * [Allow Benchmarks to Use Repo Map For Better Accuracy](https://github.com/dwash96/aider-ce/pull/25)
180
+ * [Read File Globbing](https://github.com/Aider-AI/aider/pull/3395)
181
+
182
+ ### All Contributors (Both Aider Main and Aider-CE)
183
+
184
+ <a href="https://github.com/dwash96/aider-ce/graphs/contributors">
185
+ <img src="https://contrib.rocks/image?repo=dwash96/aider-ce" />
186
+ </a>
187
+