agdi 2.4.0 โ 2.5.0
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.
- package/README.md +340 -93
- package/dist/index.js +587 -108
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,150 +1,397 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```
|
|
4
|
+
___ __ _
|
|
5
|
+
/ | ____ _____/ /(_)
|
|
6
|
+
/ /| | / __ `/ __ // /
|
|
7
|
+
/ ___ |/ /_/ / /_/ // /
|
|
8
|
+
/_/ |_|\_, /\__,_//_/
|
|
9
|
+
/____/
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
# agdi
|
|
13
|
+
|
|
14
|
+
### The AI-Powered Coding Assistant for Your Terminal
|
|
15
|
+
|
|
16
|
+
[](https://www.npmjs.com/package/agdi)
|
|
17
|
+
[](https://www.npmjs.com/package/agdi)
|
|
18
|
+
[](https://opensource.org/licenses/MIT)
|
|
19
|
+
[](https://nodejs.org/)
|
|
20
|
+
[](https://www.typescriptlang.org/)
|
|
4
21
|
|
|
5
|
-
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
22
|
+
**Build full-stack apps from natural language โข AI-powered Git workflow โข Enterprise-grade security**
|
|
7
23
|
|
|
8
|
-
|
|
24
|
+
[Website](https://agdi-dev.vercel.app) ยท [npm](https://www.npmjs.com/package/agdi) ยท [GitHub](https://github.com/anassagd432/Agdi-dev)
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## โก Quick Start
|
|
9
31
|
|
|
10
32
|
```bash
|
|
33
|
+
# Install globally
|
|
11
34
|
npm install -g agdi
|
|
35
|
+
|
|
36
|
+
# Start coding
|
|
37
|
+
agdi
|
|
12
38
|
```
|
|
13
39
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
40
|
+
That's it. Agdi handles the rest.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ๐ฌ Demo
|
|
45
|
+
|
|
17
46
|
```
|
|
47
|
+
$ agdi
|
|
18
48
|
|
|
19
|
-
|
|
49
|
+
โก Agdi dev
|
|
20
50
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
51
|
+
Model: gemini-2.5-flash
|
|
52
|
+
Workspace: ~/projects/my-app
|
|
53
|
+
Commands: /status, /diff, /commit, /build, /clear, /history, /model, /help, /exit
|
|
24
54
|
|
|
25
|
-
|
|
26
|
-
agdi generate "Create a todo app with dark mode"
|
|
55
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
27
56
|
|
|
28
|
-
|
|
29
|
-
agdi chat
|
|
57
|
+
โ create a todo app with dark mode and local storage
|
|
30
58
|
|
|
31
|
-
|
|
32
|
-
|
|
59
|
+
Generating action plan...
|
|
60
|
+
|
|
61
|
+
๐ Action Plan - todo-app
|
|
62
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
63
|
+
โ mkdir src
|
|
64
|
+
โ writeFile package.json
|
|
65
|
+
โ writeFile src/App.tsx
|
|
66
|
+
โ writeFile src/index.css
|
|
67
|
+
โ exec pnpm install
|
|
68
|
+
|
|
69
|
+
โ
Project created! Run: cd todo-app && pnpm dev
|
|
33
70
|
```
|
|
34
71
|
|
|
35
|
-
|
|
72
|
+
---
|
|
36
73
|
|
|
37
|
-
|
|
38
|
-
- ๐ค **400+ AI Models** - GPT-5, Claude 4.5, Gemini 3, Llama 4, and more
|
|
39
|
-
- โก **Instant Generation** - Full React/Vite apps in seconds
|
|
40
|
-
- ๐ฌ **Interactive Mode** - Chat-based coding assistant
|
|
41
|
-
- ๐ **Bring Your Own Key** - Use your own OpenAI, Anthropic, or Gemini keys
|
|
42
|
-
- ๐ **Enterprise Security** - Permission gate, audit logging, workspace trust
|
|
74
|
+
## โจ Features
|
|
43
75
|
|
|
44
|
-
|
|
76
|
+
<table>
|
|
77
|
+
<tr>
|
|
78
|
+
<td width="50%">
|
|
45
79
|
|
|
46
|
-
|
|
80
|
+
### ๐ค AI-Powered Development
|
|
81
|
+
- **Natural language to code** โ Describe what you want, get production-ready apps
|
|
82
|
+
- **Conversation memory** โ AI remembers context across messages
|
|
83
|
+
- **Multi-turn chat** โ Iterative development with full context
|
|
47
84
|
|
|
48
|
-
|
|
85
|
+
</td>
|
|
86
|
+
<td width="50%">
|
|
49
87
|
|
|
50
|
-
|
|
88
|
+
### ๐ง Built-in Git Integration
|
|
89
|
+
- `/status` โ AI analysis of your repo state
|
|
90
|
+
- `/diff` โ Smart explanation of your changes
|
|
91
|
+
- `/commit` โ Auto-generated conventional commits
|
|
51
92
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
| **2** | System/package | `npm install`, `docker run` |
|
|
57
|
-
| **3** | Dangerous | `sudo`, `rm -rf`, `curl \| bash` |
|
|
93
|
+
</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<td width="50%">
|
|
58
97
|
|
|
59
|
-
###
|
|
98
|
+
### ๐ก๏ธ Enterprise Security
|
|
99
|
+
- **Permission Gate** โ 4-tier command risk classification
|
|
100
|
+
- **Workspace Trust** โ Per-directory security boundaries
|
|
101
|
+
- **Code Firewall** โ Real-time secret/injection scanning
|
|
102
|
+
- **Audit Logging** โ OWASP-aligned decision logs
|
|
60
103
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **[S] Approve for session** - Allow for current session
|
|
64
|
-
- **[+] Always allow** - Save rule to allow permanently
|
|
65
|
-
- **[?] Always prompt** - Save rule to always ask
|
|
66
|
-
- **[-] Always forbid** - Save rule to always block
|
|
67
|
-
- **[D] Deny** - Block this execution
|
|
104
|
+
</td>
|
|
105
|
+
<td width="50%">
|
|
68
106
|
|
|
69
|
-
###
|
|
107
|
+
### ๐ Multi-Provider AI
|
|
108
|
+
- **Gemini** โ Free tier, fast responses
|
|
109
|
+
- **OpenRouter** โ 400+ models, one API
|
|
110
|
+
- **OpenAI** โ GPT-4o, o1 reasoning
|
|
111
|
+
- **Anthropic** โ Claude 3.5 Sonnet
|
|
112
|
+
- **DeepSeek** โ R1, V3 models
|
|
70
113
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- **Exit** - Don't grant trust, exit immediately
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
</table>
|
|
75
117
|
|
|
76
|
-
|
|
118
|
+
---
|
|
77
119
|
|
|
78
|
-
|
|
120
|
+
## ๐ Commands Reference
|
|
79
121
|
|
|
80
|
-
|
|
122
|
+
### Interactive Mode (Default)
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
agdi # Start interactive coding session
|
|
126
|
+
```
|
|
81
127
|
|
|
82
|
-
|
|
128
|
+
Inside the session:
|
|
83
129
|
|
|
84
130
|
| Command | Description |
|
|
85
131
|
|---------|-------------|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
|
|
93
|
-
|
|
132
|
+
| `/build <prompt>` | Generate & execute an app from description |
|
|
133
|
+
| `/edit <file>` | AI-powered surgical file editing |
|
|
134
|
+
| `/status` | AI analysis of git status |
|
|
135
|
+
| `/diff` | AI explanation of current changes |
|
|
136
|
+
| `/commit` | Auto-generate & run git commit |
|
|
137
|
+
| `/clear` | Clear conversation history |
|
|
138
|
+
| `/history` | Show recent conversation |
|
|
139
|
+
| `/model` | Change AI model |
|
|
140
|
+
| `/help` | Show all commands |
|
|
141
|
+
| `/exit` | Exit Agdi |
|
|
142
|
+
|
|
143
|
+
### Direct Commands
|
|
94
144
|
|
|
95
145
|
```bash
|
|
96
|
-
#
|
|
97
|
-
agdi
|
|
146
|
+
agdi build "todo app" # Generate app directly
|
|
147
|
+
agdi chat # Simple chat mode
|
|
148
|
+
agdi auth # Configure API keys
|
|
149
|
+
agdi model # Change AI model
|
|
150
|
+
agdi config # Show configuration
|
|
151
|
+
agdi run [dir] # Run a generated project
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## ๐ก๏ธ Security Architecture
|
|
157
|
+
|
|
158
|
+
Agdi includes **zero-trust security** designed for safe AI-assisted development:
|
|
159
|
+
|
|
160
|
+
### ๐ฆ Permission Gate
|
|
161
|
+
|
|
162
|
+
Every command is classified by risk level:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
โโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโ
|
|
166
|
+
โ Tier โ Risk Level โ Examples โ Default โ
|
|
167
|
+
โโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโค
|
|
168
|
+
โ 0 โ Read-only โ ls, cat, git status โ Auto-approve โ
|
|
169
|
+
โ 1 โ Workspace โ touch, mkdir, git commit โ Prompt once โ
|
|
170
|
+
โ 2 โ System โ npm install, docker run โ Always promptโ
|
|
171
|
+
โ 3 โ Dangerous โ sudo, rm -rf, curl|bash โ Block โ
|
|
172
|
+
โโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### ๐ Approval Options
|
|
176
|
+
|
|
177
|
+
When prompted:
|
|
178
|
+
- **[A]** Approve once
|
|
179
|
+
- **[S]** Approve for session
|
|
180
|
+
- **[+]** Always allow (saved rule)
|
|
181
|
+
- **[?]** Always prompt (saved rule)
|
|
182
|
+
- **[-]** Always forbid (saved rule)
|
|
183
|
+
- **[D]** Deny
|
|
184
|
+
|
|
185
|
+
### ๐ข Workspace Trust
|
|
186
|
+
|
|
187
|
+
First run in any directory triggers trust verification:
|
|
188
|
+
- Trust for session only
|
|
189
|
+
- Trust and remember permanently
|
|
190
|
+
- Exit without trust (read-only mode)
|
|
191
|
+
|
|
192
|
+
### ๐ฅ Code Firewall
|
|
193
|
+
|
|
194
|
+
Real-time scanning detects:
|
|
195
|
+
- **22+ secret patterns** โ AWS, GitHub, OpenAI, Anthropic, Stripe, etc.
|
|
196
|
+
- **Shell injection** โ Dangerous command patterns
|
|
197
|
+
- **Prompt injection** โ LLM manipulation attempts
|
|
198
|
+
- **Supply chain risks** โ Suspicious package references
|
|
199
|
+
|
|
200
|
+
### ๐ Audit Logging
|
|
98
201
|
|
|
99
|
-
|
|
100
|
-
agdi generate "Create a product catalog with shopping cart" -m claude-sonnet-4-5
|
|
202
|
+
All decisions logged to `~/.agdi/audit.jsonl`:
|
|
101
203
|
|
|
102
|
-
|
|
103
|
-
|
|
204
|
+
```json
|
|
205
|
+
{"ts":"2026-01-22T00:30:00Z","action":"approve","tier":1,"cmd":"git commit","reason":"session"}
|
|
104
206
|
```
|
|
105
207
|
|
|
106
|
-
|
|
208
|
+
---
|
|
107
209
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
210
|
+
## ๐ค Supported Models
|
|
211
|
+
|
|
212
|
+
### Free Models (OpenRouter - No Credits Needed)
|
|
213
|
+
|
|
214
|
+
| Model | ID | Best For |
|
|
215
|
+
|-------|-----|----------|
|
|
216
|
+
| GPT-OSS 120B | `openai/gpt-oss-120b:free` | General coding |
|
|
217
|
+
| GPT-OSS 20B | `openai/gpt-oss-20b:free` | Fast responses |
|
|
218
|
+
| Qwen3 Coder | `qwen/qwen3-coder:free` | Code generation |
|
|
219
|
+
| Qwen3 Next 80B | `qwen/qwen3-next-80b-a3b-instruct:free` | Complex tasks |
|
|
220
|
+
| Kimi K2 | `moonshotai/kimi-k2:free` | General purpose |
|
|
221
|
+
| Gemma 3N E2B | `google/gemma-3n-e2b-it:free` | Lightweight |
|
|
222
|
+
| LFM Thinking | `liquid/lfm-2.5-1.2b-thinking:free` | Agentic tasks |
|
|
223
|
+
| Devstral โ ๏ธ | `mistralai/devstral-2512:free` | Ends Jan 27 |
|
|
224
|
+
|
|
225
|
+
### Image Generation
|
|
226
|
+
|
|
227
|
+
| Model | ID | Description |
|
|
228
|
+
|-------|-----|-------------|
|
|
229
|
+
| Seedream 4.5 | `bytedance-seed/seedream-4.5` | Auto-generates project images |
|
|
113
230
|
|
|
114
231
|
### Bring Your Own Key
|
|
115
|
-
- OpenAI (GPT-5, o3-mini)
|
|
116
|
-
- Anthropic (Claude 4.5)
|
|
117
|
-
- Google (Gemini 3)
|
|
118
|
-
- DeepSeek, Mistral, and more
|
|
119
232
|
|
|
120
|
-
|
|
233
|
+
<table>
|
|
234
|
+
<tr>
|
|
235
|
+
<td>
|
|
236
|
+
|
|
237
|
+
**Google Gemini** ๐ฅ
|
|
238
|
+
- Gemini 2.5 Flash โก
|
|
239
|
+
- Gemini 2.5 Pro ๐
|
|
240
|
+
- Gemini 2.0 Flash
|
|
241
|
+
|
|
242
|
+
</td>
|
|
243
|
+
<td>
|
|
244
|
+
|
|
245
|
+
**OpenRouter** ๐
|
|
246
|
+
- Claude 3.5 Sonnet
|
|
247
|
+
- GPT-4o / 4o Mini
|
|
248
|
+
- Llama 3.3 70B
|
|
249
|
+
- DeepSeek R1
|
|
250
|
+
- 400+ more
|
|
251
|
+
|
|
252
|
+
</td>
|
|
253
|
+
<td>
|
|
254
|
+
|
|
255
|
+
**OpenAI** ๐ง
|
|
256
|
+
- GPT-4o
|
|
257
|
+
- GPT-4o Mini
|
|
258
|
+
- o1
|
|
259
|
+
- o1-mini
|
|
260
|
+
|
|
261
|
+
</td>
|
|
262
|
+
</tr>
|
|
263
|
+
<tr>
|
|
264
|
+
<td>
|
|
121
265
|
|
|
122
|
-
|
|
266
|
+
**Anthropic** ๐
|
|
267
|
+
- Claude 3.5 Sonnet
|
|
268
|
+
- Claude 3.5 Haiku
|
|
269
|
+
- Claude 3 Opus
|
|
270
|
+
|
|
271
|
+
</td>
|
|
272
|
+
<td>
|
|
273
|
+
|
|
274
|
+
**DeepSeek** ๐
|
|
275
|
+
- DeepSeek V3
|
|
276
|
+
- DeepSeek R1 (Reasoning)
|
|
277
|
+
|
|
278
|
+
</td>
|
|
279
|
+
<td>
|
|
280
|
+
|
|
281
|
+
**Get Keys** ๐
|
|
282
|
+
- [Gemini](https://aistudio.google.com/apikey)
|
|
283
|
+
- [OpenRouter](https://openrouter.ai/keys)
|
|
284
|
+
- [OpenAI](https://platform.openai.com/api-keys)
|
|
285
|
+
- [Anthropic](https://console.anthropic.com/)
|
|
286
|
+
- [DeepSeek](https://platform.deepseek.com/)
|
|
287
|
+
|
|
288
|
+
</td>
|
|
289
|
+
</tr>
|
|
290
|
+
</table>
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## โ๏ธ Configuration
|
|
295
|
+
|
|
296
|
+
Config stored in `~/.agdi/`:
|
|
123
297
|
|
|
124
298
|
```
|
|
125
299
|
~/.agdi/
|
|
126
|
-
โโโ config.json
|
|
127
|
-
โโโ rules.json
|
|
128
|
-
โโโ trusted-workspaces.json # Trusted
|
|
129
|
-
โโโ audit.jsonl
|
|
300
|
+
โโโ config.json # API keys & settings
|
|
301
|
+
โโโ rules.json # Permission rules
|
|
302
|
+
โโโ trusted-workspaces.json # Trusted directories
|
|
303
|
+
โโโ audit.jsonl # Audit log
|
|
130
304
|
```
|
|
131
305
|
|
|
132
306
|
```bash
|
|
133
|
-
|
|
134
|
-
agdi auth
|
|
307
|
+
# Interactive setup
|
|
308
|
+
agdi auth
|
|
309
|
+
|
|
310
|
+
# Show config
|
|
311
|
+
agdi config
|
|
312
|
+
|
|
313
|
+
# Check auth status
|
|
314
|
+
agdi auth --status
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## ๐ Quality Metrics
|
|
320
|
+
|
|
321
|
+
<table>
|
|
322
|
+
<tr>
|
|
323
|
+
<td align="center">
|
|
324
|
+
<h3>0</h3>
|
|
325
|
+
<p>TypeScript Errors</p>
|
|
326
|
+
</td>
|
|
327
|
+
<td align="center">
|
|
328
|
+
<h3>100</h3>
|
|
329
|
+
<p>Tests Passing</p>
|
|
330
|
+
</td>
|
|
331
|
+
<td align="center">
|
|
332
|
+
<h3>22+</h3>
|
|
333
|
+
<p>Security Patterns</p>
|
|
334
|
+
</td>
|
|
335
|
+
<td align="center">
|
|
336
|
+
<h3>900+</h3>
|
|
337
|
+
<p>Weekly Downloads</p>
|
|
338
|
+
</td>
|
|
339
|
+
</tr>
|
|
340
|
+
</table>
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## ๐ Examples
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
# Create a full-stack app
|
|
348
|
+
agdi build "Create a blog with authentication and markdown support"
|
|
349
|
+
|
|
350
|
+
# Create a dashboard
|
|
351
|
+
agdi build "Build an analytics dashboard with charts using Recharts"
|
|
352
|
+
|
|
353
|
+
# Create an API
|
|
354
|
+
agdi build "Create a REST API with Express, Prisma, and PostgreSQL"
|
|
355
|
+
|
|
356
|
+
# Interactive development
|
|
357
|
+
agdi
|
|
358
|
+
โ Help me debug this React component
|
|
359
|
+
โ Add dark mode to my app
|
|
360
|
+
โ Explain this TypeScript error
|
|
135
361
|
```
|
|
136
362
|
|
|
137
|
-
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## ๐ฆ Tech Stack
|
|
366
|
+
|
|
367
|
+
- **Runtime**: Node.js 18+
|
|
368
|
+
- **Language**: TypeScript 5.4
|
|
369
|
+
- **CLI Framework**: Commander.js
|
|
370
|
+
- **Prompts**: Inquirer
|
|
371
|
+
- **Styling**: Chalk, Ora
|
|
372
|
+
- **Build**: tsup
|
|
373
|
+
- **Testing**: Vitest
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## ๐ Links
|
|
378
|
+
|
|
379
|
+
- ๐ **Website**: [agdi-dev.vercel.app](https://agdi-dev.vercel.app)
|
|
380
|
+
- ๐ฆ **npm**: [npmjs.com/package/agdi](https://www.npmjs.com/package/agdi)
|
|
381
|
+
- ๐ **GitHub**: [github.com/anassagd432/Agdi-dev](https://github.com/anassagd432/Agdi-dev)
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## ๐ License
|
|
386
|
+
|
|
387
|
+
MIT ยฉ [Agdi Systems Inc.](https://agdi-dev.vercel.app)
|
|
138
388
|
|
|
139
|
-
|
|
140
|
-
- npm or yarn
|
|
389
|
+
---
|
|
141
390
|
|
|
142
|
-
|
|
391
|
+
<div align="center">
|
|
143
392
|
|
|
144
|
-
|
|
145
|
-
- ๐ [Documentation](https://docs.agdi.dev)
|
|
146
|
-
- ๐ [GitHub](https://github.com/agdi-dev/agdi)
|
|
393
|
+
**Built with โค๏ธ by [Anass Agdi](https://github.com/anassagd432)**
|
|
147
394
|
|
|
148
|
-
|
|
395
|
+
โญ **Star on GitHub** if you find this useful!
|
|
149
396
|
|
|
150
|
-
|
|
397
|
+
</div>
|