You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`agent_id`| The ID of a Coder agent (required) |`string`| - |
36
+
|`folder`| The folder to run Aider in |`string`|`/home/coder`|
37
+
|`install_aider`| Whether to install Aider |`bool`|`true`|
38
+
|`aider_version`| The version of Aider to install |`string`|`"latest"`|
39
+
|`use_screen`| Whether to use screen for running Aider in the background |`bool`|`true`|
40
+
|`use_tmux`| Whether to use tmux instead of screen for running Aider in the background |`bool`|`false`|
41
+
|`session_name`| Name for the persistent session (screen or tmux) |`string`|`"aider"`|
42
+
|`order`| Position of the app in the UI presentation |`number`|`null`|
43
+
|`icon`| The icon to use for the app |`string`|`"/icon/aider.svg"`|
44
+
|`experiment_report_tasks`| Whether to enable task reporting |`bool`|`true`|
45
+
|`experiment_pre_install_script`| Custom script to run before installing Aider |`string`|`null`|
46
+
|`experiment_post_install_script`| Custom script to run after installing Aider |`string`|`null`|
47
+
|`experiment_additional_extensions`| Additional extensions configuration in YAML format to append to the config |`string`|`null`|
47
48
48
49
## Usage Examples
49
50
@@ -59,6 +60,14 @@ module "aider" {
59
60
}
60
61
```
61
62
63
+
This basic setup will:
64
+
65
+
- Install Aider in the workspace
66
+
- Create a persistent screen session named "aider"
67
+
- Enable task reporting (configures Aider to report tasks to Coder MCP)
68
+
69
+
To fully utilize the task reporting feature, you'll need to add the Coder Login module and configure environment variables as shown in the Task Reporting section below.
70
+
62
71
### With API key via environment variables
63
72
64
73
```tf
@@ -127,6 +136,13 @@ module "aider" {
127
136
Your workspace must have either `screen` or `tmux` installed to use this.
This example provides the full configuration needed to use task reporting with an initial AI prompt. The Aider module has task reporting enabled by default, so you only need to add the Coder Login module and configure the necessary environment variables.
202
+
203
+
### Adding Custom Extensions (Experimental)
204
+
205
+
You can extend Aider's capabilities by adding custom extensions. For example, to add a custom extension:
206
+
207
+
```tf
208
+
module "aider" {
209
+
count = data.coder_workspace.me.start_count
210
+
source = "registry.coder.com/modules/aider/coder"
211
+
version = "1.0.0"
212
+
agent_id = coder_agent.example.id
213
+
folder = "/home/coder"
214
+
215
+
experiment_report_tasks = true
216
+
217
+
experiment_pre_install_script = <<-EOT
218
+
pip install some-custom-dependency
219
+
EOT
220
+
221
+
experiment_additional_extensions = <<-EOT
222
+
custom-extension:
223
+
args: []
224
+
cmd: custom-extension-command
225
+
description: A custom extension for Aider
226
+
enabled: true
227
+
envs: {}
228
+
name: custom-extension
229
+
timeout: 300
230
+
type: stdio
231
+
EOT
232
+
}
233
+
```
234
+
235
+
This will add your custom extension to Aider's configuration, allowing it to interact with external tools or services. The extension configuration follows the YAML format and is appended to Aider's configuration.
236
+
237
+
Note: The indentation in the heredoc is preserved, so you can write the YAML naturally.
238
+
192
239
## Using Aider in Your Workspace
193
240
194
241
After the workspace starts, Aider will be installed and configured according to your parameters. A persistent session will automatically be started during workspace creation.
@@ -233,11 +280,10 @@ When enabled, the task reporting feature allows you to:
233
280
- Monitor task progress in the Coder UI
234
281
- Use the `coder_parameter` resource to collect prompts from users
235
282
236
-
To enable task reporting:
283
+
Task reporting is **enabled by default** in this module. To use it effectively:
237
284
238
-
1. Set `experiment_report_tasks = true` in the module configuration
239
-
2. Add the Coder Login module to your template
240
-
3. Configure environment variables using `coder_env`:
285
+
1. Add the Coder Login module to your template
286
+
2. Configure environment variables using `coder_env`:
241
287
242
288
```tf
243
289
resource "coder_env" "task_prompt" {
@@ -253,6 +299,18 @@ To enable task reporting:
253
299
}
254
300
```
255
301
302
+
If you want to disable task reporting, set `experiment_report_tasks = false` in your module configuration.
303
+
304
+
The module integrates Aider with Coder's MCP by:
305
+
306
+
1. Creating a config file at `~/.config/aider/config.yml` with MCP extensions
307
+
2. Configuring the Coder extension to communicate with the Coder MCP server
308
+
3. Setting up appropriate parameters like app status slug and timeout values
309
+
310
+
This enables Aider to report task progress and statuses to the Coder UI without requiring manual command execution. The extension communicates with Coder's activity endpoints to provide real-time task status updates.
311
+
312
+
You can also add custom extensions by using the `experiment_additional_extensions` parameter in your module configuration. These will be automatically added to the Aider configuration.
313
+
256
314
See the "With task reporting and initial prompt" example above for a complete configuration.
0 commit comments