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
Merge origin/ui: integrate website, banner, and metadata-aware CLI
Resolves divergence (2 local / 14 remote commits) on the ui branch by
merging origin/ui. Remote contributed the project_meta.json flow,
URL-based project-name extraction, the public website, and architecture
banner. Local contributed the UI-mode console suppression.
Conflict resolution in main.py: kept remote helpers and variable usage
(local versions referenced undefined `project_name` in scope and used
the `name` click option which can be None), then re-applied local's
intent by wrapping the `run` command's task-info prints in
`if not config.ui_mode`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
> ICSE-NIER ’26 paper: [Setup AGent (SAG)](https://doi.org/10.1145/3786582.3786818) — Wei et al. The paper will be available soon this April.
7
+
8
+
9
+
6
10
**SAG (Setup-Agent)** is an advanced AI agent designed to fully automate the initial setup, configuration, and ongoing tasks for any software project. It operates within an isolated Docker environment, intelligently interacting with project files, shell commands, and web resources to transform hours—or even days—of manual setup into a process that takes just a few minutes.
7
11
8
12
## 🔦 Highlights
@@ -186,10 +190,95 @@ uv run sag shell sag-fastapi
186
190
uv run sag remove sag-fastapi
187
191
```
188
192
193
+
### 4. Debugging & Troubleshooting
194
+
195
+
When a setup fails or you want to understand what the agent did, SAG provides several debugging tools:
196
+
197
+
#### Enable Verbose Mode & Recording
198
+
199
+
```bash
200
+
# Run with verbose output for detailed logs
201
+
uv run sag --verbose project https://github.com/example/repo.git
202
+
203
+
# Save artifacts locally for post-run inspection
204
+
uv run sag project https://github.com/example/repo.git --record
205
+
206
+
# Combine both for maximum visibility
207
+
uv run sag --verbose project https://github.com/example/repo.git --record
208
+
```
209
+
210
+
#### Inspect Container Context Files
211
+
212
+
The agent stores execution context inside the container under `/workspace/.setup_agent/`:
213
+
214
+
```bash
215
+
# List all context files
216
+
docker exec sag-<project> ls -la /workspace/.setup_agent/contexts/
217
+
218
+
# Read the trunk context (main task list and overall status)
| Java version mismatch |`docker exec sag-<project> java -version` and check for `RequireJavaVersion` in logs |
259
+
| Missing dependencies |`docker exec sag-<project> which mvn npm gradle`|
260
+
| Empty tool outputs | Check if stderr is captured in context files |
261
+
| Agent stuck in loop | Review trunk context TODO list for repetitive patterns |
262
+
263
+
#### Interactive Debugging
264
+
265
+
```bash
266
+
# Connect to the container shell for manual investigation
267
+
uv run sag shell sag-<project>
268
+
269
+
# Inside the container, you can:
270
+
# - Run build commands manually
271
+
# - Check environment variables
272
+
# - Inspect project files
273
+
# - Review logs in /workspace/.setup_agent/
274
+
```
275
+
189
276
## 🛠️ CLI Command Reference
190
277
191
278
SAG provides a clean and powerful set of CLI commands.
192
279
280
+
### Commands
281
+
193
282
| Command | Description | Example |
194
283
|---|---|---|
195
284
|`sag project <url>`| Initializes the setup for a new project from a Git repository URL. |`sag project https://github.com/pallets/flask.git`|
@@ -200,9 +289,54 @@ SAG provides a clean and powerful set of CLI commands.
200
289
|`sag version`| Displays SAG's version information. |`sag version`|
201
290
|`sag --help`| Shows the help message. |`sag --help`|
202
291
203
-
**Global Options:**
204
-
-`--log-level [DEBUG|INFO|...]`: Overrides the log level set in the `.env` file.
205
-
-`--log-file <path>`: Specifies a custom path for the log file.
292
+
### Global Options
293
+
294
+
| Option | Description |
295
+
|---|---|
296
+
|`--log-level [DEBUG\|INFO\|WARNING\|ERROR]`| Overrides the log level set in the `.env` file. |
297
+
|`--log-file <path>`| Specifies a custom path for the log file. |
298
+
|`--verbose`| Enable verbose debugging output with detailed logs. |
299
+
300
+
### Command-Specific Options
301
+
302
+
#### `sag project <url>`
303
+
304
+
| Option | Description |
305
+
|---|---|
306
+
|`--name <name>`| Override the Docker container name (default: extracted from URL). **Note:** This only affects the Docker container/volume naming (`sag-<name>`), not the project directory name. The cloned repository will always use the directory name from the URL. |
307
+
|`--goal <goal>`| Custom setup goal (default: auto-generated based on project name). |
308
+
|`--record`| Save setup artifacts (contexts, reports) to local session logs for debugging and auditing. |
309
+
310
+
**Example with custom Docker name:**
311
+
```bash
312
+
# Clone commons-cli but name the Docker container "cli-test"
313
+
sag project https://github.com/apache/commons-cli.git --name cli-test
0 commit comments