agdi 2.4.0 โ 2.4.1
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 +321 -93
- package/dist/index.js +466 -105
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,150 +1,378 @@
|
|
|
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
|
+
---
|
|
73
|
+
|
|
74
|
+
## โจ Features
|
|
36
75
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
76
|
+
<table>
|
|
77
|
+
<tr>
|
|
78
|
+
<td width="50%">
|
|
43
79
|
|
|
44
|
-
|
|
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
|
|
45
84
|
|
|
46
|
-
|
|
85
|
+
</td>
|
|
86
|
+
<td width="50%">
|
|
47
87
|
|
|
48
|
-
###
|
|
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
|
|
49
92
|
|
|
50
|
-
|
|
93
|
+
</td>
|
|
94
|
+
</tr>
|
|
95
|
+
<tr>
|
|
96
|
+
<td width="50%">
|
|
51
97
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| **3** | Dangerous | `sudo`, `rm -rf`, `curl \| bash` |
|
|
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
|
|
58
103
|
|
|
59
|
-
|
|
104
|
+
</td>
|
|
105
|
+
<td width="50%">
|
|
60
106
|
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **
|
|
65
|
-
- **
|
|
66
|
-
- **
|
|
67
|
-
- **[D] Deny** - Block this execution
|
|
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
|
|
68
113
|
|
|
69
|
-
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
</table>
|
|
70
117
|
|
|
71
|
-
|
|
72
|
-
- **Trust for session** - Allow commands for this session only
|
|
73
|
-
- **Trust and remember** - Permanently trust this workspace
|
|
74
|
-
- **Exit** - Don't grant trust, exit immediately
|
|
118
|
+
---
|
|
75
119
|
|
|
76
|
-
|
|
120
|
+
## ๐ Commands Reference
|
|
77
121
|
|
|
78
|
-
###
|
|
122
|
+
### Interactive Mode (Default)
|
|
79
123
|
|
|
80
|
-
|
|
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
|
|
98
161
|
|
|
99
|
-
|
|
100
|
-
agdi generate "Create a product catalog with shopping cart" -m claude-sonnet-4-5
|
|
162
|
+
Every command is classified by risk level:
|
|
101
163
|
|
|
102
|
-
# Use specific model
|
|
103
|
-
agdi generate "Build a blog" -p puter -m gpt-5
|
|
104
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)
|
|
105
191
|
|
|
106
|
-
|
|
192
|
+
### ๐ฅ Code Firewall
|
|
107
193
|
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
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
|
|
201
|
+
|
|
202
|
+
All decisions logged to `~/.agdi/audit.jsonl`:
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{"ts":"2026-01-22T00:30:00Z","action":"approve","tier":1,"cmd":"git commit","reason":"session"}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## ๐ค Supported Models
|
|
113
211
|
|
|
114
212
|
### 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
213
|
|
|
120
|
-
|
|
214
|
+
<table>
|
|
215
|
+
<tr>
|
|
216
|
+
<td>
|
|
217
|
+
|
|
218
|
+
**Google Gemini** ๐ฅ
|
|
219
|
+
- Gemini 2.5 Flash โก
|
|
220
|
+
- Gemini 2.5 Pro ๐
|
|
221
|
+
- Gemini 2.0 Flash
|
|
222
|
+
|
|
223
|
+
</td>
|
|
224
|
+
<td>
|
|
225
|
+
|
|
226
|
+
**OpenRouter** ๐
|
|
227
|
+
- Claude 3.5 Sonnet
|
|
228
|
+
- GPT-4o / 4o Mini
|
|
229
|
+
- Llama 3.3 70B
|
|
230
|
+
- DeepSeek R1
|
|
231
|
+
- 400+ more
|
|
232
|
+
|
|
233
|
+
</td>
|
|
234
|
+
<td>
|
|
235
|
+
|
|
236
|
+
**OpenAI** ๐ง
|
|
237
|
+
- GPT-4o
|
|
238
|
+
- GPT-4o Mini
|
|
239
|
+
- o1
|
|
240
|
+
- o1-mini
|
|
241
|
+
|
|
242
|
+
</td>
|
|
243
|
+
</tr>
|
|
244
|
+
<tr>
|
|
245
|
+
<td>
|
|
246
|
+
|
|
247
|
+
**Anthropic** ๐
|
|
248
|
+
- Claude 3.5 Sonnet
|
|
249
|
+
- Claude 3.5 Haiku
|
|
250
|
+
- Claude 3 Opus
|
|
121
251
|
|
|
122
|
-
|
|
252
|
+
</td>
|
|
253
|
+
<td>
|
|
254
|
+
|
|
255
|
+
**DeepSeek** ๐
|
|
256
|
+
- DeepSeek V3
|
|
257
|
+
- DeepSeek R1 (Reasoning)
|
|
258
|
+
|
|
259
|
+
</td>
|
|
260
|
+
<td>
|
|
261
|
+
|
|
262
|
+
**Get Keys** ๐
|
|
263
|
+
- [Gemini](https://aistudio.google.com/apikey)
|
|
264
|
+
- [OpenRouter](https://openrouter.ai/keys)
|
|
265
|
+
- [OpenAI](https://platform.openai.com/api-keys)
|
|
266
|
+
- [Anthropic](https://console.anthropic.com/)
|
|
267
|
+
- [DeepSeek](https://platform.deepseek.com/)
|
|
268
|
+
|
|
269
|
+
</td>
|
|
270
|
+
</tr>
|
|
271
|
+
</table>
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## โ๏ธ Configuration
|
|
276
|
+
|
|
277
|
+
Config stored in `~/.agdi/`:
|
|
123
278
|
|
|
124
279
|
```
|
|
125
280
|
~/.agdi/
|
|
126
|
-
โโโ config.json
|
|
127
|
-
โโโ rules.json
|
|
128
|
-
โโโ trusted-workspaces.json # Trusted
|
|
129
|
-
โโโ audit.jsonl
|
|
281
|
+
โโโ config.json # API keys & settings
|
|
282
|
+
โโโ rules.json # Permission rules
|
|
283
|
+
โโโ trusted-workspaces.json # Trusted directories
|
|
284
|
+
โโโ audit.jsonl # Audit log
|
|
130
285
|
```
|
|
131
286
|
|
|
132
287
|
```bash
|
|
133
|
-
|
|
134
|
-
agdi auth
|
|
288
|
+
# Interactive setup
|
|
289
|
+
agdi auth
|
|
290
|
+
|
|
291
|
+
# Show config
|
|
292
|
+
agdi config
|
|
293
|
+
|
|
294
|
+
# Check auth status
|
|
295
|
+
agdi auth --status
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## ๐ Quality Metrics
|
|
301
|
+
|
|
302
|
+
<table>
|
|
303
|
+
<tr>
|
|
304
|
+
<td align="center">
|
|
305
|
+
<h3>0</h3>
|
|
306
|
+
<p>TypeScript Errors</p>
|
|
307
|
+
</td>
|
|
308
|
+
<td align="center">
|
|
309
|
+
<h3>100</h3>
|
|
310
|
+
<p>Tests Passing</p>
|
|
311
|
+
</td>
|
|
312
|
+
<td align="center">
|
|
313
|
+
<h3>22+</h3>
|
|
314
|
+
<p>Security Patterns</p>
|
|
315
|
+
</td>
|
|
316
|
+
<td align="center">
|
|
317
|
+
<h3>900+</h3>
|
|
318
|
+
<p>Weekly Downloads</p>
|
|
319
|
+
</td>
|
|
320
|
+
</tr>
|
|
321
|
+
</table>
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## ๐ Examples
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
# Create a full-stack app
|
|
329
|
+
agdi build "Create a blog with authentication and markdown support"
|
|
330
|
+
|
|
331
|
+
# Create a dashboard
|
|
332
|
+
agdi build "Build an analytics dashboard with charts using Recharts"
|
|
333
|
+
|
|
334
|
+
# Create an API
|
|
335
|
+
agdi build "Create a REST API with Express, Prisma, and PostgreSQL"
|
|
336
|
+
|
|
337
|
+
# Interactive development
|
|
338
|
+
agdi
|
|
339
|
+
โ Help me debug this React component
|
|
340
|
+
โ Add dark mode to my app
|
|
341
|
+
โ Explain this TypeScript error
|
|
135
342
|
```
|
|
136
343
|
|
|
137
|
-
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## ๐ฆ Tech Stack
|
|
347
|
+
|
|
348
|
+
- **Runtime**: Node.js 18+
|
|
349
|
+
- **Language**: TypeScript 5.4
|
|
350
|
+
- **CLI Framework**: Commander.js
|
|
351
|
+
- **Prompts**: Inquirer
|
|
352
|
+
- **Styling**: Chalk, Ora
|
|
353
|
+
- **Build**: tsup
|
|
354
|
+
- **Testing**: Vitest
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## ๐ Links
|
|
359
|
+
|
|
360
|
+
- ๐ **Website**: [agdi-dev.vercel.app](https://agdi-dev.vercel.app)
|
|
361
|
+
- ๐ฆ **npm**: [npmjs.com/package/agdi](https://www.npmjs.com/package/agdi)
|
|
362
|
+
- ๐ **GitHub**: [github.com/anassagd432/Agdi-dev](https://github.com/anassagd432/Agdi-dev)
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## ๐ License
|
|
367
|
+
|
|
368
|
+
MIT ยฉ [Agdi Systems Inc.](https://agdi-dev.vercel.app)
|
|
138
369
|
|
|
139
|
-
|
|
140
|
-
- npm or yarn
|
|
370
|
+
---
|
|
141
371
|
|
|
142
|
-
|
|
372
|
+
<div align="center">
|
|
143
373
|
|
|
144
|
-
|
|
145
|
-
- ๐ [Documentation](https://docs.agdi.dev)
|
|
146
|
-
- ๐ [GitHub](https://github.com/agdi-dev/agdi)
|
|
374
|
+
**Built with โค๏ธ by [Anass Agdi](https://github.com/anassagd432)**
|
|
147
375
|
|
|
148
|
-
|
|
376
|
+
โญ **Star on GitHub** if you find this useful!
|
|
149
377
|
|
|
150
|
-
|
|
378
|
+
</div>
|