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.
- aider/__init__.py +20 -0
- aider/__main__.py +4 -0
- aider/_version.py +21 -0
- aider/analytics.py +250 -0
- aider/args.py +926 -0
- aider/args_formatter.py +228 -0
- aider/coders/__init__.py +34 -0
- aider/coders/architect_coder.py +48 -0
- aider/coders/architect_prompts.py +40 -0
- aider/coders/ask_coder.py +9 -0
- aider/coders/ask_prompts.py +35 -0
- aider/coders/base_coder.py +2483 -0
- aider/coders/base_prompts.py +60 -0
- aider/coders/chat_chunks.py +64 -0
- aider/coders/context_coder.py +53 -0
- aider/coders/context_prompts.py +75 -0
- aider/coders/editblock_coder.py +657 -0
- aider/coders/editblock_fenced_coder.py +10 -0
- aider/coders/editblock_fenced_prompts.py +143 -0
- aider/coders/editblock_func_coder.py +141 -0
- aider/coders/editblock_func_prompts.py +27 -0
- aider/coders/editblock_prompts.py +174 -0
- aider/coders/editor_diff_fenced_coder.py +9 -0
- aider/coders/editor_diff_fenced_prompts.py +11 -0
- aider/coders/editor_editblock_coder.py +8 -0
- aider/coders/editor_editblock_prompts.py +18 -0
- aider/coders/editor_whole_coder.py +8 -0
- aider/coders/editor_whole_prompts.py +10 -0
- aider/coders/help_coder.py +16 -0
- aider/coders/help_prompts.py +46 -0
- aider/coders/patch_coder.py +706 -0
- aider/coders/patch_prompts.py +161 -0
- aider/coders/search_replace.py +757 -0
- aider/coders/shell.py +37 -0
- aider/coders/single_wholefile_func_coder.py +102 -0
- aider/coders/single_wholefile_func_prompts.py +27 -0
- aider/coders/udiff_coder.py +429 -0
- aider/coders/udiff_prompts.py +115 -0
- aider/coders/udiff_simple.py +14 -0
- aider/coders/udiff_simple_prompts.py +25 -0
- aider/coders/wholefile_coder.py +144 -0
- aider/coders/wholefile_func_coder.py +134 -0
- aider/coders/wholefile_func_prompts.py +27 -0
- aider/coders/wholefile_prompts.py +67 -0
- aider/commands.py +1665 -0
- aider/copypaste.py +72 -0
- aider/deprecated.py +126 -0
- aider/diffs.py +128 -0
- aider/dump.py +29 -0
- aider/editor.py +147 -0
- aider/exceptions.py +107 -0
- aider/format_settings.py +26 -0
- aider/gui.py +545 -0
- aider/help.py +163 -0
- aider/help_pats.py +19 -0
- aider/history.py +143 -0
- aider/io.py +1175 -0
- aider/linter.py +304 -0
- aider/llm.py +47 -0
- aider/main.py +1267 -0
- aider/mdstream.py +243 -0
- aider/models.py +1286 -0
- aider/onboarding.py +428 -0
- aider/openrouter.py +128 -0
- aider/prompts.py +64 -0
- aider/queries/tree-sitter-language-pack/README.md +7 -0
- aider/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/c-tags.scm +9 -0
- aider/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
- aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
- aider/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
- aider/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
- aider/queries/tree-sitter-language-pack/d-tags.scm +26 -0
- aider/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
- aider/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
- aider/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
- aider/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
- aider/queries/tree-sitter-language-pack/go-tags.scm +42 -0
- aider/queries/tree-sitter-language-pack/java-tags.scm +20 -0
- aider/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
- aider/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
- aider/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
- aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
- aider/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
- aider/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
- aider/queries/tree-sitter-language-pack/python-tags.scm +14 -0
- aider/queries/tree-sitter-language-pack/r-tags.scm +21 -0
- aider/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
- aider/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
- aider/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
- aider/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
- aider/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
- aider/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
- aider/queries/tree-sitter-languages/README.md +23 -0
- aider/queries/tree-sitter-languages/c-tags.scm +9 -0
- aider/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
- aider/queries/tree-sitter-languages/cpp-tags.scm +15 -0
- aider/queries/tree-sitter-languages/dart-tags.scm +91 -0
- aider/queries/tree-sitter-languages/elisp-tags.scm +8 -0
- aider/queries/tree-sitter-languages/elixir-tags.scm +54 -0
- aider/queries/tree-sitter-languages/elm-tags.scm +19 -0
- aider/queries/tree-sitter-languages/go-tags.scm +30 -0
- aider/queries/tree-sitter-languages/hcl-tags.scm +77 -0
- aider/queries/tree-sitter-languages/java-tags.scm +20 -0
- aider/queries/tree-sitter-languages/javascript-tags.scm +88 -0
- aider/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
- aider/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
- aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
- aider/queries/tree-sitter-languages/php-tags.scm +26 -0
- aider/queries/tree-sitter-languages/python-tags.scm +12 -0
- aider/queries/tree-sitter-languages/ql-tags.scm +26 -0
- aider/queries/tree-sitter-languages/ruby-tags.scm +64 -0
- aider/queries/tree-sitter-languages/rust-tags.scm +60 -0
- aider/queries/tree-sitter-languages/scala-tags.scm +65 -0
- aider/queries/tree-sitter-languages/typescript-tags.scm +41 -0
- aider/reasoning_tags.py +82 -0
- aider/repo.py +623 -0
- aider/repomap.py +847 -0
- aider/report.py +200 -0
- aider/resources/__init__.py +3 -0
- aider/resources/model-metadata.json +468 -0
- aider/resources/model-settings.yml +1767 -0
- aider/run_cmd.py +132 -0
- aider/scrape.py +284 -0
- aider/sendchat.py +61 -0
- aider/special.py +203 -0
- aider/urls.py +17 -0
- aider/utils.py +338 -0
- aider/versioncheck.py +113 -0
- aider/voice.py +187 -0
- aider/waiting.py +221 -0
- aider/watch.py +318 -0
- aider/watch_prompts.py +12 -0
- aider/website/Gemfile +8 -0
- aider/website/_includes/blame.md +162 -0
- aider/website/_includes/get-started.md +22 -0
- aider/website/_includes/help-tip.md +5 -0
- aider/website/_includes/help.md +24 -0
- aider/website/_includes/install.md +5 -0
- aider/website/_includes/keys.md +4 -0
- aider/website/_includes/model-warnings.md +67 -0
- aider/website/_includes/multi-line.md +22 -0
- aider/website/_includes/python-m-aider.md +5 -0
- aider/website/_includes/recording.css +228 -0
- aider/website/_includes/recording.md +34 -0
- aider/website/_includes/replit-pipx.md +9 -0
- aider/website/_includes/works-best.md +1 -0
- aider/website/_sass/custom/custom.scss +103 -0
- aider/website/docs/config/adv-model-settings.md +1881 -0
- aider/website/docs/config/aider_conf.md +527 -0
- aider/website/docs/config/api-keys.md +90 -0
- aider/website/docs/config/dotenv.md +478 -0
- aider/website/docs/config/editor.md +127 -0
- aider/website/docs/config/model-aliases.md +103 -0
- aider/website/docs/config/options.md +843 -0
- aider/website/docs/config/reasoning.md +209 -0
- aider/website/docs/config.md +44 -0
- aider/website/docs/faq.md +378 -0
- aider/website/docs/git.md +76 -0
- aider/website/docs/index.md +47 -0
- aider/website/docs/install/codespaces.md +39 -0
- aider/website/docs/install/docker.md +57 -0
- aider/website/docs/install/optional.md +100 -0
- aider/website/docs/install/replit.md +8 -0
- aider/website/docs/install.md +115 -0
- aider/website/docs/languages.md +264 -0
- aider/website/docs/legal/contributor-agreement.md +111 -0
- aider/website/docs/legal/privacy.md +104 -0
- aider/website/docs/llms/anthropic.md +77 -0
- aider/website/docs/llms/azure.md +48 -0
- aider/website/docs/llms/bedrock.md +132 -0
- aider/website/docs/llms/cohere.md +34 -0
- aider/website/docs/llms/deepseek.md +32 -0
- aider/website/docs/llms/gemini.md +49 -0
- aider/website/docs/llms/github.md +105 -0
- aider/website/docs/llms/groq.md +36 -0
- aider/website/docs/llms/lm-studio.md +39 -0
- aider/website/docs/llms/ollama.md +75 -0
- aider/website/docs/llms/openai-compat.md +39 -0
- aider/website/docs/llms/openai.md +58 -0
- aider/website/docs/llms/openrouter.md +78 -0
- aider/website/docs/llms/other.md +103 -0
- aider/website/docs/llms/vertex.md +50 -0
- aider/website/docs/llms/warnings.md +10 -0
- aider/website/docs/llms/xai.md +53 -0
- aider/website/docs/llms.md +54 -0
- aider/website/docs/more/analytics.md +122 -0
- aider/website/docs/more/edit-formats.md +116 -0
- aider/website/docs/more/infinite-output.md +137 -0
- aider/website/docs/more-info.md +8 -0
- aider/website/docs/recordings/auto-accept-architect.md +31 -0
- aider/website/docs/recordings/dont-drop-original-read-files.md +35 -0
- aider/website/docs/recordings/index.md +21 -0
- aider/website/docs/recordings/model-accepts-settings.md +69 -0
- aider/website/docs/recordings/tree-sitter-language-pack.md +80 -0
- aider/website/docs/repomap.md +112 -0
- aider/website/docs/scripting.md +100 -0
- aider/website/docs/troubleshooting/aider-not-found.md +24 -0
- aider/website/docs/troubleshooting/edit-errors.md +76 -0
- aider/website/docs/troubleshooting/imports.md +62 -0
- aider/website/docs/troubleshooting/models-and-keys.md +54 -0
- aider/website/docs/troubleshooting/support.md +79 -0
- aider/website/docs/troubleshooting/token-limits.md +96 -0
- aider/website/docs/troubleshooting/warnings.md +12 -0
- aider/website/docs/troubleshooting.md +11 -0
- aider/website/docs/usage/browser.md +57 -0
- aider/website/docs/usage/caching.md +49 -0
- aider/website/docs/usage/commands.md +132 -0
- aider/website/docs/usage/conventions.md +119 -0
- aider/website/docs/usage/copypaste.md +121 -0
- aider/website/docs/usage/images-urls.md +48 -0
- aider/website/docs/usage/lint-test.md +118 -0
- aider/website/docs/usage/modes.md +211 -0
- aider/website/docs/usage/not-code.md +179 -0
- aider/website/docs/usage/notifications.md +87 -0
- aider/website/docs/usage/tips.md +79 -0
- aider/website/docs/usage/tutorials.md +30 -0
- aider/website/docs/usage/voice.md +121 -0
- aider/website/docs/usage/watch.md +294 -0
- aider/website/docs/usage.md +92 -0
- aider/website/share/index.md +101 -0
- chatmcp_cli-0.1.0.dist-info/METADATA +502 -0
- chatmcp_cli-0.1.0.dist-info/RECORD +228 -0
- chatmcp_cli-0.1.0.dist-info/WHEEL +5 -0
- chatmcp_cli-0.1.0.dist-info/entry_points.txt +3 -0
- chatmcp_cli-0.1.0.dist-info/licenses/LICENSE.txt +202 -0
- chatmcp_cli-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
parent: Screen recordings
|
3
|
+
nav_order: 1
|
4
|
+
layout: minimal
|
5
|
+
highlight_image: /assets/recordings.jpg
|
6
|
+
description: Follow along as aider is modified to preserve read-only files specified at launch when using the /drop command. Aider does this implementation and adds test coverage.
|
7
|
+
---
|
8
|
+
|
9
|
+
# Don't /drop read-only files added at launch
|
10
|
+
|
11
|
+
<script>
|
12
|
+
const recording_id = "dont-drop-original-read-files";
|
13
|
+
const recording_url = "https://gist.githubusercontent.com/paul-gauthier/c2e7b2751925fb7bb47036cdd37ec40d/raw/08e62ab539e2b5d4b52c15c31d9a0d241377c17c/707583.cast";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
{% include recording.md %}
|
17
|
+
|
18
|
+
## Commentary
|
19
|
+
|
20
|
+
- 0:01 We're going to update the /drop command to keep any read only files that were originally specified at launch.
|
21
|
+
- 0:10 We've added files that handle the main CLI and in-chat slash commands like /drop.
|
22
|
+
- 0:20 Let's explain the needed change to aider.
|
23
|
+
- 1:20 Ok, let's look at the code.
|
24
|
+
- 1:30 I'd prefer not to use "hasattr()", let's ask for improvements.
|
25
|
+
- 1:45 Let's try some manual testing.
|
26
|
+
- 2:10 Looks good. Let's check the existing test suite to ensure we didn't break anything.
|
27
|
+
- 2:19 Let's ask aider to add tests for this.
|
28
|
+
- 2:50 Tests look reasonable, we're done!
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
title: Screen recordings
|
3
|
+
has_children: true
|
4
|
+
nav_order: 75
|
5
|
+
has_toc: false
|
6
|
+
description: Screen recordings of aider building aider.
|
7
|
+
highlight_image: /assets/recordings.jpg
|
8
|
+
---
|
9
|
+
|
10
|
+
# Screen recordings
|
11
|
+
|
12
|
+
Below are a series of screen recordings of the aider developer using aider
|
13
|
+
to enhance aider.
|
14
|
+
They contain commentary that describes how aider is being used,
|
15
|
+
and might provide some inspiration for your own use of aider.
|
16
|
+
|
17
|
+
{% assign sorted_pages = site.pages | where: "parent", "Screen recordings" | sort: "nav_order" %}
|
18
|
+
{% for page in sorted_pages %}
|
19
|
+
- [{{ page.title }}]({{ page.url | relative_url }}) - {{ page.description }}
|
20
|
+
{% endfor %}
|
21
|
+
|
@@ -0,0 +1,69 @@
|
|
1
|
+
---
|
2
|
+
parent: Screen recordings
|
3
|
+
nav_order: 1
|
4
|
+
layout: minimal
|
5
|
+
highlight_image: /assets/recordings.jpg
|
6
|
+
description: Watch the implementation of a warning system that alerts users when they try to apply reasoning settings to models that don't support them. Includes adding model metadata, confirmation dialogs, refactoring, and comprehensive test coverage.
|
7
|
+
---
|
8
|
+
|
9
|
+
# Warn when users apply unsupported reasoning settings
|
10
|
+
|
11
|
+
<script>
|
12
|
+
const recording_id = "model-accepts-settings";
|
13
|
+
const recording_url = "https://gist.githubusercontent.com/paul-gauthier/66b1b5aa7136147702c98afc4987c0d4/raw/4b5c7ddf7e80db1ff4dfa78fe158bc000fc42e0e/accepts-settings.cast";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
{% include recording.md %}
|
17
|
+
|
18
|
+
## Commentary
|
19
|
+
|
20
|
+
- 0:01 Users sometimes run aider with "reasoning" settings that aren't supported by the model they're using. This can cause LLM API calls to completely fail, with non-specific error messages from the API provider. We're going to warn users up front to prevent this.
|
21
|
+
- 0:25 Ok, let's ask aider to add a new model setting where we can note which reasoning settings it supports. And then print a warning if the user tries to apply an unsupported setting.
|
22
|
+
- 1:30 Looks like it's including some extra changes we don't want.
|
23
|
+
- 1:45 Let's have a look at the models code and clean up some stray lines.
|
24
|
+
- 2:00 It also made the warning logic too conservative. We want to warn unless the setting is explicitly known to be supported.
|
25
|
+
- 3:00 Ok, good. Now lets add a setting to silence these warnings for power users who are doing something intentional.
|
26
|
+
- 3:45 Now we need to update the database of model settings to annotate which models support which reasoning settings. We'll start with the code that handles "fallback" settings for known models on unknown providers.
|
27
|
+
- 4:45 Oh, we forgot to give aider the actual file with that code! Aider asks to see it.
|
28
|
+
- 5:00 Ok, we've confused aider by asking it to change code it couldn't see.
|
29
|
+
- 5:10 Let's clear the chat and refine the prompt and try again.
|
30
|
+
- 6:00 Ok, looks good. Let's move on and update the full model settings database YAML file. Each main model like "o1" appears here from many providers, like OpenAI, OpenRouter, etc. We want to update them all.
|
31
|
+
- 7:43 Let's interrupt and refine the prompt to be more clear about which models to update.
|
32
|
+
- 9:20 Looks good. Let's review the YAML file and eyeball all the relevant models.
|
33
|
+
- 10:20 Now let's do some manual testing.
|
34
|
+
- 10:41 Ok, it should not be warning us about using "thinking tokens" with Sonnet 3.7.
|
35
|
+
- 10:55 Let's see if aider can spot the problem?
|
36
|
+
- 11:28 That doesn't sound like a promising solution. Let's add more of the relevant code, clear history and try again.
|
37
|
+
- 12:00 Ok, let's try aider's proposed solution.
|
38
|
+
- 12:32 And see if it worked... Nope! Still getting the unneeded warning. Undo that change!
|
39
|
+
- 12:48 Time for some manual print debugging.
|
40
|
+
- 13:00 It seems like the "accept_settings" value is not being set?
|
41
|
+
- 14:30 Aha! I have a local model settings file for Sonnet which overrides aider's built in settings. And we did not update it. Let's add "accepts_settings" there.
|
42
|
+
- 14:45 That was the problem, it wasn't a bug.
|
43
|
+
- 14:59 Ok, let's add test coverage for all this stuff.
|
44
|
+
- 15:09 And while aider writes tests, let's use "git diff" to review all the changes we've made.
|
45
|
+
- 15:34 Aider is done writing tests, let's try them.
|
46
|
+
- 15:44 One passed, one failed. Let's eyeball the passing test first.
|
47
|
+
- 16:04 And let's see if aider can fix the failing test.
|
48
|
+
- 16:14 Aider needs to see another file, which makes sense.
|
49
|
+
- 16:29 It's found the problem, but is trying to "fix" the code. We want it to fix the test.
|
50
|
+
- 16:47 Ok, tests are passing.
|
51
|
+
- 16:55 We should stop and ask the user "are you sure?", not just flash a warning if they're about to break their API calls.
|
52
|
+
- 17:59 Ok, that confirmation dialog looks good.
|
53
|
+
- 18:35 This code is a little bit repetitive. Let's do a bit of refactoring.
|
54
|
+
- 19:44 Sonnet is messing up the code editing instructions, so aider is retrying.
|
55
|
+
- 19:54 Let's clear the chat history and try again.
|
56
|
+
- 20:25 Are tests still passing after the refactor?
|
57
|
+
- 20:55 Tests passed, good. Let's tweak the warning text.
|
58
|
+
- 21:10 And now let's have aider update the docs to explain these changes.
|
59
|
+
- 22:32 Let's proofread and edit the updated docs.
|
60
|
+
- 24:25 And a "git diff" of all the docs changes to do a final check.
|
61
|
+
- 24:56 Let's have aider update the project's HISTORY file.
|
62
|
+
- 25:35 We can refine the HISTORY entries a bit.
|
63
|
+
- 26:20 All done!
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
parent: Screen recordings
|
3
|
+
nav_order: 0
|
4
|
+
layout: minimal
|
5
|
+
highlight_image: /assets/recordings.jpg
|
6
|
+
description: Watch how aider adds support for tons of new programming languages by integrating with tree-sitter-language-pack. Demonstrates using aider to script downloading a collection of files, and using ad-hoc bash scripts to have aider modify a collection of files.
|
7
|
+
---
|
8
|
+
|
9
|
+
# Add language support via tree-sitter-language-pack
|
10
|
+
|
11
|
+
<script>
|
12
|
+
const recording_id = "tree-sitter-language-pack";
|
13
|
+
const recording_url = "https://gist.githubusercontent.com/paul-gauthier/a990333449b09e2793088a45eb1587f4/raw/364124781cca282907ccdc7567cdfc588a9b438b/tmp.redacted.cast";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
{% include recording.md %}
|
17
|
+
|
18
|
+
|
19
|
+
## Commentary
|
20
|
+
|
21
|
+
- 0:01 We're going to add a ton of new languages to aider via tree-sitter-language-pack.
|
22
|
+
- 0:10 First, lets try and find which languages it supports.
|
23
|
+
- 1:00 Ok, there's a language definitions json file
|
24
|
+
- 1:10 Does it have the github repos for each language?
|
25
|
+
- 1:29 Ok, this is what we need.
|
26
|
+
- 1:45 We need to get all the tags files from each repository for aider's repo-map. Let's have aider write a script to fetch them all.
|
27
|
+
- 2:05 We'll show aider the language definitions json file.
|
28
|
+
- 3:37 Looks like it can't find most of the tags.scm files.
|
29
|
+
- 4:19 Maybe we should have it try other branches besides master?
|
30
|
+
- 5:02 Ok, it seems to be downloading them now.
|
31
|
+
- 5:55 Let's make it so we can re-run the script and only download files we haven't fetched yet.
|
32
|
+
- 6:12 I see lots of tags files, so it's working.
|
33
|
+
- 6:30 Ok, restart to run with latest code. This will take awhile to fetch them all.
|
34
|
+
- 9:02 The Grep-AST module needs to know about all the new languages.
|
35
|
+
- 9:45 Let's have aider add them all, and register each using their commonly used file extensions.
|
36
|
+
- 10:15 Some of the languages need to be recognized by their base name, not by their extension.
|
37
|
+
- 11:15 Let's sanity check if Grep-AST can handle PowerShell, one of the new languages.
|
38
|
+
- 12:00 Looks like it's parsing PowerShell fine.
|
39
|
+
- 13:00 Ok, let's download all the tags files into the right spot in the aider repo.
|
40
|
+
- 14:00 This will take a minute...
|
41
|
+
- 16:07 Delete some no-op or empty tags files.
|
42
|
+
- 16:16 Let's commit all the unmodified tags files.
|
43
|
+
- 16:33 We need to update each tag file, so that aider can identify names of functions, classes, etc in all these languages.
|
44
|
+
- 17:01 Let's use a bash loop to script aider to modify each tags file.
|
45
|
+
- 17:12 I'm giving aider a read-only example of an already modified tags file, as an example to follow.
|
46
|
+
- 19:04 Looks like it correctly updated the first couple of tags files.
|
47
|
+
- 19:28 Let's grep to watch aider's progress working through the list of files.
|
48
|
+
- 20:20 It's working on the Dart language now...
|
49
|
+
- 20:50 E-lisp is up next...
|
50
|
+
- 21:30 This is going to take a little while...
|
51
|
+
- 24:39 Let's add a README file with attribution for these tags files.
|
52
|
+
- 26:55 Ok, all the files are updated with tags for definitions and references to named code objects.
|
53
|
+
- 27:10 Let's add test coverage to be sure these languages work with the repo-map.
|
54
|
+
- 27:19 Each language needs a "fixture" with some sample code to parse during the test. Let's show aider the layout of the fixtures directory.
|
55
|
+
- 27:50 We can use a bash loop to ask aider to add test coverage for each new tags file.
|
56
|
+
- 28:12 We'll pass the fixtures directory listing to aider.
|
57
|
+
- 28:52 Just need to fix the bash to correctly iterate through the list of tags files.
|
58
|
+
- 29:27 I forgot to ask aider to actually generate a sample code fixture for each language.
|
59
|
+
- 30:25 Lets run the repo-map tests to see if the first new test works.
|
60
|
+
- 30:37 Tests for the Arduino language failed, with an empty repo-map? That's not good.
|
61
|
+
- 31:52 Can aider figure out what's wrong?
|
62
|
+
- 32:27 Well, aider made the test pass by basically skipping Arduino.
|
63
|
+
- 32:36 Let me see if I can use Grep-AST on the new Arduino fixture code.
|
64
|
+
- 32:42 Oh! I'm not using the updated Grep-AST that knows about all the new languages.
|
65
|
+
- 32:54 Ok, now we're parsing Arduino code properly. Undo aider's bogus test fix.
|
66
|
+
- 33:05 Ok, arduino passes now but there seems to be a regression with tsx?
|
67
|
+
- 33:20 Can aider figure out why?
|
68
|
+
- 34:10 Let's check the parsers map.
|
69
|
+
- 35:00 Well, that's all for this recording. The tsx problem was due to a bad mapping from ".tsx" to "typescript" in the map that aider generated earlier.
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
parent: More info
|
3
|
+
highlight_image: /assets/robot-ast.png
|
4
|
+
nav_order: 300
|
5
|
+
description: Aider uses a map of your git repository to provide code context to LLMs.
|
6
|
+
---
|
7
|
+
|
8
|
+
# Repository map
|
9
|
+
|
10
|
+

|
11
|
+
|
12
|
+
Aider
|
13
|
+
uses a **concise map of your whole git repository**
|
14
|
+
that includes
|
15
|
+
the most important classes and functions along with their types and call signatures.
|
16
|
+
This helps aider understand the code it's editing
|
17
|
+
and how it relates to the other parts of the codebase.
|
18
|
+
The repo map also helps aider write new code
|
19
|
+
that respects and utilizes existing libraries, modules and abstractions
|
20
|
+
found elsewhere in the codebase.
|
21
|
+
|
22
|
+
## Using a repo map to provide context
|
23
|
+
|
24
|
+
Aider sends a **repo map** to the LLM along with
|
25
|
+
each change request from the user.
|
26
|
+
The repo map contains a list of the files in the
|
27
|
+
repo, along with the key symbols which are defined in each file.
|
28
|
+
It shows how each of these symbols are defined, by including the critical lines of code for each definition.
|
29
|
+
|
30
|
+
Here's a part of
|
31
|
+
the repo map of aider's repo, for
|
32
|
+
[base_coder.py](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)
|
33
|
+
and
|
34
|
+
[commands.py](https://github.com/Aider-AI/aider/blob/main/aider/commands.py)
|
35
|
+
:
|
36
|
+
|
37
|
+
```
|
38
|
+
aider/coders/base_coder.py:
|
39
|
+
⋮...
|
40
|
+
│class Coder:
|
41
|
+
│ abs_fnames = None
|
42
|
+
⋮...
|
43
|
+
│ @classmethod
|
44
|
+
│ def create(
|
45
|
+
│ self,
|
46
|
+
│ main_model,
|
47
|
+
│ edit_format,
|
48
|
+
│ io,
|
49
|
+
│ skip_model_availabily_check=False,
|
50
|
+
│ **kwargs,
|
51
|
+
⋮...
|
52
|
+
│ def abs_root_path(self, path):
|
53
|
+
⋮...
|
54
|
+
│ def run(self, with_message=None):
|
55
|
+
⋮...
|
56
|
+
|
57
|
+
aider/commands.py:
|
58
|
+
⋮...
|
59
|
+
│class Commands:
|
60
|
+
│ voice = None
|
61
|
+
│
|
62
|
+
⋮...
|
63
|
+
│ def get_commands(self):
|
64
|
+
⋮...
|
65
|
+
│ def get_command_completions(self, cmd_name, partial):
|
66
|
+
⋮...
|
67
|
+
│ def run(self, inp):
|
68
|
+
⋮...
|
69
|
+
```
|
70
|
+
|
71
|
+
Mapping out the repo like this provides some key benefits:
|
72
|
+
|
73
|
+
- The LLM can see classes, methods and function signatures from everywhere in the repo. This alone may give it enough context to solve many tasks. For example, it can probably figure out how to use the API exported from a module just based on the details shown in the map.
|
74
|
+
- If it needs to see more code, the LLM can use the map to figure out which files it needs to look at. The LLM can ask to see these specific files, and aider will offer to add them to the chat context.
|
75
|
+
|
76
|
+
## Optimizing the map
|
77
|
+
|
78
|
+
Of course, for large repositories even just the repo map might be too large
|
79
|
+
for the LLM's context window.
|
80
|
+
Aider solves this problem by sending just the **most relevant**
|
81
|
+
portions of the repo map.
|
82
|
+
It does this by analyzing the full repo map using
|
83
|
+
a graph ranking algorithm, computed on a graph
|
84
|
+
where each source file is a node and edges connect
|
85
|
+
files which have dependencies.
|
86
|
+
Aider optimizes the repo map by
|
87
|
+
selecting the most important parts of the codebase
|
88
|
+
which will
|
89
|
+
fit into the active token budget.
|
90
|
+
The optimization identifies and maps the portions of the code base
|
91
|
+
which are most relevant to the current state of the chat.
|
92
|
+
|
93
|
+
The token budget is
|
94
|
+
influenced by the `--map-tokens` switch, which defaults to 1k tokens.
|
95
|
+
Aider adjusts the size of the repo map dynamically based on the state of the chat. It will usually stay within that setting's value. But it does expand the repo map
|
96
|
+
significantly at times, especially when no files have been added to the chat and aider needs to understand the entire repo as best as possible.
|
97
|
+
|
98
|
+
|
99
|
+
The sample map shown above doesn't contain *every* class, method and function from those
|
100
|
+
files.
|
101
|
+
It only includes the most important identifiers,
|
102
|
+
the ones which are most often referenced by other portions of the code.
|
103
|
+
These are the key pieces of context that the LLM needs to know to understand
|
104
|
+
the overall codebase.
|
105
|
+
|
106
|
+
|
107
|
+
## More info
|
108
|
+
|
109
|
+
Please check the
|
110
|
+
[repo map article on aider's blog](https://aider.chat/2023/10/22/repomap.html)
|
111
|
+
for more information on aider's repository map
|
112
|
+
and how it is constructed.
|
@@ -0,0 +1,100 @@
|
|
1
|
+
---
|
2
|
+
parent: More info
|
3
|
+
nav_order: 400
|
4
|
+
description: You can script aider via the command line or python.
|
5
|
+
---
|
6
|
+
|
7
|
+
# Scripting aider
|
8
|
+
|
9
|
+
You can script aider via the command line or python.
|
10
|
+
|
11
|
+
## Command line
|
12
|
+
|
13
|
+
Aider takes a `--message` argument, where you can give it a natural language instruction.
|
14
|
+
It will do that one thing, apply the edits to the files and then exit.
|
15
|
+
So you could do:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
aider --message "make a script that prints hello" hello.js
|
19
|
+
```
|
20
|
+
|
21
|
+
Or you can write simple shell scripts to apply the same instruction to many files:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
for FILE in *.py ; do
|
25
|
+
aider --message "add descriptive docstrings to all the functions" $FILE
|
26
|
+
done
|
27
|
+
```
|
28
|
+
|
29
|
+
Use `aider --help` to see all the
|
30
|
+
[command line options](/docs/config/options.html),
|
31
|
+
but these are useful for scripting:
|
32
|
+
|
33
|
+
```
|
34
|
+
--stream, --no-stream
|
35
|
+
Enable/disable streaming responses (default: True) [env var:
|
36
|
+
AIDER_STREAM]
|
37
|
+
--message COMMAND, --msg COMMAND, -m COMMAND
|
38
|
+
Specify a single message to send GPT, process reply then exit
|
39
|
+
(disables chat mode) [env var: AIDER_MESSAGE]
|
40
|
+
--message-file MESSAGE_FILE, -f MESSAGE_FILE
|
41
|
+
Specify a file containing the message to send GPT, process reply,
|
42
|
+
then exit (disables chat mode) [env var: AIDER_MESSAGE_FILE]
|
43
|
+
--yes Always say yes to every confirmation [env var: AIDER_YES]
|
44
|
+
--auto-commits, --no-auto-commits
|
45
|
+
Enable/disable auto commit of GPT changes (default: True) [env var:
|
46
|
+
AIDER_AUTO_COMMITS]
|
47
|
+
--dirty-commits, --no-dirty-commits
|
48
|
+
Enable/disable commits when repo is found dirty (default: True) [env
|
49
|
+
var: AIDER_DIRTY_COMMITS]
|
50
|
+
--dry-run, --no-dry-run
|
51
|
+
Perform a dry run without modifying files (default: False) [env var:
|
52
|
+
AIDER_DRY_RUN]
|
53
|
+
--commit Commit all pending changes with a suitable commit message, then exit
|
54
|
+
[env var: AIDER_COMMIT]
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
## Python
|
59
|
+
|
60
|
+
You can also script aider from python:
|
61
|
+
|
62
|
+
```python
|
63
|
+
from aider.coders import Coder
|
64
|
+
from aider.models import Model
|
65
|
+
|
66
|
+
# This is a list of files to add to the chat
|
67
|
+
fnames = ["greeting.py"]
|
68
|
+
|
69
|
+
model = Model("gpt-4-turbo")
|
70
|
+
|
71
|
+
# Create a coder object
|
72
|
+
coder = Coder.create(main_model=model, fnames=fnames)
|
73
|
+
|
74
|
+
# This will execute one instruction on those files and then return
|
75
|
+
coder.run("make a script that prints hello world")
|
76
|
+
|
77
|
+
# Send another instruction
|
78
|
+
coder.run("make it say goodbye")
|
79
|
+
|
80
|
+
# You can run in-chat "/" commands too
|
81
|
+
coder.run("/tokens")
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
See the
|
86
|
+
[Coder.create() and Coder.__init__() methods](https://github.com/Aider-AI/aider/blob/main/aider/coders/base_coder.py)
|
87
|
+
for all the supported arguments.
|
88
|
+
|
89
|
+
It can also be helpful to set the equivalent of `--yes` by doing this:
|
90
|
+
|
91
|
+
```
|
92
|
+
from aider.io import InputOutput
|
93
|
+
io = InputOutput(yes=True)
|
94
|
+
# ...
|
95
|
+
coder = Coder.create(model=model, fnames=fnames, io=io)
|
96
|
+
```
|
97
|
+
|
98
|
+
{: .note }
|
99
|
+
The python scripting API is not officially supported or documented,
|
100
|
+
and could change in future releases without providing backwards compatibility.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
parent: Troubleshooting
|
3
|
+
nav_order: 28
|
4
|
+
---
|
5
|
+
|
6
|
+
# Aider not found
|
7
|
+
|
8
|
+
In some environments the `aider` command may not be available
|
9
|
+
on your shell path.
|
10
|
+
This can occur because of permissions/security settings in your OS,
|
11
|
+
and often happens to Windows users.
|
12
|
+
|
13
|
+
You may see an error message like this:
|
14
|
+
|
15
|
+
> aider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
|
16
|
+
|
17
|
+
Below is the most fail safe way to run aider in these situations:
|
18
|
+
|
19
|
+
```
|
20
|
+
python -m aider
|
21
|
+
```
|
22
|
+
|
23
|
+
You should also consider
|
24
|
+
[installing aider using aider-install, uv or pipx](/docs/install.html).
|
@@ -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)
|