1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
From 83128a2adb3c979d03edbeaf0913948a73f038fe Mon Sep 17 00:00:00 2001
From: Claudia Pellegrino <claui@users.noreply.github.com>
Date: Thu, 3 Jul 2025 14:02:50 +0200
Subject: [PATCH 1/5] AUR-specific: replace auto-updater with a notice
---
aider/versioncheck.py | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/aider/versioncheck.py b/aider/versioncheck.py
index ac511a02..be67ef10 100644
--- a/aider/versioncheck.py
+++ b/aider/versioncheck.py
@@ -1,5 +1,4 @@
import os
-import sys
import time
from pathlib import Path
@@ -36,29 +35,11 @@ def install_upgrade(io, latest_version=None):
else:
new_ver_text = "Install latest version of aider?"
- docker_image = os.environ.get("AIDER_DOCKER_IMAGE")
- if docker_image:
- text = f"""
-{new_ver_text} To upgrade, run:
-
- docker pull {docker_image}
+ text = f"""
+{new_ver_text} To upgrade, use the latest version available on the AUR.
"""
- io.tool_warning(text)
- return True
-
- success = utils.check_pip_install_extra(
- io,
- None,
- new_ver_text,
- ["aider-chat"],
- self_update=True,
- )
-
- if success:
- io.tool_output("Re-run aider to use new version.")
- sys.exit()
-
- return
+ io.tool_warning(text)
+ return True
def check_version(io, just_check=False, verbose=False):
--
2.50.0
From 2a8fc2891c59f531d4613dab9a42f50d72c107c9 Mon Sep 17 00:00:00 2001
From: Claudia Pellegrino <claui@users.noreply.github.com>
Date: Thu, 3 Jul 2025 14:03:36 +0200
Subject: [PATCH 2/5] AUR-specific: replace `/help` feature installer
The interactive `/help` feature requires an optional package from the
AUR. Replace the automatic installer with a notice that asks the user
to download and install the package by themselves.
---
aider/help.py | 11 ++---------
aider/utils.py | 15 +++++++++++++++
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/aider/help.py b/aider/help.py
index c76188d1..c8772f0b 100755
--- a/aider/help.py
+++ b/aider/help.py
@@ -16,18 +16,11 @@ warnings.simplefilter("ignore", category=FutureWarning)
def install_help_extra(io):
- pip_install_cmd = [
- "aider-chat[help]",
- "--extra-index-url",
- "https://download.pytorch.org/whl/cpu",
- ]
- res = utils.check_pip_install_extra(
+ return utils.check_aur_package(
io,
"llama_index.embeddings.huggingface",
- "To use interactive /help you need to install the help extras",
- pip_install_cmd,
+ "python-llama-index-embeddings-huggingface",
)
- return res
def get_package_files():
diff --git a/aider/utils.py b/aider/utils.py
index a58fde66..deaa7150 100644
--- a/aider/utils.py
+++ b/aider/utils.py
@@ -292,6 +292,21 @@ def touch_file(fname):
return False
+def check_aur_package(io, module, aur_package):
+ if module:
+ try:
+ __import__(module)
+ return True
+ except (ImportError, ModuleNotFoundError, RuntimeError):
+ pass
+
+ io.tool_error(f"""
+ This feature requires the following package from the AUR:
+
+ {aur_package}
+""")
+
+
def check_pip_install_extra(io, module, prompt, pip_install_cmd, self_update=False):
if module:
try:
--
2.50.0
From feb79ce03b9b9ff3cfaacbf47ad6372419970ea7 Mon Sep 17 00:00:00 2001
From: Claudia Pellegrino <claui@users.noreply.github.com>
Date: Thu, 3 Jul 2025 14:04:12 +0200
Subject: [PATCH 3/5] AUR-specific: replace google-aiplatform installer
---
aider/models.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/aider/models.py b/aider/models.py
index 27a483dd..77438d96 100644
--- a/aider/models.py
+++ b/aider/models.py
@@ -21,7 +21,7 @@ from aider.dump import dump # noqa: F401
from aider.llm import litellm
from aider.openrouter import OpenRouterModelManager
from aider.sendchat import ensure_alternating_roles, sanity_check_messages
-from aider.utils import check_archlinux_package, check_pip_install_extra
+from aider.utils import check_archlinux_package, check_aur_package
RETRY_TIMEOUT = 60
@@ -1171,11 +1171,10 @@ def check_for_dependencies(io, model_name):
# Check if this is a Vertex AI model and ensure google-cloud-aiplatform is installed
elif model_name.startswith("vertex_ai/"):
- check_pip_install_extra(
+ check_aur_package(
io,
"google.cloud.aiplatform",
- "Google Vertex AI models require the google-cloud-aiplatform package.",
- ["google-cloud-aiplatform"],
+ "python-google-cloud-aiplatform",
)
--
2.50.0
From a6cb3b805c674d19ce46102effee27d095336a51 Mon Sep 17 00:00:00 2001
From: Claudia Pellegrino <claui@users.noreply.github.com>
Date: Thu, 3 Jul 2025 14:04:52 +0200
Subject: [PATCH 4/5] AUR-specific: replace main branch auto-upgrader
Ask user to download and install the `aider-chat-git` package if they
wish to follow the main development branch.
---
aider/versioncheck.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/aider/versioncheck.py b/aider/versioncheck.py
index be67ef10..2a6c18c5 100644
--- a/aider/versioncheck.py
+++ b/aider/versioncheck.py
@@ -16,12 +16,10 @@ def install_from_main_branch(io):
Install the latest version of aider from the main branch of the GitHub repository.
"""
- return utils.check_pip_install_extra(
+ return utils.check_aur_package(
io,
None,
- "Install the development version of aider from the main branch?",
- ["git+https://github.com/Aider-AI/aider.git"],
- self_update=True,
+ "aider-chat-git",
)
--
2.50.0
From 31583222c3c3bdd55e60b8f85e17c38cce5b28b7 Mon Sep 17 00:00:00 2001
From: Claudia Pellegrino <claui@users.noreply.github.com>
Date: Thu, 3 Jul 2025 14:06:07 +0200
Subject: [PATCH 5/5] AUR-specific: replace GUI feature installer
---
aider/main.py | 5 ++--
aider/utils.py | 62 --------------------------------------------------
2 files changed, 2 insertions(+), 65 deletions(-)
diff --git a/aider/main.py b/aider/main.py
index afb3f836..da51b767 100644
--- a/aider/main.py
+++ b/aider/main.py
@@ -206,11 +206,10 @@ def check_gitignore(git_root, io, ask=True):
def check_streamlit_install(io):
- return utils.check_pip_install_extra(
+ return utils.check_aur_package(
io,
"streamlit",
- "You need to install the aider browser feature",
- ["aider-chat[browser]"],
+ "python-streamlit",
)
diff --git a/aider/utils.py b/aider/utils.py
index deaa7150..43918482 100644
--- a/aider/utils.py
+++ b/aider/utils.py
@@ -1,5 +1,4 @@
import os
-import platform
import subprocess
import sys
import tempfile
@@ -193,31 +192,10 @@ def split_chat_history_markdown(text, include_tool=False):
return messages
-def get_pip_install(args):
- cmd = [
- sys.executable,
- "-m",
- "pip",
- "install",
- "--upgrade",
- "--upgrade-strategy",
- "only-if-needed",
- ]
- cmd += args
- return cmd
-
-
def run_install(cmd):
print()
print("Installing:", printable_shell_command(cmd))
- # First ensure pip is available
- ensurepip_cmd = [sys.executable, "-m", "ensurepip", "--upgrade"]
- try:
- subprocess.run(ensurepip_cmd, capture_output=True, check=False)
- except Exception:
- pass # Continue even if ensurepip fails
-
try:
output = []
process = subprocess.Popen(
@@ -307,46 +285,6 @@ def check_aur_package(io, module, aur_package):
""")
-def check_pip_install_extra(io, module, prompt, pip_install_cmd, self_update=False):
- if module:
- try:
- __import__(module)
- return True
- except (ImportError, ModuleNotFoundError, RuntimeError):
- pass
-
- cmd = get_pip_install(pip_install_cmd)
-
- if prompt:
- io.tool_warning(prompt)
-
- if self_update and platform.system() == "Windows":
- io.tool_output("Run this command to update:")
- print()
- print(printable_shell_command(cmd)) # plain print so it doesn't line-wrap
- return
-
- if not io.confirm_ask("Run pip install?", default="y", subject=printable_shell_command(cmd)):
- return
-
- success, output = run_install(cmd)
- if success:
- if not module:
- return True
- try:
- __import__(module)
- return True
- except (ImportError, ModuleNotFoundError, RuntimeError) as err:
- io.tool_error(str(err))
- pass
-
- io.tool_error(output)
-
- print()
- print("Install failed, try running this command manually:")
- print(printable_shell_command(cmd))
-
-
def check_archlinux_package(io, module, archlinux_package):
if module:
try:
--
2.50.0
|