devagent-cli 3.2.1__tar.gz
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.
- devagent_cli-3.2.1/LICENSE +21 -0
- devagent_cli-3.2.1/PKG-INFO +480 -0
- devagent_cli-3.2.1/README.md +454 -0
- devagent_cli-3.2.1/devagent/__init__.py +1 -0
- devagent_cli-3.2.1/devagent/app/__init__.py +1 -0
- devagent_cli-3.2.1/devagent/app/agent.py +717 -0
- devagent_cli-3.2.1/devagent/app/llm.py +83 -0
- devagent_cli-3.2.1/devagent/app/memory.py +309 -0
- devagent_cli-3.2.1/devagent/app/patcher.py +83 -0
- devagent_cli-3.2.1/devagent/app/planner.py +76 -0
- devagent_cli-3.2.1/devagent/app/reviewer.py +65 -0
- devagent_cli-3.2.1/devagent/app/sandbox.py +105 -0
- devagent_cli-3.2.1/devagent/app/state.py +113 -0
- devagent_cli-3.2.1/devagent/cli.py +282 -0
- devagent_cli-3.2.1/devagent/tools/__init__.py +1 -0
- devagent_cli-3.2.1/devagent/tools/benchmark_runner.py +184 -0
- devagent_cli-3.2.1/devagent/tools/file_ops.py +52 -0
- devagent_cli-3.2.1/devagent/tools/git_tools.py +91 -0
- devagent_cli-3.2.1/devagent/tools/linter.py +55 -0
- devagent_cli-3.2.1/devagent/tools/search.py +65 -0
- devagent_cli-3.2.1/devagent/tools/semantic_search.py +60 -0
- devagent_cli-3.2.1/devagent/tools/surgical_patcher.py +39 -0
- devagent_cli-3.2.1/devagent/tools/test_runner.py +143 -0
- devagent_cli-3.2.1/devagent/utils/__init__.py +1 -0
- devagent_cli-3.2.1/devagent/utils/config.py +116 -0
- devagent_cli-3.2.1/devagent/utils/logger.py +94 -0
- devagent_cli-3.2.1/devagent/utils/metrics.py +130 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/PKG-INFO +480 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/SOURCES.txt +33 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/dependency_links.txt +1 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/entry_points.txt +2 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/requires.txt +11 -0
- devagent_cli-3.2.1/devagent_cli.egg-info/top_level.txt +1 -0
- devagent_cli-3.2.1/pyproject.toml +43 -0
- devagent_cli-3.2.1/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vedant Jadhav
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: devagent-cli
|
|
3
|
+
Version: 3.2.1
|
|
4
|
+
Summary: Professional Local autonomous coding agent powered by Ollama
|
|
5
|
+
Author: Vedant Jadhav
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: ai,agent,coding,ollama,local,devagent,devagent-cli
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Topic :: Software Development :: Interpreters
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: rich
|
|
17
|
+
Requires-Dist: pytest
|
|
18
|
+
Requires-Dist: requests
|
|
19
|
+
Requires-Dist: ollama
|
|
20
|
+
Requires-Dist: faiss-cpu
|
|
21
|
+
Provides-Extra: semantic
|
|
22
|
+
Requires-Dist: sentence-transformers; extra == "semantic"
|
|
23
|
+
Provides-Extra: lint
|
|
24
|
+
Requires-Dist: flake8; extra == "lint"
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
<div align="center">
|
|
28
|
+
|
|
29
|
+
# π§ DevAgent
|
|
30
|
+
|
|
31
|
+
### A Lightweight Local Open-Source Miniature of Claude Code CLI
|
|
32
|
+
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
[](https://www.python.org/)
|
|
35
|
+
[](https://ollama.ai)
|
|
36
|
+
[](CONTRIBUTING.md)
|
|
37
|
+
[](https://github.com/VedantJadhav701/Developer-Code-Intelligence-Agent)
|
|
38
|
+
|
|
39
|
+
**A production-grade local coding agent that finds bugs, writes patches, reviews its own code, and validates with tests β all offline, all local, zero API costs.**
|
|
40
|
+
|
|
41
|
+
[Quick Start](#-quick-start) β’
|
|
42
|
+
[Architecture](#-architecture) β’
|
|
43
|
+
[Benchmarks](#-benchmarks) β’
|
|
44
|
+
[Roadmap](#-roadmap) β’
|
|
45
|
+
[Contributing](#-contributing)
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
## π€ Why DevAgent?
|
|
52
|
+
|
|
53
|
+
Most AI coding tools are **chatbots** β they suggest code, you copy-paste, you pray.
|
|
54
|
+
|
|
55
|
+
DevAgent is a **real agent** with a retrieval-first, tool-grounded architecture:
|
|
56
|
+
|
|
57
|
+
| | Chatbot | DevAgent |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| Searches your codebase | β | β
ripgrep + semantic search |
|
|
60
|
+
| Retrieves relevant code | β | β
FAISS embeddings |
|
|
61
|
+
| Plans before coding | β | β
Planner layer |
|
|
62
|
+
| Generates patches | β | β
Unified diffs |
|
|
63
|
+
| Reviews its own output | β | β
Self-critique loop |
|
|
64
|
+
| Runs your tests | β | β
pytest integration |
|
|
65
|
+
| Retries on failure | β | β
Up to N iterations |
|
|
66
|
+
| Works in sandbox | β | β
Isolated workspace |
|
|
67
|
+
| Works offline | β | β
100% local via Ollama |
|
|
68
|
+
| Costs money | πΈ | β
Free forever |
|
|
69
|
+
|
|
70
|
+
> **Philosophy:** Execution > Reasoning. Tools > Hallucination. Retrieval > Huge Context. Reliability > Intelligence.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## β¨ Features
|
|
75
|
+
|
|
76
|
+
π **ReAct Loop** β Thought β Action β Observation β Fix β Review β Test cycle
|
|
77
|
+
|
|
78
|
+
π§ **Planner** β LLM generates an action plan before coding
|
|
79
|
+
|
|
80
|
+
π **Semantic Search** β FAISS + sentence-transformers code retrieval
|
|
81
|
+
|
|
82
|
+
π **Code Search** β ripgrep-powered with cross-platform fallback
|
|
83
|
+
|
|
84
|
+
π **Self-Review** β LLM critiques its own fixes, revises until approved
|
|
85
|
+
|
|
86
|
+
π©Ή **Patch Engine** β Line-level unified diffs instead of full file rewrites
|
|
87
|
+
|
|
88
|
+
π§ͺ **Test-Driven** β Runs pytest after every fix, retries on failure
|
|
89
|
+
|
|
90
|
+
ποΈ **Sandbox Mode** β Agent works in an isolated copy, applies changes only on success
|
|
91
|
+
|
|
92
|
+
π **Benchmarks** β 5 built-in benchmark suites with automated evaluation
|
|
93
|
+
|
|
94
|
+
π **Metrics** β Latency, token estimates, retries, and performance tracking
|
|
95
|
+
|
|
96
|
+
π **Full Audit Trail** β Every step logged to `logs/run.json`
|
|
97
|
+
|
|
98
|
+
π **100% Offline** β Runs on Ollama with small models (2-4 GB)
|
|
99
|
+
|
|
100
|
+
β‘ **Low Resource** β Works on RTX 3050 (4 GB VRAM) / 16 GB RAM
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## π Quick Start
|
|
105
|
+
|
|
106
|
+
### Prerequisites
|
|
107
|
+
|
|
108
|
+
- [Python 3.11+](https://www.python.org/downloads/)
|
|
109
|
+
- [Ollama](https://ollama.ai) installed and running
|
|
110
|
+
|
|
111
|
+
### Install & Setup
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# 1. Clone
|
|
115
|
+
git clone https://github.com/VedantJadhav701/Developer-Code-Intelligence-Agent.git
|
|
116
|
+
cd Developer-Code-Intelligence-Agent
|
|
117
|
+
|
|
118
|
+
# 2. Install
|
|
119
|
+
pip install devagent-cli # (Coming soon to PyPI)
|
|
120
|
+
# Or locally: pip install -e .
|
|
121
|
+
|
|
122
|
+
# 3. Verify System (CRITICAL)
|
|
123
|
+
# This checks your Python environment, Ollama connection, and dependencies
|
|
124
|
+
devagent doctor
|
|
125
|
+
|
|
126
|
+
# 4. Pull the model
|
|
127
|
+
ollama pull qwen2.5-coder:3b
|
|
128
|
+
|
|
129
|
+
# 5. Run!
|
|
130
|
+
devagent run --task "Fix the divide-by-zero bug" --root ./demo_project
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### CLI Subcommands
|
|
134
|
+
|
|
135
|
+
| Command | Description |
|
|
136
|
+
|---|---|
|
|
137
|
+
| `devagent run` | Execute a coding task on a project |
|
|
138
|
+
| `devagent benchmark` | Run the automated benchmark suite |
|
|
139
|
+
| `devagent doctor` | Check system health and dependencies |
|
|
140
|
+
| `devagent models` | List available Ollama models |
|
|
141
|
+
| `devagent version` | Show current version |
|
|
142
|
+
|
|
143
|
+
### β¨ New: Trust & Safety
|
|
144
|
+
|
|
145
|
+
#### π‘οΈ Reliability Hardening (v3.2.1+)
|
|
146
|
+
DevAgent is now built for **Enterprise-grade reliability** in complex projects:
|
|
147
|
+
- **Path Anchoring**: Automatically corrects "root hallucinations." If the agent targets a file in a subdirectory but assumes it's at the root, the system auto-anchors it to the correct project location.
|
|
148
|
+
- **Forensic Test Detection**: Built-in intelligence to "see through" environment noise. It detects successful test runs even if unrelated parts of the repository have collection errors.
|
|
149
|
+
- **Confidence Scoring**: Every fix is graded (0-100%) based on test results, surgical precision, and self-review quality.
|
|
150
|
+
|
|
151
|
+
#### πΉοΈ Interactive Mode
|
|
152
|
+
Run with `--interactive` (or `-i`) to review diffs before they are applied to your project.
|
|
153
|
+
```bash
|
|
154
|
+
devagent run --task "Fix bug" --interactive
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## ποΈ Architecture
|
|
160
|
+
|
|
161
|
+
```mermaid
|
|
162
|
+
graph TD
|
|
163
|
+
CLI[DevAgent CLI] --> Orchestrator[ReAct Orchestrator]
|
|
164
|
+
Orchestrator --> Memory[Working Memory]
|
|
165
|
+
Orchestrator --> Retrieval[Semantic Retrieval FAISS]
|
|
166
|
+
Orchestrator --> Tools[Tool Suite: pytest, ripgrep, git]
|
|
167
|
+
Orchestrator --> Reviewer[Self-Review Loop]
|
|
168
|
+
Reviewer --> Patch[Surgical Patch Engine]
|
|
169
|
+
Patch --> Sandbox[Sandbox Environment]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
No API keys. No sign-ups. No cloud.
|
|
173
|
+
|
|
174
|
+
### Optional: Enable Semantic Search
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
pip install faiss-cpu sentence-transformers
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Without these, DevAgent falls back to keyword search β still fully functional.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## π¬ Demo
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
____ _ _
|
|
188
|
+
| _ \ _____ __/ \ __ _ ___ _ __ | |_
|
|
189
|
+
| | | |/ _ \ \ / / _ \ / _` |/ _ \ '_ \| __|
|
|
190
|
+
| |_| | __/\ V / ___ \ (_| | __/ | | | |_
|
|
191
|
+
|____/ \___| \_/_/ \_\__, |\___|_| |_|\__|
|
|
192
|
+
|___/
|
|
193
|
+
|
|
194
|
+
+==========================================================+
|
|
195
|
+
| DEVELOPER CODE INTELLIGENCE AGENT |
|
|
196
|
+
| Model: qwen2.5-coder:3b |
|
|
197
|
+
| Sandbox: OFF |
|
|
198
|
+
+==========================================================+
|
|
199
|
+
|
|
200
|
+
[PLAN] LIKELY_FILES: calculator.py
|
|
201
|
+
1. search_code: divide
|
|
202
|
+
2. read_file: calculator.py
|
|
203
|
+
3. run_tests
|
|
204
|
+
|
|
205
|
+
----------------------------------------
|
|
206
|
+
ITERATION 1/5
|
|
207
|
+
----------------------------------------
|
|
208
|
+
[TOOL] Executing: search_code(divide)
|
|
209
|
+
>> Found: calculator.py:10:def divide(a, b)
|
|
210
|
+
[REVIEW] #1: APPROVED
|
|
211
|
+
>> Tests: 5 passed β
|
|
212
|
+
|
|
213
|
+
[OK] AGENT COMPLETED SUCCESSFULLY
|
|
214
|
+
|
|
215
|
+
Status: success
|
|
216
|
+
Steps used: 1/5
|
|
217
|
+
Patches: 1
|
|
218
|
+
Time: 8.2s
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## ποΈ Architecture
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
βββββββββββββββββββββββββββββββ
|
|
227
|
+
β CLI (main.py) β
|
|
228
|
+
β --task --root --model β
|
|
229
|
+
β --sandbox --benchmark β
|
|
230
|
+
β --auto-commit --auto-push β
|
|
231
|
+
ββββββββββββ¬βββββββββββββββββββ
|
|
232
|
+
β
|
|
233
|
+
ββββββββββββΌβββββββββββββββββββ
|
|
234
|
+
β Planner Layer β
|
|
235
|
+
β Identifies files + strategy β
|
|
236
|
+
ββββββββββββ¬βββββββββββββββββββ
|
|
237
|
+
β
|
|
238
|
+
ββββββββββββΌβββββββββββββββββββ
|
|
239
|
+
β Retrieval Layer (Memory) β
|
|
240
|
+
β FAISS + Sentence-Transformersβ
|
|
241
|
+
β Chunk β Embed β Top-K β
|
|
242
|
+
ββββββββββββ¬βββββββββββββββββββ
|
|
243
|
+
β
|
|
244
|
+
ββββββββββββΌβββββββββββββββββββ
|
|
245
|
+
β ReAct Agent Loop β
|
|
246
|
+
β β
|
|
247
|
+
β 1. THOUGHT (LLM) β
|
|
248
|
+
β 2. ACTION (Tool) β
|
|
249
|
+
β 3. OBSERVATION β
|
|
250
|
+
β 4. FIX (LLM) β
|
|
251
|
+
β 5. REVIEW (LLM) β
|
|
252
|
+
β 6. PATCH (Diff Engine) β
|
|
253
|
+
β 7. TEST (pytest) β
|
|
254
|
+
β β
|
|
255
|
+
β if FAIL β retry β
|
|
256
|
+
β if PASS β done β β
|
|
257
|
+
ββββ¬βββββββββββββββ¬ββββββββββββ
|
|
258
|
+
β β
|
|
259
|
+
ββββββββββΌβββ ββββββββΌβββββββ
|
|
260
|
+
β Tools β β Ollama β
|
|
261
|
+
β β β (Local) β
|
|
262
|
+
β β’ search β β β
|
|
263
|
+
β β’ semanticβ β qwen2.5- β
|
|
264
|
+
β β’ read β β coder:3b β
|
|
265
|
+
β β’ patch β β phi3:mini β
|
|
266
|
+
β β’ pytest β β mistral:7b β
|
|
267
|
+
β β’ flake8 β β β
|
|
268
|
+
β β’ git_diffβ βββββββββββββββ
|
|
269
|
+
β β’ sandbox β
|
|
270
|
+
βββββββββββββ
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 9-Layer Architecture
|
|
274
|
+
|
|
275
|
+
| Layer | Module | Purpose |
|
|
276
|
+
|---|---|---|
|
|
277
|
+
| 1. CLI | `main.py` | Argument parsing, mode selection, banner |
|
|
278
|
+
| 2. Planner | `app/planner.py` | Task interpretation, file identification |
|
|
279
|
+
| 3. Retrieval | `app/memory.py` | FAISS index, semantic chunking, Top-K search |
|
|
280
|
+
| 4. Tools | `tools/*` | 8 real tools: search, semantic_search, read, write, test, lint, git, sandbox |
|
|
281
|
+
| 5. Agent | `app/agent.py` | ReAct orchestration loop |
|
|
282
|
+
| 6. Review | `app/reviewer.py` | Self-critique with APPROVED/REVISE |
|
|
283
|
+
| 7. Validation | `tools/test_runner.py` | pytest + flake8 execution feedback |
|
|
284
|
+
| 8. Logging | `utils/logger.py` | Structured JSON audit trail |
|
|
285
|
+
| 9. Safety | `app/sandbox.py` | Isolated workspace, path validation |
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## π Project Structure
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
Developer-Code-Intelligence-Agent/
|
|
293
|
+
βββ app/
|
|
294
|
+
β βββ agent.py # Core ReAct agent engine
|
|
295
|
+
β βββ planner.py # Task planning layer
|
|
296
|
+
β βββ reviewer.py # Self-review module
|
|
297
|
+
β βββ llm.py # Ollama integration
|
|
298
|
+
β βββ memory.py # FAISS retrieval + working memory
|
|
299
|
+
β βββ patcher.py # Unified diff patch engine
|
|
300
|
+
β βββ sandbox.py # Sandbox workspace manager
|
|
301
|
+
β βββ state.py # Shared state dataclass
|
|
302
|
+
βββ tools/
|
|
303
|
+
β βββ search.py # Code search (ripgrep + fallbacks)
|
|
304
|
+
β βββ semantic_search.py # FAISS semantic search
|
|
305
|
+
β βββ file_ops.py # Safe file read/write
|
|
306
|
+
β βββ test_runner.py # pytest runner
|
|
307
|
+
β βββ linter.py # flake8 linter
|
|
308
|
+
β βββ git_tools.py # Git diff/commit/push
|
|
309
|
+
β βββ benchmark_runner.py # Benchmark evaluation
|
|
310
|
+
βββ utils/
|
|
311
|
+
β βββ logger.py # Structured JSON logger
|
|
312
|
+
β βββ config.py # Centralized configuration
|
|
313
|
+
β βββ metrics.py # Performance metrics
|
|
314
|
+
βββ benchmarks/
|
|
315
|
+
β βββ divide_by_zero/ # Benchmark: zero division guard
|
|
316
|
+
β βββ missing_validation/ # Benchmark: input validation
|
|
317
|
+
β βββ syntax_error/ # Benchmark: syntax fix
|
|
318
|
+
β βββ import_bug/ # Benchmark: wrong import
|
|
319
|
+
β βββ edge_case/ # Benchmark: empty list handling
|
|
320
|
+
βββ demo_project/ # Sample buggy project
|
|
321
|
+
βββ docs/
|
|
322
|
+
β βββ USER_GUIDE.md # Full usage guide
|
|
323
|
+
βββ main.py # CLI entry point
|
|
324
|
+
βββ devagent.py # Global CLI wrapper
|
|
325
|
+
βββ devagent.bat # Windows global shortcut
|
|
326
|
+
βββ requirements.txt
|
|
327
|
+
βββ CONTRIBUTING.md
|
|
328
|
+
βββ CHANGELOG.md
|
|
329
|
+
βββ CODE_OF_CONDUCT.md
|
|
330
|
+
βββ SECURITY.md
|
|
331
|
+
βββ LICENSE
|
|
332
|
+
βββ README.md
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## π» CLI Reference
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
python main.py --task "TASK" --root ./project [OPTIONS]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
| Flag | Default | Description |
|
|
344
|
+
|---|---|---|
|
|
345
|
+
| `--task`, `-t` | *(required)* | The coding task for the agent |
|
|
346
|
+
| `--root`, `-r` | `.` | Project root directory |
|
|
347
|
+
| `--model` | `qwen2.5-coder:3b` | Any Ollama model |
|
|
348
|
+
| `--max-steps`, `-m` | `5` | Max ReAct iterations |
|
|
349
|
+
| `--benchmark` | off | Run benchmark suite |
|
|
350
|
+
| `--sandbox` | off | Run in isolated sandbox |
|
|
351
|
+
| `--auto-commit` | off | Git commit on success |
|
|
352
|
+
| `--auto-push` | off | Git push after commit |
|
|
353
|
+
| `--verbose`, `-v` | off | Verbose output |
|
|
354
|
+
|
|
355
|
+
### Examples
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
# Fix a specific bug
|
|
359
|
+
python main.py -t "Fix the TypeError in user_service.py" -r ./backend
|
|
360
|
+
|
|
361
|
+
# Run in sandbox mode (safe β doesn't touch real files until success)
|
|
362
|
+
python main.py -t "Fix divide-by-zero bug" -r ./project --sandbox
|
|
363
|
+
|
|
364
|
+
# Auto-commit changes on success
|
|
365
|
+
python main.py -t "Add input validation" -r ./api --auto-commit
|
|
366
|
+
|
|
367
|
+
# Use a stronger model
|
|
368
|
+
python main.py -t "Refactor auth middleware" -r ./server --model mistral:7b
|
|
369
|
+
|
|
370
|
+
# Run benchmarks
|
|
371
|
+
python main.py --benchmark
|
|
372
|
+
|
|
373
|
+
# More retries for complex tasks
|
|
374
|
+
python main.py -t "Make all tests pass" -r ./project --max-steps 10
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
> π **[Full User Guide β](docs/USER_GUIDE.md)**
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## π Benchmarks
|
|
382
|
+
|
|
383
|
+
DevAgent includes 5 built-in benchmarks to evaluate agent performance:
|
|
384
|
+
|
|
385
|
+
| Benchmark | Bug Type | Difficulty |
|
|
386
|
+
|---|---|---|
|
|
387
|
+
| `divide_by_zero` | Missing guard clause | Easy |
|
|
388
|
+
| `missing_validation` | No input validation | Medium |
|
|
389
|
+
| `syntax_error` | Broken syntax | Medium |
|
|
390
|
+
| `import_bug` | Wrong module name | Easy |
|
|
391
|
+
| `edge_case` | Empty list crash | Medium |
|
|
392
|
+
|
|
393
|
+
Run benchmarks:
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
python main.py --benchmark
|
|
397
|
+
python main.py --benchmark --model phi3:mini
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## π§ Supported Models
|
|
403
|
+
|
|
404
|
+
| Model | Size | Speed | Quality | Best For |
|
|
405
|
+
|---|---|---|---|---|
|
|
406
|
+
| `qwen2.5-coder:3b` | 1.9 GB | β‘ Fast | β
β
β
β
| **Default β best for code** |
|
|
407
|
+
| `qwen2.5:3b` | 1.9 GB | β‘ Fast | β
β
β
β | General fallback |
|
|
408
|
+
| `phi3:mini` | 2.2 GB | β‘ Fast | β
β
β
β | Good reasoning |
|
|
409
|
+
| `qwen3:4b` | 2.5 GB | β‘ Fast | β
β
β
β
| Better understanding |
|
|
410
|
+
| `gemma2:2b` | 1.6 GB | β‘β‘ | β
β
ββ | Ultra-low resource |
|
|
411
|
+
| `mistral:7b` | 4.4 GB | π’ | β
β
β
β
β
| Best quality (8GB+ RAM) |
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## πΊοΈ Roadmap
|
|
416
|
+
|
|
417
|
+
### β
Completed (v2.0)
|
|
418
|
+
|
|
419
|
+
- [x] Core ReAct agent loop
|
|
420
|
+
- [x] Self-review module
|
|
421
|
+
- [x] Tool system (9 tools)
|
|
422
|
+
- [x] Planner layer
|
|
423
|
+
- [x] Semantic retrieval (FAISS)
|
|
424
|
+
- [x] Patch engine (unified diffs)
|
|
425
|
+
- [x] Sandbox mode
|
|
426
|
+
- [x] Benchmark system (5 suites)
|
|
427
|
+
- [x] Metrics + structured logging
|
|
428
|
+
- [x] Git integration
|
|
429
|
+
- [x] CLI with all flags
|
|
430
|
+
|
|
431
|
+
### π Coming Next
|
|
432
|
+
|
|
433
|
+
- [ ] **Multi-file support** β Agent works across multiple files simultaneously
|
|
434
|
+
- [ ] **Language support** β JavaScript, TypeScript, Go, Rust
|
|
435
|
+
- [ ] **Plugin system** β Custom tools via YAML/Python
|
|
436
|
+
- [ ] **Watch mode** β Auto-fix on test failure (`--watch`)
|
|
437
|
+
- [ ] **VS Code extension** β Run agent from your editor
|
|
438
|
+
- [ ] **Conversation memory** β Learn from past runs
|
|
439
|
+
- [ ] **Multi-agent mode** β Planner + Coder + Reviewer + Evaluator agents
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## π€ Contributing
|
|
444
|
+
|
|
445
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
git checkout -b feature/your-feature
|
|
449
|
+
# ... make changes ...
|
|
450
|
+
python -m pytest demo_project/ -v
|
|
451
|
+
git commit -m "feat: your feature"
|
|
452
|
+
git push origin feature/your-feature
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Good first issues** are tagged and waiting:
|
|
456
|
+
[Browse good first issues β](https://github.com/VedantJadhav701/Developer-Code-Intelligence-Agent/labels/good%20first%20issue)
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## π License
|
|
461
|
+
|
|
462
|
+
MIT β use it however you want. See [LICENSE](LICENSE).
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## β Star History
|
|
467
|
+
|
|
468
|
+
If DevAgent helps you, give it a star! It helps others discover the project.
|
|
469
|
+
|
|
470
|
+
[](https://star-history.com/#VedantJadhav701/Developer-Code-Intelligence-Agent&Date)
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
<div align="center">
|
|
475
|
+
|
|
476
|
+
**Built with π§ by [Vedant Jadhav](https://github.com/VedantJadhav701)**
|
|
477
|
+
|
|
478
|
+
*A lightweight local open-source miniature of Claude Code CLI.*
|
|
479
|
+
|
|
480
|
+
</div>
|