codegpt-ai 1.14.0 → 1.15.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/chat.py +141 -121
- package/package.json +1 -1
package/chat.py
CHANGED
|
@@ -64,7 +64,52 @@ Goal:
|
|
|
64
64
|
Deliver high-value, efficient, technically sharp responses with zero wasted words."""
|
|
65
65
|
|
|
66
66
|
AI_TOOLS = {
|
|
67
|
-
#
|
|
67
|
+
# --- Works everywhere (pip — pure Python) ---
|
|
68
|
+
"shellgpt": {
|
|
69
|
+
"name": "ShellGPT",
|
|
70
|
+
"desc": "AI assistant in your shell",
|
|
71
|
+
"bin": "sgpt",
|
|
72
|
+
"install": ["pip", "install", "shell-gpt"],
|
|
73
|
+
"default_args": [],
|
|
74
|
+
"needs_key": "OPENAI_API_KEY",
|
|
75
|
+
"termux": True,
|
|
76
|
+
},
|
|
77
|
+
"llm": {
|
|
78
|
+
"name": "LLM",
|
|
79
|
+
"desc": "Simon Willison's multi-model CLI",
|
|
80
|
+
"bin": "llm",
|
|
81
|
+
"install": ["pip", "install", "llm"],
|
|
82
|
+
"default_args": ["chat"],
|
|
83
|
+
"needs_key": "OPENAI_API_KEY (or plugins)",
|
|
84
|
+
"termux": True,
|
|
85
|
+
},
|
|
86
|
+
"litellm": {
|
|
87
|
+
"name": "LiteLLM",
|
|
88
|
+
"desc": "Unified API for 100+ models",
|
|
89
|
+
"bin": "litellm",
|
|
90
|
+
"install": ["pip", "install", "litellm"],
|
|
91
|
+
"default_args": [],
|
|
92
|
+
"needs_key": "Any provider key",
|
|
93
|
+
"termux": True,
|
|
94
|
+
},
|
|
95
|
+
"gorilla": {
|
|
96
|
+
"name": "Gorilla CLI",
|
|
97
|
+
"desc": "AI generates CLI commands from English",
|
|
98
|
+
"bin": "gorilla",
|
|
99
|
+
"install": ["pip", "install", "gorilla-cli"],
|
|
100
|
+
"default_args": [],
|
|
101
|
+
"needs_key": "None — free API",
|
|
102
|
+
"termux": True,
|
|
103
|
+
},
|
|
104
|
+
"chatgpt": {
|
|
105
|
+
"name": "ChatGPT CLI",
|
|
106
|
+
"desc": "Official ChatGPT in terminal",
|
|
107
|
+
"bin": "chatgpt",
|
|
108
|
+
"install": ["pip", "install", "chatgpt"],
|
|
109
|
+
"default_args": [],
|
|
110
|
+
"needs_key": "OPENAI_API_KEY",
|
|
111
|
+
"termux": True,
|
|
112
|
+
},
|
|
68
113
|
"aider": {
|
|
69
114
|
"name": "Aider",
|
|
70
115
|
"desc": "AI pair programmer — edits your code",
|
|
@@ -72,6 +117,7 @@ AI_TOOLS = {
|
|
|
72
117
|
"install": ["pip", "install", "aider-chat"],
|
|
73
118
|
"default_args": [],
|
|
74
119
|
"needs_key": "OPENAI_API_KEY or ANTHROPIC_API_KEY",
|
|
120
|
+
"termux": True,
|
|
75
121
|
},
|
|
76
122
|
"interpreter": {
|
|
77
123
|
"name": "Open Interpreter",
|
|
@@ -79,48 +125,54 @@ AI_TOOLS = {
|
|
|
79
125
|
"bin": "interpreter",
|
|
80
126
|
"install": ["pip", "install", "open-interpreter"],
|
|
81
127
|
"default_args": [],
|
|
82
|
-
"needs_key": "OPENAI_API_KEY (or
|
|
128
|
+
"needs_key": "OPENAI_API_KEY (or --local)",
|
|
129
|
+
"termux": True,
|
|
83
130
|
},
|
|
84
|
-
"
|
|
85
|
-
"name": "
|
|
86
|
-
"desc": "AI
|
|
87
|
-
"bin": "
|
|
88
|
-
"install": ["pip", "install", "
|
|
131
|
+
"gpt-engineer": {
|
|
132
|
+
"name": "GPT Engineer",
|
|
133
|
+
"desc": "AI builds entire projects from prompts",
|
|
134
|
+
"bin": "gpte",
|
|
135
|
+
"install": ["pip", "install", "gpt-engineer"],
|
|
89
136
|
"default_args": [],
|
|
90
137
|
"needs_key": "OPENAI_API_KEY",
|
|
138
|
+
"termux": True,
|
|
91
139
|
},
|
|
92
|
-
"
|
|
93
|
-
"name": "
|
|
94
|
-
"desc": "AI coding agent
|
|
95
|
-
"bin": "
|
|
96
|
-
"install": ["
|
|
140
|
+
"mentat": {
|
|
141
|
+
"name": "Mentat",
|
|
142
|
+
"desc": "AI coding agent by AbanteAI",
|
|
143
|
+
"bin": "mentat",
|
|
144
|
+
"install": ["pip", "install", "mentat"],
|
|
97
145
|
"default_args": [],
|
|
98
|
-
"needs_key": "
|
|
99
|
-
"
|
|
146
|
+
"needs_key": "OPENAI_API_KEY or ANTHROPIC_API_KEY",
|
|
147
|
+
"termux": True,
|
|
100
148
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
149
|
+
# --- Works everywhere (npm — pure JS) ---
|
|
150
|
+
"opencommit": {
|
|
151
|
+
"name": "OpenCommit",
|
|
152
|
+
"desc": "AI writes your git commit messages",
|
|
153
|
+
"bin": "opencommit",
|
|
154
|
+
"install": ["npm", "i", "-g", "opencommit"],
|
|
106
155
|
"default_args": [],
|
|
107
156
|
"needs_key": "OPENAI_API_KEY",
|
|
157
|
+
"termux": True,
|
|
108
158
|
},
|
|
109
|
-
"
|
|
110
|
-
"name": "
|
|
111
|
-
"desc": "
|
|
112
|
-
"bin": "
|
|
113
|
-
"install": ["npm", "i", "-g", "
|
|
159
|
+
"ai-shell": {
|
|
160
|
+
"name": "AI Shell",
|
|
161
|
+
"desc": "Natural language to shell commands",
|
|
162
|
+
"bin": "ai",
|
|
163
|
+
"install": ["npm", "i", "-g", "ai-shell"],
|
|
114
164
|
"default_args": [],
|
|
115
|
-
"needs_key": "
|
|
165
|
+
"needs_key": "OPENAI_API_KEY",
|
|
166
|
+
"termux": True,
|
|
116
167
|
},
|
|
117
|
-
"
|
|
118
|
-
"name": "
|
|
119
|
-
"desc": "AI
|
|
120
|
-
"bin": "
|
|
121
|
-
"install": ["
|
|
122
|
-
"default_args": [
|
|
123
|
-
"needs_key": "
|
|
168
|
+
"aipick": {
|
|
169
|
+
"name": "AIPick",
|
|
170
|
+
"desc": "AI-powered git commit selector",
|
|
171
|
+
"bin": "aipick",
|
|
172
|
+
"install": ["npm", "i", "-g", "aipick"],
|
|
173
|
+
"default_args": [],
|
|
174
|
+
"needs_key": "OPENAI_API_KEY",
|
|
175
|
+
"termux": True,
|
|
124
176
|
},
|
|
125
177
|
"cline": {
|
|
126
178
|
"name": "Cline",
|
|
@@ -129,32 +181,19 @@ AI_TOOLS = {
|
|
|
129
181
|
"install": ["npm", "i", "-g", "cline"],
|
|
130
182
|
"default_args": [],
|
|
131
183
|
"needs_key": "ANTHROPIC_API_KEY or OPENAI_API_KEY",
|
|
184
|
+
"termux": True,
|
|
132
185
|
},
|
|
133
|
-
|
|
134
|
-
"name": "GPT Engineer",
|
|
135
|
-
"desc": "AI builds entire projects from prompts",
|
|
136
|
-
"bin": "gpte",
|
|
137
|
-
"install": ["pip", "install", "gpt-engineer"],
|
|
138
|
-
"default_args": [],
|
|
139
|
-
"needs_key": "OPENAI_API_KEY",
|
|
140
|
-
},
|
|
141
|
-
"mentat": {
|
|
142
|
-
"name": "Mentat",
|
|
143
|
-
"desc": "AI coding agent by AbanteAI",
|
|
144
|
-
"bin": "mentat",
|
|
145
|
-
"install": ["pip", "install", "mentat"],
|
|
146
|
-
"default_args": [],
|
|
147
|
-
"needs_key": "OPENAI_API_KEY or ANTHROPIC_API_KEY",
|
|
148
|
-
},
|
|
186
|
+
# --- Platform tools (pkg on Termux, winget on Windows) ---
|
|
149
187
|
"ollama": {
|
|
150
188
|
"name": "Ollama",
|
|
151
|
-
"desc": "Run local LLMs
|
|
189
|
+
"desc": "Run local LLMs",
|
|
152
190
|
"bin": "ollama",
|
|
153
191
|
"install": ["pip", "install", "ollama"],
|
|
154
192
|
"install_termux": ["pkg", "install", "-y", "ollama"],
|
|
155
193
|
"install_win": ["winget", "install", "Ollama.Ollama"],
|
|
156
194
|
"default_args": ["run", "llama3.2"],
|
|
157
|
-
"needs_key": "None —
|
|
195
|
+
"needs_key": "None — local",
|
|
196
|
+
"termux": True,
|
|
158
197
|
},
|
|
159
198
|
"jq": {
|
|
160
199
|
"name": "jq",
|
|
@@ -165,62 +204,53 @@ AI_TOOLS = {
|
|
|
165
204
|
"install_win": ["winget", "install", "jqlang.jq"],
|
|
166
205
|
"default_args": [],
|
|
167
206
|
"needs_key": "None",
|
|
207
|
+
"termux": True,
|
|
168
208
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"needs_key": "OPENAI_API_KEY (or plugins for others)",
|
|
176
|
-
},
|
|
177
|
-
"gpt4all": {
|
|
178
|
-
"name": "GPT4All",
|
|
179
|
-
"desc": "Run AI models 100% offline",
|
|
180
|
-
"bin": "gpt4all",
|
|
181
|
-
"install": ["pip", "install", "gpt4all"],
|
|
182
|
-
"default_args": [],
|
|
183
|
-
"needs_key": "None — fully offline",
|
|
184
|
-
},
|
|
185
|
-
"litellm": {
|
|
186
|
-
"name": "LiteLLM",
|
|
187
|
-
"desc": "Unified API for 100+ models",
|
|
188
|
-
"bin": "litellm",
|
|
189
|
-
"install": ["pip", "install", "litellm"],
|
|
209
|
+
# --- Desktop/x86 only (native binaries, no ARM) ---
|
|
210
|
+
"opencode": {
|
|
211
|
+
"name": "OpenCode",
|
|
212
|
+
"desc": "AI coding agent — terminal IDE",
|
|
213
|
+
"bin": "opencode",
|
|
214
|
+
"install": ["npm", "i", "-g", "opencode-ai"],
|
|
190
215
|
"default_args": [],
|
|
191
|
-
"needs_key": "
|
|
216
|
+
"needs_key": "ANTHROPIC_API_KEY or OPENAI_API_KEY",
|
|
217
|
+
"termux": False,
|
|
192
218
|
},
|
|
193
|
-
"
|
|
194
|
-
"name": "
|
|
195
|
-
"desc": "
|
|
196
|
-
"bin": "
|
|
197
|
-
"install": ["npm", "i", "-g", "
|
|
219
|
+
"codex": {
|
|
220
|
+
"name": "Codex",
|
|
221
|
+
"desc": "OpenAI's coding agent CLI",
|
|
222
|
+
"bin": "codex",
|
|
223
|
+
"install": ["npm", "i", "-g", "@openai/codex"],
|
|
198
224
|
"default_args": [],
|
|
199
225
|
"needs_key": "OPENAI_API_KEY",
|
|
226
|
+
"termux": False,
|
|
200
227
|
},
|
|
201
|
-
"
|
|
202
|
-
"name": "
|
|
203
|
-
"desc": "
|
|
204
|
-
"bin": "
|
|
205
|
-
"install": ["npm", "i", "-g", "
|
|
228
|
+
"gemini": {
|
|
229
|
+
"name": "Gemini CLI",
|
|
230
|
+
"desc": "Google's AI coding CLI",
|
|
231
|
+
"bin": "gemini",
|
|
232
|
+
"install": ["npm", "i", "-g", "@google/gemini-cli"],
|
|
206
233
|
"default_args": [],
|
|
207
|
-
"needs_key": "
|
|
234
|
+
"needs_key": "Google login",
|
|
235
|
+
"termux": False,
|
|
208
236
|
},
|
|
209
|
-
"
|
|
210
|
-
"name": "
|
|
211
|
-
"desc": "AI
|
|
212
|
-
"bin": "
|
|
213
|
-
"install": ["
|
|
214
|
-
"default_args": [],
|
|
215
|
-
"needs_key": "
|
|
237
|
+
"copilot": {
|
|
238
|
+
"name": "GitHub Copilot",
|
|
239
|
+
"desc": "AI pair programmer in terminal",
|
|
240
|
+
"bin": "gh",
|
|
241
|
+
"install": ["gh", "extension", "install", "github/gh-copilot"],
|
|
242
|
+
"default_args": ["copilot"],
|
|
243
|
+
"needs_key": "GitHub login",
|
|
244
|
+
"termux": False,
|
|
216
245
|
},
|
|
217
|
-
"
|
|
218
|
-
"name": "
|
|
219
|
-
"desc": "
|
|
220
|
-
"bin": "
|
|
221
|
-
"install": ["pip", "install", "
|
|
246
|
+
"gpt4all": {
|
|
247
|
+
"name": "GPT4All",
|
|
248
|
+
"desc": "Run AI models 100% offline",
|
|
249
|
+
"bin": "gpt4all",
|
|
250
|
+
"install": ["pip", "install", "gpt4all"],
|
|
222
251
|
"default_args": [],
|
|
223
|
-
"needs_key": "
|
|
252
|
+
"needs_key": "None — offline",
|
|
253
|
+
"termux": False,
|
|
224
254
|
},
|
|
225
255
|
"cursor": {
|
|
226
256
|
"name": "Cursor CLI",
|
|
@@ -229,24 +259,9 @@ AI_TOOLS = {
|
|
|
229
259
|
"install": ["npm", "i", "-g", "cursor-cli"],
|
|
230
260
|
"default_args": [],
|
|
231
261
|
"needs_key": "Cursor account",
|
|
262
|
+
"termux": False,
|
|
232
263
|
},
|
|
233
|
-
|
|
234
|
-
"name": "AIPick",
|
|
235
|
-
"desc": "AI-powered git commit selector",
|
|
236
|
-
"bin": "aipick",
|
|
237
|
-
"install": ["npm", "i", "-g", "aipick"],
|
|
238
|
-
"default_args": [],
|
|
239
|
-
"needs_key": "OPENAI_API_KEY",
|
|
240
|
-
},
|
|
241
|
-
"ollama-py": {
|
|
242
|
-
"name": "Ollama Python",
|
|
243
|
-
"desc": "Ollama Python client CLI",
|
|
244
|
-
"bin": "ollama",
|
|
245
|
-
"install": ["pip", "install", "ollama"],
|
|
246
|
-
"default_args": ["run", "llama3.2"],
|
|
247
|
-
"needs_key": "None — local",
|
|
248
|
-
},
|
|
249
|
-
# --- Dev & Deploy CLIs ---
|
|
264
|
+
# --- Deploy CLIs (work everywhere) ---
|
|
250
265
|
"vercel": {
|
|
251
266
|
"name": "Vercel",
|
|
252
267
|
"desc": "Deploy frontend apps",
|
|
@@ -254,6 +269,7 @@ AI_TOOLS = {
|
|
|
254
269
|
"install": ["npm", "i", "-g", "vercel"],
|
|
255
270
|
"default_args": [],
|
|
256
271
|
"needs_key": "Vercel account",
|
|
272
|
+
"termux": True,
|
|
257
273
|
},
|
|
258
274
|
"netlify": {
|
|
259
275
|
"name": "Netlify",
|
|
@@ -262,6 +278,7 @@ AI_TOOLS = {
|
|
|
262
278
|
"install": ["npm", "i", "-g", "netlify-cli"],
|
|
263
279
|
"default_args": [],
|
|
264
280
|
"needs_key": "Netlify account",
|
|
281
|
+
"termux": True,
|
|
265
282
|
},
|
|
266
283
|
"supabase": {
|
|
267
284
|
"name": "Supabase",
|
|
@@ -270,6 +287,7 @@ AI_TOOLS = {
|
|
|
270
287
|
"install": ["npm", "i", "-g", "supabase"],
|
|
271
288
|
"default_args": [],
|
|
272
289
|
"needs_key": "Supabase account",
|
|
290
|
+
"termux": True,
|
|
273
291
|
},
|
|
274
292
|
"railway": {
|
|
275
293
|
"name": "Railway",
|
|
@@ -278,6 +296,7 @@ AI_TOOLS = {
|
|
|
278
296
|
"install": ["npm", "i", "-g", "@railway/cli"],
|
|
279
297
|
"default_args": [],
|
|
280
298
|
"needs_key": "Railway account",
|
|
299
|
+
"termux": True,
|
|
281
300
|
},
|
|
282
301
|
"wrangler": {
|
|
283
302
|
"name": "Wrangler",
|
|
@@ -286,6 +305,7 @@ AI_TOOLS = {
|
|
|
286
305
|
"install": ["npm", "i", "-g", "wrangler"],
|
|
287
306
|
"default_args": [],
|
|
288
307
|
"needs_key": "Cloudflare account",
|
|
308
|
+
"termux": True,
|
|
289
309
|
},
|
|
290
310
|
}
|
|
291
311
|
|
|
@@ -5513,7 +5533,11 @@ def main():
|
|
|
5513
5533
|
table.add_column("Safe", width=7)
|
|
5514
5534
|
coding_tools = ["codex", "opencode", "cline", "aider", "mentat",
|
|
5515
5535
|
"gpt-engineer", "interpreter", "copilot"]
|
|
5536
|
+
on_termux = os.path.exists("/data/data/com.termux")
|
|
5516
5537
|
for cmd_name, info in AI_TOOLS.items():
|
|
5538
|
+
# Skip unsupported tools on Termux
|
|
5539
|
+
if on_termux and not info.get("termux", True):
|
|
5540
|
+
continue
|
|
5517
5541
|
installed = shutil.which(info["bin"]) is not None
|
|
5518
5542
|
status = "[green]ready[/]" if installed else "[dim]—[/]"
|
|
5519
5543
|
needs = info.get("needs_key", "")
|
|
@@ -5619,14 +5643,10 @@ def main():
|
|
|
5619
5643
|
else:
|
|
5620
5644
|
# Check platform support
|
|
5621
5645
|
is_termux = os.path.exists("/data/data/com.termux")
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
continue
|
|
5627
|
-
elif sys.platform not in platforms and not is_termux:
|
|
5628
|
-
print_err(f"{tool['name']} doesn't support this platform.")
|
|
5629
|
-
continue
|
|
5646
|
+
if is_termux and not tool.get("termux", True):
|
|
5647
|
+
print_err(f"{tool['name']} doesn't support Termux/ARM.")
|
|
5648
|
+
print_sys("Use a desktop/PC for this tool.")
|
|
5649
|
+
continue
|
|
5630
5650
|
|
|
5631
5651
|
print_sys(f"Installing {tool['name']}...")
|
|
5632
5652
|
|