chatmcp-cli 0.1.0__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 (228) hide show
  1. aider/__init__.py +20 -0
  2. aider/__main__.py +4 -0
  3. aider/_version.py +21 -0
  4. aider/analytics.py +250 -0
  5. aider/args.py +926 -0
  6. aider/args_formatter.py +228 -0
  7. aider/coders/__init__.py +34 -0
  8. aider/coders/architect_coder.py +48 -0
  9. aider/coders/architect_prompts.py +40 -0
  10. aider/coders/ask_coder.py +9 -0
  11. aider/coders/ask_prompts.py +35 -0
  12. aider/coders/base_coder.py +2483 -0
  13. aider/coders/base_prompts.py +60 -0
  14. aider/coders/chat_chunks.py +64 -0
  15. aider/coders/context_coder.py +53 -0
  16. aider/coders/context_prompts.py +75 -0
  17. aider/coders/editblock_coder.py +657 -0
  18. aider/coders/editblock_fenced_coder.py +10 -0
  19. aider/coders/editblock_fenced_prompts.py +143 -0
  20. aider/coders/editblock_func_coder.py +141 -0
  21. aider/coders/editblock_func_prompts.py +27 -0
  22. aider/coders/editblock_prompts.py +174 -0
  23. aider/coders/editor_diff_fenced_coder.py +9 -0
  24. aider/coders/editor_diff_fenced_prompts.py +11 -0
  25. aider/coders/editor_editblock_coder.py +8 -0
  26. aider/coders/editor_editblock_prompts.py +18 -0
  27. aider/coders/editor_whole_coder.py +8 -0
  28. aider/coders/editor_whole_prompts.py +10 -0
  29. aider/coders/help_coder.py +16 -0
  30. aider/coders/help_prompts.py +46 -0
  31. aider/coders/patch_coder.py +706 -0
  32. aider/coders/patch_prompts.py +161 -0
  33. aider/coders/search_replace.py +757 -0
  34. aider/coders/shell.py +37 -0
  35. aider/coders/single_wholefile_func_coder.py +102 -0
  36. aider/coders/single_wholefile_func_prompts.py +27 -0
  37. aider/coders/udiff_coder.py +429 -0
  38. aider/coders/udiff_prompts.py +115 -0
  39. aider/coders/udiff_simple.py +14 -0
  40. aider/coders/udiff_simple_prompts.py +25 -0
  41. aider/coders/wholefile_coder.py +144 -0
  42. aider/coders/wholefile_func_coder.py +134 -0
  43. aider/coders/wholefile_func_prompts.py +27 -0
  44. aider/coders/wholefile_prompts.py +67 -0
  45. aider/commands.py +1665 -0
  46. aider/copypaste.py +72 -0
  47. aider/deprecated.py +126 -0
  48. aider/diffs.py +128 -0
  49. aider/dump.py +29 -0
  50. aider/editor.py +147 -0
  51. aider/exceptions.py +107 -0
  52. aider/format_settings.py +26 -0
  53. aider/gui.py +545 -0
  54. aider/help.py +163 -0
  55. aider/help_pats.py +19 -0
  56. aider/history.py +143 -0
  57. aider/io.py +1175 -0
  58. aider/linter.py +304 -0
  59. aider/llm.py +47 -0
  60. aider/main.py +1267 -0
  61. aider/mdstream.py +243 -0
  62. aider/models.py +1286 -0
  63. aider/onboarding.py +428 -0
  64. aider/openrouter.py +128 -0
  65. aider/prompts.py +64 -0
  66. aider/queries/tree-sitter-language-pack/README.md +7 -0
  67. aider/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
  68. aider/queries/tree-sitter-language-pack/c-tags.scm +9 -0
  69. aider/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
  70. aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
  71. aider/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
  72. aider/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
  73. aider/queries/tree-sitter-language-pack/d-tags.scm +26 -0
  74. aider/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
  75. aider/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
  76. aider/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
  77. aider/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
  78. aider/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
  79. aider/queries/tree-sitter-language-pack/go-tags.scm +42 -0
  80. aider/queries/tree-sitter-language-pack/java-tags.scm +20 -0
  81. aider/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
  82. aider/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
  83. aider/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
  84. aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
  85. aider/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
  86. aider/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
  87. aider/queries/tree-sitter-language-pack/python-tags.scm +14 -0
  88. aider/queries/tree-sitter-language-pack/r-tags.scm +21 -0
  89. aider/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
  90. aider/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
  91. aider/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
  92. aider/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
  93. aider/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
  94. aider/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
  95. aider/queries/tree-sitter-languages/README.md +23 -0
  96. aider/queries/tree-sitter-languages/c-tags.scm +9 -0
  97. aider/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
  98. aider/queries/tree-sitter-languages/cpp-tags.scm +15 -0
  99. aider/queries/tree-sitter-languages/dart-tags.scm +91 -0
  100. aider/queries/tree-sitter-languages/elisp-tags.scm +8 -0
  101. aider/queries/tree-sitter-languages/elixir-tags.scm +54 -0
  102. aider/queries/tree-sitter-languages/elm-tags.scm +19 -0
  103. aider/queries/tree-sitter-languages/go-tags.scm +30 -0
  104. aider/queries/tree-sitter-languages/hcl-tags.scm +77 -0
  105. aider/queries/tree-sitter-languages/java-tags.scm +20 -0
  106. aider/queries/tree-sitter-languages/javascript-tags.scm +88 -0
  107. aider/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
  108. aider/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
  109. aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
  110. aider/queries/tree-sitter-languages/php-tags.scm +26 -0
  111. aider/queries/tree-sitter-languages/python-tags.scm +12 -0
  112. aider/queries/tree-sitter-languages/ql-tags.scm +26 -0
  113. aider/queries/tree-sitter-languages/ruby-tags.scm +64 -0
  114. aider/queries/tree-sitter-languages/rust-tags.scm +60 -0
  115. aider/queries/tree-sitter-languages/scala-tags.scm +65 -0
  116. aider/queries/tree-sitter-languages/typescript-tags.scm +41 -0
  117. aider/reasoning_tags.py +82 -0
  118. aider/repo.py +623 -0
  119. aider/repomap.py +847 -0
  120. aider/report.py +200 -0
  121. aider/resources/__init__.py +3 -0
  122. aider/resources/model-metadata.json +468 -0
  123. aider/resources/model-settings.yml +1767 -0
  124. aider/run_cmd.py +132 -0
  125. aider/scrape.py +284 -0
  126. aider/sendchat.py +61 -0
  127. aider/special.py +203 -0
  128. aider/urls.py +17 -0
  129. aider/utils.py +338 -0
  130. aider/versioncheck.py +113 -0
  131. aider/voice.py +187 -0
  132. aider/waiting.py +221 -0
  133. aider/watch.py +318 -0
  134. aider/watch_prompts.py +12 -0
  135. aider/website/Gemfile +8 -0
  136. aider/website/_includes/blame.md +162 -0
  137. aider/website/_includes/get-started.md +22 -0
  138. aider/website/_includes/help-tip.md +5 -0
  139. aider/website/_includes/help.md +24 -0
  140. aider/website/_includes/install.md +5 -0
  141. aider/website/_includes/keys.md +4 -0
  142. aider/website/_includes/model-warnings.md +67 -0
  143. aider/website/_includes/multi-line.md +22 -0
  144. aider/website/_includes/python-m-aider.md +5 -0
  145. aider/website/_includes/recording.css +228 -0
  146. aider/website/_includes/recording.md +34 -0
  147. aider/website/_includes/replit-pipx.md +9 -0
  148. aider/website/_includes/works-best.md +1 -0
  149. aider/website/_sass/custom/custom.scss +103 -0
  150. aider/website/docs/config/adv-model-settings.md +1881 -0
  151. aider/website/docs/config/aider_conf.md +527 -0
  152. aider/website/docs/config/api-keys.md +90 -0
  153. aider/website/docs/config/dotenv.md +478 -0
  154. aider/website/docs/config/editor.md +127 -0
  155. aider/website/docs/config/model-aliases.md +103 -0
  156. aider/website/docs/config/options.md +843 -0
  157. aider/website/docs/config/reasoning.md +209 -0
  158. aider/website/docs/config.md +44 -0
  159. aider/website/docs/faq.md +378 -0
  160. aider/website/docs/git.md +76 -0
  161. aider/website/docs/index.md +47 -0
  162. aider/website/docs/install/codespaces.md +39 -0
  163. aider/website/docs/install/docker.md +57 -0
  164. aider/website/docs/install/optional.md +100 -0
  165. aider/website/docs/install/replit.md +8 -0
  166. aider/website/docs/install.md +115 -0
  167. aider/website/docs/languages.md +264 -0
  168. aider/website/docs/legal/contributor-agreement.md +111 -0
  169. aider/website/docs/legal/privacy.md +104 -0
  170. aider/website/docs/llms/anthropic.md +77 -0
  171. aider/website/docs/llms/azure.md +48 -0
  172. aider/website/docs/llms/bedrock.md +132 -0
  173. aider/website/docs/llms/cohere.md +34 -0
  174. aider/website/docs/llms/deepseek.md +32 -0
  175. aider/website/docs/llms/gemini.md +49 -0
  176. aider/website/docs/llms/github.md +105 -0
  177. aider/website/docs/llms/groq.md +36 -0
  178. aider/website/docs/llms/lm-studio.md +39 -0
  179. aider/website/docs/llms/ollama.md +75 -0
  180. aider/website/docs/llms/openai-compat.md +39 -0
  181. aider/website/docs/llms/openai.md +58 -0
  182. aider/website/docs/llms/openrouter.md +78 -0
  183. aider/website/docs/llms/other.md +103 -0
  184. aider/website/docs/llms/vertex.md +50 -0
  185. aider/website/docs/llms/warnings.md +10 -0
  186. aider/website/docs/llms/xai.md +53 -0
  187. aider/website/docs/llms.md +54 -0
  188. aider/website/docs/more/analytics.md +122 -0
  189. aider/website/docs/more/edit-formats.md +116 -0
  190. aider/website/docs/more/infinite-output.md +137 -0
  191. aider/website/docs/more-info.md +8 -0
  192. aider/website/docs/recordings/auto-accept-architect.md +31 -0
  193. aider/website/docs/recordings/dont-drop-original-read-files.md +35 -0
  194. aider/website/docs/recordings/index.md +21 -0
  195. aider/website/docs/recordings/model-accepts-settings.md +69 -0
  196. aider/website/docs/recordings/tree-sitter-language-pack.md +80 -0
  197. aider/website/docs/repomap.md +112 -0
  198. aider/website/docs/scripting.md +100 -0
  199. aider/website/docs/troubleshooting/aider-not-found.md +24 -0
  200. aider/website/docs/troubleshooting/edit-errors.md +76 -0
  201. aider/website/docs/troubleshooting/imports.md +62 -0
  202. aider/website/docs/troubleshooting/models-and-keys.md +54 -0
  203. aider/website/docs/troubleshooting/support.md +79 -0
  204. aider/website/docs/troubleshooting/token-limits.md +96 -0
  205. aider/website/docs/troubleshooting/warnings.md +12 -0
  206. aider/website/docs/troubleshooting.md +11 -0
  207. aider/website/docs/usage/browser.md +57 -0
  208. aider/website/docs/usage/caching.md +49 -0
  209. aider/website/docs/usage/commands.md +132 -0
  210. aider/website/docs/usage/conventions.md +119 -0
  211. aider/website/docs/usage/copypaste.md +121 -0
  212. aider/website/docs/usage/images-urls.md +48 -0
  213. aider/website/docs/usage/lint-test.md +118 -0
  214. aider/website/docs/usage/modes.md +211 -0
  215. aider/website/docs/usage/not-code.md +179 -0
  216. aider/website/docs/usage/notifications.md +87 -0
  217. aider/website/docs/usage/tips.md +79 -0
  218. aider/website/docs/usage/tutorials.md +30 -0
  219. aider/website/docs/usage/voice.md +121 -0
  220. aider/website/docs/usage/watch.md +294 -0
  221. aider/website/docs/usage.md +92 -0
  222. aider/website/share/index.md +101 -0
  223. chatmcp_cli-0.1.0.dist-info/METADATA +502 -0
  224. chatmcp_cli-0.1.0.dist-info/RECORD +228 -0
  225. chatmcp_cli-0.1.0.dist-info/WHEEL +5 -0
  226. chatmcp_cli-0.1.0.dist-info/entry_points.txt +3 -0
  227. chatmcp_cli-0.1.0.dist-info/licenses/LICENSE.txt +202 -0
  228. chatmcp_cli-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ parent: Usage
3
+ nav_order: 700
4
+ description: Add images and web pages to the aider coding chat.
5
+ ---
6
+
7
+ # Images & web pages
8
+
9
+ You can add images and URLs to the aider chat.
10
+
11
+ ## Images
12
+
13
+ Aider supports working with image files for many vision-capable models
14
+ like GPT-4o and Claude 3.7 Sonnet.
15
+ Adding images to a chat can be helpful in many situations:
16
+
17
+ - Add screenshots of web pages or UIs that you want aider to build or modify.
18
+ - Show aider a mockup of a UI you want to build.
19
+ - Screenshot an error message that is otherwise hard to copy & paste as text.
20
+ - Etc.
21
+
22
+ You can add images to the chat just like you would
23
+ add any other file:
24
+
25
+ - Use `/add <image-filename>` from within the chat
26
+ - Use `/paste` to paste an image from your clipboard into the chat.
27
+ - Launch aider with image filenames on the command line: `aider <image-filename>` along with any other command line arguments you need.
28
+
29
+ ## Web pages
30
+
31
+ Aider can scrape the text from URLs and add it to the chat.
32
+ This can be helpful to:
33
+
34
+ - Include documentation pages for less popular APIs.
35
+ - Include the latest docs for libraries or packages that are newer than the model's training cutoff date.
36
+ - Etc.
37
+
38
+ To add URLs to the chat:
39
+
40
+ - Use `/web <url>`
41
+ - Just paste the URL into the chat and aider will ask if you want to add it.
42
+
43
+ You can also scrape web pages from the command line to see the markdown version that aider produces:
44
+
45
+
46
+ ```
47
+ python -m aider.scrape https://aider.chat/docs/usage/tips.html
48
+ ```
@@ -0,0 +1,118 @@
1
+ ---
2
+ parent: Usage
3
+ nav_order: 900
4
+ description: Automatically fix linting and testing errors.
5
+ ---
6
+
7
+ # Linting and testing
8
+
9
+ Aider can automatically lint and test your code
10
+ every time it makes changes.
11
+ This helps identify and repair any problems introduced
12
+ by the AI edits.
13
+
14
+ ## Linting
15
+
16
+ Aider comes with built in linters for
17
+ [most popular languages](/docs/languages.html)
18
+ and will automatically lint code in these languages.
19
+
20
+ Or you can specify your favorite linter
21
+ with the `--lint-cmd <cmd>` switch.
22
+ The lint command should accept the filenames
23
+ of the files to lint.
24
+ If there are linting errors, aider expects the
25
+ command to print them on stdout/stderr
26
+ and return a non-zero exit code.
27
+ This is how most linters normally operate.
28
+
29
+ By default, aider will lint any files which it edits.
30
+ You can disable this with the `--no-auto-lint` switch.
31
+
32
+ ### Per-language linters
33
+
34
+ To specify different linters based on the code language, use `--lint "language: cmd"`.
35
+
36
+ ### Code formatting "linters"
37
+
38
+ Many people use code formatters as linters, to format and pretty their code.
39
+ These tools sometimes return non-zero exit codes if they make changes, which will
40
+ confuse aider into thinking there's an actual lint error that needs to be fixed.
41
+
42
+ You can use formatters by wrapping them in a shell script like this and setting
43
+ the script as your linter.
44
+
45
+ ```bash
46
+ #!/bin/bash
47
+
48
+ # Run it twice.
49
+ #
50
+ # First attempt may reformat/modify files, and therefore exit with non-zero status.
51
+ #
52
+ # Second attempt will not do anything and exit 0 unless there's a real problem beyond
53
+ # the code formatting that was completed.
54
+
55
+ pre-commit run --files "$@" >/dev/null \
56
+ || pre-commit run --files "$@"
57
+ ```
58
+
59
+ ## Testing
60
+
61
+ You can run tests with `/test <test-command>`.
62
+ Aider will run the test command without any arguments.
63
+ If there are test errors, aider expects the
64
+ command to print them on stdout/stderr
65
+ and return a non-zero exit code.
66
+
67
+ Aider will try and fix any errors
68
+ if the command returns a non-zero exit code.
69
+
70
+ You can configure aider to run your test suite
71
+ after each time the AI edits your code
72
+ using the `--test-cmd <test-command>` and
73
+ `--auto-test` switch.
74
+
75
+
76
+
77
+ ## Compiled languages
78
+
79
+ If you want to have aider compile code after each edit, you
80
+ can use the lint and test commands to achieve this.
81
+
82
+ - You might want to recompile each file which was modified
83
+ to check for compile errors.
84
+ To do this,
85
+ provide a `--lint-cmd` which both lints and compiles the file.
86
+ You could create a small shell script for this.
87
+ - You might want to rebuild the entire project after files
88
+ are edited to check for build errors.
89
+ To do this,
90
+ provide a `--test-cmd` which both builds and tests the project.
91
+ You could create a small shell script for this.
92
+ Or you may be able to do something as simple as
93
+ `--test-cmd "dotnet build && dotnet test"`.
94
+
95
+ ## Manually running code
96
+
97
+ You can use the `/run` command in the chat to run your code
98
+ and optionally share the output with aider.
99
+ This can be useful to share error messages or to show aider
100
+ the code's output before asking for changes or corrections.
101
+
102
+ <div class="chat-transcript" markdown="1">
103
+ > Aider v0.43.5-dev
104
+
105
+ #### /run python myscript.py
106
+
107
+ ```
108
+ Traceback (most recent call last):
109
+ File "myscript.py", line 22, in \<module\
110
+ raise ValueError("something bad happened")
111
+ ValueError: something bad happened
112
+ ```
113
+
114
+ > Add the output to the chat? y
115
+
116
+ </div>
117
+
118
+
@@ -0,0 +1,211 @@
1
+ ---
2
+ parent: Usage
3
+ nav_order: 60
4
+ description: Using the code, architect, ask and help chat modes.
5
+ ---
6
+
7
+ # Chat modes
8
+
9
+ Aider has a few different chat modes:
10
+
11
+ - `code` - Aider will make changes to your code to satisfy your requests.
12
+ - `ask` - Aider will discuss your code and answer questions about it, but never make changes.
13
+ - `architect` - Like code mode, aider will change your files. An architect model will propose changes and an editor model will translate that proposal into specific file edits.
14
+ - `help` - Aider will answer questions about aider: usage, configuration, troubleshooting, etc.
15
+
16
+ By default, aider starts in "code" mode. As you are talking, you can
17
+ send individual messages in a specific mode using
18
+ `/code`, `/architect`, `/ask`, and `/help` commands:
19
+ Using these `/`-commands applies just to that particular message.
20
+ Your next message will go back to the active mode (usually "code" mode by default).
21
+
22
+ You can switch the active mode in a sticky way
23
+ with the `/chat-mode <mode>` command:
24
+
25
+ ```
26
+ /chat-mode code
27
+ /chat-mode architect
28
+ /chat-mode ask
29
+ /chat-mode help
30
+ ```
31
+
32
+ Or you can switch between coding modes using these commands without arguments:
33
+
34
+ ```
35
+ /code
36
+ /architect
37
+ /ask
38
+ ```
39
+
40
+ Or you can launch aider in one of the modes with the `--chat-mode <mode>` switch.
41
+ There is also a special shortcut `--architect` to launch in `--chat-mode architect`.
42
+
43
+ The aider prompt will indicate the active mode:
44
+
45
+ ```
46
+ > This is code mode.
47
+ ask> This is ask mode.
48
+ architect> This is architect mode.
49
+ ```
50
+
51
+
52
+ ## Ask/code workflow
53
+
54
+ A recommended workflow is to bounce back and forth between `/ask` and `/code` modes.
55
+
56
+ Use ask mode to discuss what you want to do, get suggestions or options from aider
57
+ and provide feedback on the approach.
58
+ Once aider understands the mission, switch to code mode to have it start editing
59
+ your files.
60
+ All the conversation and decision making from ask mode will
61
+ help ensure that the correct code changes are performed.
62
+
63
+ You can be very terse when you finally switch from ask to code mode.
64
+ Saying something as simple as "go ahead" in code mode will
65
+ have aider execute on the plan you've been discussing.
66
+
67
+ Here's an example with two ask mode messages to agree on the plan,
68
+ followed by two terse code mode messages to edit the code.
69
+
70
+ ````
71
+ ─────────────────────────────────────────────────────────────────────────────────────
72
+ Aider v0.79.0
73
+ Model: gemini/gemini-2.5-pro-exp-03-25 with diff-fenced edit format
74
+
75
+ > /ask What's the best thing to print if we're making a quick little demo program?
76
+
77
+ It sounds like you'd like to write a "Hello, world!" program. That's a very
78
+ popular phrase to use for small demo programs.
79
+
80
+ > /ask Yes, that's the idea. What are some more creative options?
81
+
82
+ 1. "Greetings, Earthlings!"
83
+ 2. "Beep boop, I am a computer!"
84
+ 3. "To code, or not to code, that is the question."
85
+ 4. "I think, therefore I print."
86
+ 5. "01001000 01101001!" (Binary for "Hi!")
87
+
88
+ > do 4
89
+
90
+ hello.py
91
+ >>>>>>> SEARCH
92
+ =======
93
+ def main():
94
+ print("I think, therefore I print.")
95
+ <<<<<<< REPLACE
96
+
97
+ > ALL CAPS!
98
+
99
+ hello.py
100
+ >>>>>>> SEARCH
101
+ print("I think, therefore I print.")
102
+ =======
103
+ print("I THINK, THEREFORE I PRINT!")
104
+ <<<<<<< REPLACE
105
+
106
+ ````
107
+
108
+ You can think of this ask/code workflow as a more fluid version of
109
+ architect mode, but working just with one model the whole time.
110
+
111
+ ## Architect mode and the editor model
112
+
113
+ When you are in architect mode, aider sends your requests to two models:
114
+
115
+ 1. First, it sends your request to the main model which will act as an architect
116
+ to propose how to solve your coding request.
117
+ The main model is configured with `/model` or `--model`.
118
+
119
+ 2. Aider then sends another request to an "editor model",
120
+ asking it to turn the architect's proposal into specific file editing instructions.
121
+ Aider has built in defaults to select an editor model based on your main model.
122
+ Or, you can choose a specific editor model with `--editor-model <model>`.
123
+
124
+ Certain LLMs aren't able to propose coding solutions *and*
125
+ specify detailed file edits all in one go.
126
+ For these models, architect mode can produce better results than code mode
127
+ by pairing them
128
+ with an editor model that is responsible for generating the file editing instructions.
129
+ But this uses two LLM requests,
130
+ which can take longer and increase costs.
131
+
132
+ Architect mode is especially useful with OpenAI's o1 models, which are strong at
133
+ reasoning but less capable at editing files.
134
+ Pairing an o1 architect with an editor model like GPT-4o or Sonnet will
135
+ give the best results.
136
+
137
+ But architect mode can also be helpful when you use the same model
138
+ as both the architect and the editor.
139
+ Allowing the model two requests to solve the problem and edit the files
140
+ can sometimes provide better results.
141
+
142
+ The editor model uses one of aider's edit formats to let the LLM
143
+ edit source files.
144
+ Aider will pick a suitable edit format by default,
145
+ but you can customize it with `--editor-edit-format <format>`.
146
+ The
147
+ ["editor-diff" and "editor-whole" edit formats](/docs/more/edit-formats.html#editor-diff-and-editor-whole)
148
+ are the recommended edit formats when using architect mode.
149
+ See this article on
150
+ [aider's architect/editor mode](/2024/09/26/architect.html)
151
+ for more details.
152
+
153
+
154
+ ## Examples
155
+
156
+ <div class="chat-transcript" markdown="1">
157
+
158
+
159
+ > Aider v0.47.1-dev
160
+ > Models: claude-3-5-sonnet-20240620 with diff edit format
161
+ > Git repo: .git with 298 files
162
+ > Repo-map: using 1024 tokens
163
+ > Use /help to see in-chat commands, run with --help to see cmd line args
164
+
165
+ #### /ask What is this repo?
166
+
167
+ This is collection of python functions that compute various math functions.
168
+
169
+ #### /help How do I use aider with ollama?
170
+
171
+ Run `aider --model ollama/<ollama-model>`.
172
+ See these docs for more info: https://aider.chat/docs/llms/ollama.html
173
+
174
+ #### /code Add a function to calculate the factorial of a number
175
+
176
+ Certainly! I'll add a function to calculate the factorial of a number. Here's the change:
177
+
178
+ ```python
179
+ def factorial(n):
180
+ if n == 0 or n == 1:
181
+ return 1
182
+ else:
183
+ return n * factorial(n - 1)
184
+
185
+ # Example usage
186
+ print(factorial(5)) # Output: 120
187
+ ```
188
+
189
+ This function uses recursion to calculate the factorial. It's been added to your code.
190
+
191
+ #### /architect Can we make this simpler?
192
+
193
+ Yes, you could replace the `factorial()` function with a call to the `math.factorial()`
194
+ builtin.
195
+ This way you don't have to maintain a custom factorial implementation,
196
+ and the builtin function is well optimized.
197
+
198
+ ```python
199
+ <<<<<<< SEARCH
200
+ def factorial(n):
201
+ if n == 0 or n == 1:
202
+ return 1
203
+ else:
204
+ return n * factorial(n - 1)
205
+ =======
206
+ from math import factorial
207
+ >>>>>>> REPLACE
208
+ ```
209
+
210
+ </div>
211
+
@@ -0,0 +1,179 @@
1
+ ---
2
+ parent: Usage
3
+ nav_order: 901
4
+ description: Use aider to edit configuration files, documentation, and other text-based formats.
5
+ ---
6
+
7
+
8
+ # Editing config & text files
9
+
10
+ Aider isn't just for code, it can be very helpful when editing
11
+ almost any text file.
12
+ You can use aider to make changes to your shell & ssh settings,
13
+ Dockerfiles
14
+ or pretty much any configuration or documentation file.
15
+
16
+ Here are some practical examples of modifying common config/text files:
17
+
18
+ ## Shell Configuration
19
+
20
+ <div class="chat-transcript" markdown="1">
21
+ $ aider .bashrc
22
+
23
+ Added .bashrc to the chat.
24
+
25
+
26
+ #### Add an alias 'll' that lists all files, with all details in human readable format. And update PATH to include uv installed tools.
27
+
28
+ ```
29
+ + alias ll='ls -alh'
30
+ + export PATH="$PATH:$HOME/.local/bin:$PATH"
31
+ ```
32
+ </div>
33
+
34
+ ## SSH Configurations
35
+
36
+ <div class="chat-transcript" markdown="1">
37
+ $ aider ~/.ssh/config
38
+
39
+ Added config to the chat.
40
+
41
+ #### Create a Host entry 'my-server' using bastion.example.com as JumpHost
42
+
43
+ ```
44
+ + Host my-server
45
+ + HostName 192.168.1.100
46
+ + User deploy
47
+ + Port 2222
48
+ + IdentityFile ~/.ssh/deploy_key
49
+ + ProxyJump bastion.example.com
50
+ ```
51
+ </div>
52
+
53
+ ## Docker Setup
54
+
55
+ <div class="chat-transcript" markdown="1">
56
+ $ aider Dockerfile docker-compose.yml
57
+
58
+ Added Dockerfile and docker-compose.yml to the chat.
59
+
60
+ #### Set non-root user and enable healthchecks
61
+
62
+ ```
63
+ + USER appuser
64
+ + HEALTHCHECK --interval=30s --timeout=3s \
65
+ + CMD curl -f http://localhost:8000/health || exit 1
66
+ ```
67
+
68
+ #### Expose port 5432 and add volume for postgres data
69
+
70
+ ```
71
+ services:
72
+ postgres:
73
+ image: postgres:15
74
+ + ports:
75
+ + - "5432:5432"
76
+ + volumes:
77
+ + - pgdata:/var/lib/postgresql/data
78
+ ```
79
+ </div>
80
+
81
+ ## Git Configuration
82
+
83
+ <div class="chat-transcript" markdown="1">
84
+ $ aider .gitconfig
85
+
86
+ Added .gitconfig to the chat.
87
+
88
+ #### Set default push behavior to current branch and enable color UI
89
+
90
+ ```
91
+ + [push]
92
+ + default = current
93
+ + [color]
94
+ + ui = auto
95
+ ```
96
+ </div>
97
+
98
+ ## System Configuration
99
+ <div class="chat-transcript" markdown="1">
100
+ $ aider /etc/hosts # May need sudo
101
+
102
+ Added hosts to the chat.
103
+
104
+ #### Block tracking domains by pointing them to 127.0.0.1
105
+
106
+ ```
107
+ + 127.0.0.1 ads.example.com
108
+ + 127.0.0.1 track.analytics.co
109
+ ```
110
+ </div>
111
+
112
+
113
+ ## Editor Configs
114
+ <div class="chat-transcript" markdown="1">
115
+ $ aider .vimrc
116
+
117
+ Added .vimrc to the chat.
118
+
119
+ #### Enable line numbers and set 4-space tabs for Python
120
+
121
+ ```
122
+ + set number
123
+ + autocmd FileType python set tabstop=4 shiftwidth=4 expandtab
124
+ ```
125
+ </div>
126
+
127
+ ## VSCode Configuration
128
+ <div class="chat-transcript" markdown="1">
129
+ $ aider settings.json
130
+
131
+ Added settings.json to the chat.
132
+
133
+ #### Enable auto-format on save and set default formatter
134
+
135
+ ```
136
+ + "editor.formatOnSave": true,
137
+ + "editor.defaultFormatter": "esbenp.prettier-vscode"
138
+ ```
139
+ </div>
140
+
141
+ ## Markdown Documentation
142
+ <div class="chat-transcript" markdown="1">
143
+ $ aider README.md
144
+
145
+ Added README.md to the chat.
146
+
147
+
148
+ #### Add installation section with brew and pip options
149
+
150
+ ```
151
+ + ## Installation
152
+ + ```
153
+ + # Homebrew
154
+ + brew install cool-app-10k
155
+ +
156
+ + # PyPI
157
+ + pipx install cool-app-10k
158
+ + ```
159
+ ```
160
+ </div>
161
+
162
+ ## XML Configuration
163
+ <div class="chat-transcript" markdown="1">
164
+ $ aider pom.xml
165
+
166
+ Added pom.xml to the chat.
167
+ #### Add JUnit 5 dependency with test scope
168
+
169
+ ```
170
+ + <dependency>
171
+ + <groupId>org.junit.jupiter</groupId>
172
+ + <artifactId>junit-jupiter-api</artifactId>
173
+ + <version>5.9.2</version>
174
+ + <scope>test</scope>
175
+ + </dependency>
176
+ ```
177
+ </div>
178
+
179
+
@@ -0,0 +1,87 @@
1
+ ---
2
+ title: Notifications
3
+ highlight_image: /assets/notifications.jpg
4
+ parent: Usage
5
+ nav_order: 760
6
+ description: Aider can notify you when it's waiting for your input.
7
+ ---
8
+
9
+ # Notifications
10
+
11
+ Aider can notify you when it's done working and is
12
+ waiting for your input.
13
+ This is especially useful for long-running operations or when you're multitasking.
14
+
15
+ ## Usage
16
+
17
+ Enable notifications with the `--notifications` flag:
18
+
19
+ ```bash
20
+ aider --notifications
21
+ ```
22
+
23
+ When enabled, aider will notify you when the LLM has finished generating a response and is waiting for your input.
24
+
25
+ ## OS-Specific Notifications
26
+
27
+ Aider automatically detects your operating system and uses an appropriate notification method:
28
+
29
+ - **macOS**: Uses `terminal-notifier` if available, falling back to AppleScript notifications
30
+ - **Linux**: Uses `notify-send` or `zenity` if available
31
+ - **Windows**: Uses PowerShell to display a message box
32
+
33
+ ## Custom Notification Commands
34
+
35
+ You can specify a custom notification command with `--notifications-command`:
36
+
37
+ ```bash
38
+ aider --notifications-command "your-custom-command"
39
+ ```
40
+
41
+ For example, on macOS you might use:
42
+
43
+ ```bash
44
+ aider --notifications-command "say 'Aider is ready'"
45
+ ```
46
+
47
+ ### Remote Notifications
48
+
49
+ For remote notifications you could use [Apprise](https://github.com/caronc/apprise),
50
+ which is a cross-platform Python library for sending notifications to various services.
51
+
52
+ We can use Apprise to send notifications to Slack
53
+
54
+ ```bash
55
+ aider --notifications-command "apprise -b 'Aider is ready' 'slack://your-slack-webhook-token'"
56
+ ```
57
+
58
+ or Discord
59
+ ```bash
60
+ aider --notifications-command "apprise -b 'Aider is ready' 'discord://your-discord-webhook-token'"
61
+ ```
62
+
63
+ or even to your phone via Pushbullet
64
+ ```bash
65
+ aider --notifications-command "apprise -b 'Aider is ready' 'pbul://your-pushbullet-access-token'"
66
+ ```
67
+
68
+ Check more how to use and configure Apprise on their GitHub page.
69
+
70
+ ## Configuration
71
+
72
+ You can add these settings to your configuration file:
73
+
74
+ ```yaml
75
+ # Enable notifications
76
+ notifications: true
77
+
78
+ # Optional custom notification command
79
+ notifications_command: "your-custom-command"
80
+ ```
81
+
82
+ Or in your `.env` file:
83
+
84
+ ```
85
+ AIDER_NOTIFICATIONS=true
86
+ AIDER_NOTIFICATIONS_COMMAND=your-custom-command
87
+ ```