karnel-termux 4.13.4 → 4.13.6
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 +23 -17
- package/karnel/cli/commands/deploy.sh +10 -1
- package/karnel/cli/commands/doctor.sh +16 -6
- package/karnel/cli/commands/ia.sh +12 -1
- package/karnel/cli/commands/install.sh +2 -0
- package/karnel/cli/commands/list.sh +23 -4
- package/karnel/cli/commands/open.sh +0 -1
- package/karnel/cli/commands/reinstall.sh +36 -0
- package/karnel/cli/commands/show.sh +6 -1
- package/karnel/cli/commands/uninstall.sh +3 -0
- package/karnel/cli/commands/update.sh +69 -5
- package/karnel/cli/commands/voice.sh +8 -1
- package/karnel/cli/karnel.sh +43 -37
- package/karnel/tools/ai/all.sh +1 -0
- package/karnel/tools/ai/codebuff/README.md +52 -0
- package/karnel/tools/ai/{freebuff/bin/freebuff → codebuff/bin/codebuff} +2 -2
- package/karnel/tools/ai/{freebuff/helper/freebuff_helper.c → codebuff/helper/codebuff_helper.c} +1 -1
- package/karnel/tools/ai/codebuff/install.sh +305 -0
- package/karnel/tools/ai/freebuff/README.md +5 -29
- package/karnel/tools/ai/freebuff/install.sh +33 -271
- package/karnel/tools/plugins/install.sh +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://github.com/israelmarques1024-dotcom/karnel-termux">
|
|
11
|
-
<img src="https://img.shields.io/badge/version-4.13.
|
|
11
|
+
<img src="https://img.shields.io/badge/version-4.13.6-0078D4?style=for-the-badge" alt="Version">
|
|
12
12
|
</a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/karnel-termux">
|
|
14
14
|
<img src="https://img.shields.io/npm/v/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm">
|
|
@@ -39,7 +39,7 @@ Created by **Israel Marques**.
|
|
|
39
39
|
- **22 dev tools** — gh, curl, fzf, bat, lsd, jq, tmux, openssh, snyk and more
|
|
40
40
|
- **11 utility scripts** — fconv, notes, treex, qrcode, zork and more
|
|
41
41
|
- **2 network tools** — dark, dedsec-network
|
|
42
|
-
- **
|
|
42
|
+
- **4 deploy CLIs** — Vercel, Railway, Netlify, Supabase
|
|
43
43
|
- **Responsible OSINT** — Robin v2.8 through Tor with a loopback-only web UI
|
|
44
44
|
- **3 editors** — code-server (VS Code in browser), Neovim, NvChad
|
|
45
45
|
- **Second brain** — Memory system with AI search and idea graph
|
|
@@ -104,7 +104,7 @@ karnel
|
|
|
104
104
|
| `karnel start editor` | Start code-server (VS Code in browser) |
|
|
105
105
|
| `karnel pg` | PostgreSQL manager |
|
|
106
106
|
| `karnel init <template>` | Initialize projects with templates |
|
|
107
|
-
| `karnel deploy` | Deploy projects (Vercel, Railway, Netlify) |
|
|
107
|
+
| `karnel deploy` | Deploy projects (Vercel, Railway, Netlify, Supabase) |
|
|
108
108
|
| `karnel robin` | Manage the Robin OSINT service |
|
|
109
109
|
| `karnel --version` | Show installed version |
|
|
110
110
|
|
|
@@ -115,13 +115,13 @@ karnel
|
|
|
115
115
|
| `lang` | Node.js, Python, Go, Rust, C/C++, PHP, Perl, Bun | `karnel install lang` |
|
|
116
116
|
| `db` | PostgreSQL, MariaDB, SQLite, MongoDB, Redis | `karnel install db` |
|
|
117
117
|
| `ai` | 39 AI agents for coding | `karnel install ai` |
|
|
118
|
-
| `editor` | code-server (VS Code in browser) | `karnel install editor` |
|
|
118
|
+
| `editor` | code-server (VS Code in browser), Neovim, NvChad | `karnel install editor` |
|
|
119
119
|
| `dev` | gh, curl, fzf, bat, lsd, jq and more | `karnel install dev` |
|
|
120
120
|
| `npm` | TypeScript, NestJS CLI, Prettier and more | `karnel install npm` |
|
|
121
121
|
| `shell` | ZSH + Oh My Zsh + 10 plugins | `karnel install shell` |
|
|
122
122
|
| `ui` | Font, cursor, extra-keys, banner | `karnel install ui` |
|
|
123
123
|
| `auto` | Automation with n8n | `karnel install auto` |
|
|
124
|
-
| `deploy` | Vercel, Railway, Netlify | `karnel install deploy` |
|
|
124
|
+
| `deploy` | Vercel, Railway, Netlify, Supabase | `karnel install deploy` |
|
|
125
125
|
| `games` | Buzz, CTF God, Detective, Tamagotchi and more | `karnel install games` |
|
|
126
126
|
| `network` | Dark Web OSINT, DedSec Network Toolkit | `karnel install network` |
|
|
127
127
|
| `utils` | fconv, notes, treex, passman, applaunch, qrcode, zork and more | `karnel install utils` |
|
|
@@ -240,7 +240,7 @@ See the bundled reference with `karnel show osint --robin`.
|
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
243
|
-
## AI Agents (
|
|
243
|
+
## AI Agents (39)
|
|
244
244
|
|
|
245
245
|
```bash
|
|
246
246
|
karnel install ai # Install all
|
|
@@ -273,7 +273,8 @@ karnel install ai --opencode --ollama # Install specific agents
|
|
|
273
273
|
| **Hermes Agent** | `--hermes-agent` | Nous Research self-improving agent |
|
|
274
274
|
| **Kimi Code** | `--kimi-code` | Kimi Code CLI |
|
|
275
275
|
| **Command Code** | `--command-code` | Agent that learns your style |
|
|
276
|
-
| **
|
|
276
|
+
| **Codebuff** | `--codebuff` | Free community coding agent |
|
|
277
|
+
| **Freebuff** | `--freebuff` | Free AI coding agent |
|
|
277
278
|
| **Kilo Code CLI** | `--kilocode-cli` | Native glibc CLI for Termux |
|
|
278
279
|
| **Kiro CLI** | `--kiro` | AWS AI coding assistant |
|
|
279
280
|
| **Crush CLI** | `--crush` | Charm AI agents CLI |
|
|
@@ -289,6 +290,8 @@ karnel install ai --opencode --ollama # Install specific agents
|
|
|
289
290
|
| **Oh-My-Pi** | `--oh-my-pi` | Enhanced Pi agent with native Rust addons |
|
|
290
291
|
| **Goose CLI** | `--goose` | AI agent framework by Block (native Termux musl) |
|
|
291
292
|
| **Factory Droid** | `--droid` | Enterprise AI agent (via proot-distro Ubuntu) |
|
|
293
|
+
| **Supercode CLI** | `--supercode-cli` | Supercode CLI — official npm package |
|
|
294
|
+
| **Puter CLI** | `--puter` | Puter CLI for sites and workers |
|
|
292
295
|
|
|
293
296
|
</details>
|
|
294
297
|
|
|
@@ -408,17 +411,17 @@ karnel pg shell # Open psql console
|
|
|
408
411
|
|
|
409
412
|
## karnel init — Project Templates
|
|
410
413
|
|
|
411
|
-
|
|
414
|
+
Configure existing projects in seconds:
|
|
412
415
|
|
|
413
416
|
```bash
|
|
414
|
-
cd my-app && karnel init next
|
|
417
|
+
cd my-next-app && karnel init next # Next.js + TypeScript + Tailwind
|
|
415
418
|
cd my-api && karnel init express # Express + TypeORM
|
|
416
419
|
cd backend && karnel init nest # NestJS + authentication
|
|
417
420
|
```
|
|
418
421
|
|
|
419
422
|
| Template | Description |
|
|
420
423
|
|----------|-------------|
|
|
421
|
-
| `next` | Next.js with
|
|
424
|
+
| `next` | Next.js with webpack, TypeScript, Tailwind, React Query, Zustand |
|
|
422
425
|
| `react` | React + Vite with modern structure |
|
|
423
426
|
| `express` | Express API with TypeScript + TypeORM + migrations |
|
|
424
427
|
| `nest` | NestJS with TypeORM and JWT auth |
|
|
@@ -433,7 +436,7 @@ cd backend && karnel init nest # NestJS + authentication
|
|
|
433
436
|
Manage environment variables securely:
|
|
434
437
|
|
|
435
438
|
```bash
|
|
436
|
-
karnel env set
|
|
439
|
+
karnel env set # Add key (hidden input)
|
|
437
440
|
karnel env list # List variables
|
|
438
441
|
karnel env ls # List variables
|
|
439
442
|
```
|
|
@@ -448,20 +451,20 @@ Deploy your projects directly from terminal:
|
|
|
448
451
|
karnel deploy vercel # Deploy to Vercel
|
|
449
452
|
karnel deploy railway # Deploy to Railway
|
|
450
453
|
karnel deploy netlify # Deploy to Netlify
|
|
454
|
+
karnel deploy supabase # Deploy to Supabase
|
|
451
455
|
```
|
|
452
456
|
|
|
453
|
-
|
|
457
|
+
Install a platform CLI first with `karnel install deploy --<tool>`.
|
|
454
458
|
|
|
455
459
|
---
|
|
456
460
|
|
|
457
461
|
## karnel open
|
|
458
462
|
|
|
459
|
-
Open documentation for any module
|
|
463
|
+
Open documentation for any module in browser:
|
|
460
464
|
|
|
461
465
|
```bash
|
|
462
466
|
karnel open ai # Open AI module docs
|
|
463
467
|
karnel open db # Open DB module docs
|
|
464
|
-
karnel open ai --opencode # Open OpenCode docs on site
|
|
465
468
|
```
|
|
466
469
|
|
|
467
470
|
Documentation loads from https://karneltermux.vercel.app.
|
|
@@ -473,6 +476,7 @@ Documentation loads from https://karneltermux.vercel.app.
|
|
|
473
476
|
- [Documentation index](docs/README.md)
|
|
474
477
|
- [CLI reference](docs/cli/README.md)
|
|
475
478
|
- [Doctor reference](docs/doctor/README.md)
|
|
479
|
+
- [Troubleshooting](docs/troubleshooting.md)
|
|
476
480
|
- [Architecture](docs/ARCHITECTURE.md)
|
|
477
481
|
- [Documentation changelog](docs/CHANGELOG.md)
|
|
478
482
|
- [Official website](https://karneltermux.vercel.app)
|
|
@@ -570,9 +574,11 @@ karnel update karnel # Update the framework
|
|
|
570
574
|
|
|
571
575
|
`karnel update` requires a target such as `karnel`, `ai`, or `security`.
|
|
572
576
|
`karnel update karnel` first runs the official curl installer, then falls back to
|
|
573
|
-
the local Git checkout and package-manager installs if needed. The
|
|
574
|
-
|
|
575
|
-
|
|
577
|
+
the local Git checkout and package-manager installs if needed. The curl installer
|
|
578
|
+
is pinned to the latest GitHub release tag, and its SHA-256 checksum is verified
|
|
579
|
+
before it runs. The framework checks for a new version in the background at most
|
|
580
|
+
once every 24 hours; the check can use npm or GitHub and writes state under
|
|
581
|
+
`$KARNEL_CACHE`.
|
|
576
582
|
|
|
577
583
|
---
|
|
578
584
|
|
|
@@ -15,6 +15,7 @@ deploy_main() {
|
|
|
15
15
|
list_item "vercel - Deploy to Vercel"
|
|
16
16
|
list_item "railway - Deploy to Railway"
|
|
17
17
|
list_item "netlify - Deploy to Netlify"
|
|
18
|
+
list_item "supabase - Deploy to Supabase"
|
|
18
19
|
echo
|
|
19
20
|
log_info "Usage: ${D_CYAN}karnel deploy vercel${NC}"
|
|
20
21
|
echo
|
|
@@ -34,6 +35,7 @@ deploy_main() {
|
|
|
34
35
|
list_item "vercel - Deploy to Vercel"
|
|
35
36
|
list_item "railway - Deploy to Railway"
|
|
36
37
|
list_item "netlify - Deploy to Netlify"
|
|
38
|
+
list_item "supabase - Deploy to Supabase"
|
|
37
39
|
echo
|
|
38
40
|
log_info "Usage: ${D_CYAN}karnel deploy vercel${NC}"
|
|
39
41
|
echo
|
|
@@ -60,9 +62,16 @@ deploy_main() {
|
|
|
60
62
|
fi
|
|
61
63
|
exec netlify "${@:2}"
|
|
62
64
|
;;
|
|
65
|
+
supabase)
|
|
66
|
+
if ! command -v supabase &>/dev/null; then
|
|
67
|
+
log_warn "Supabase CLI not installed. Run: karnel install deploy --supabase"
|
|
68
|
+
return 1
|
|
69
|
+
fi
|
|
70
|
+
exec supabase "${@:2}"
|
|
71
|
+
;;
|
|
63
72
|
*)
|
|
64
73
|
log_warn "Unknown deploy tool: $tool"
|
|
65
|
-
echo "Available: vercel, railway, netlify"
|
|
74
|
+
echo "Available: vercel, railway, netlify, supabase"
|
|
66
75
|
return 1
|
|
67
76
|
;;
|
|
68
77
|
esac
|
|
@@ -594,11 +594,20 @@ doctor_termux() {
|
|
|
594
594
|
separator_section "AI Tools Installed"
|
|
595
595
|
echo
|
|
596
596
|
|
|
597
|
-
local
|
|
597
|
+
local registry_file="$KARNEL_PATH/tools/ai/all.sh"
|
|
598
|
+
local -a ai_cmds=()
|
|
599
|
+
local registry_line registry_entry binaries
|
|
600
|
+
while IFS= read -r registry_line; do
|
|
601
|
+
registry_entry="${registry_line#*\"}"
|
|
602
|
+
registry_entry="${registry_entry%\"*}"
|
|
603
|
+
binaries="${registry_entry##*:}"
|
|
604
|
+
ai_cmds+=("$binaries")
|
|
605
|
+
done < <(grep -E '^[[:space:]]*"[^:]+:[^:]+:[^"]+"' "$registry_file")
|
|
598
606
|
local ai_count=0
|
|
599
607
|
|
|
600
608
|
for cmd in "${ai_cmds[@]}"; do
|
|
601
|
-
|
|
609
|
+
IFS=, read -r -a binaries <<< "$cmd"
|
|
610
|
+
if command -v "${binaries[0]}" &>/dev/null || { [[ ${#binaries[@]} -gt 1 ]] && command -v "${binaries[1]}" &>/dev/null; }; then
|
|
602
611
|
log_success "$cmd: installed"
|
|
603
612
|
((ai_count++))
|
|
604
613
|
fi
|
|
@@ -615,14 +624,15 @@ doctor_termux() {
|
|
|
615
624
|
fi
|
|
616
625
|
|
|
617
626
|
# Registry consistency check
|
|
618
|
-
local registry_file="$KARNEL_PATH/tools/ai/all.sh"
|
|
619
627
|
if [[ -f "$registry_file" ]]; then
|
|
620
|
-
local registered_tools
|
|
621
|
-
registered_tools=$(grep -cE '^[[:space:]]*"[^:]+:[^:]+:[^"]+"' "$registry_file" 2>/dev/null || echo 0)
|
|
628
|
+
local registered_tools=${#ai_cmds[@]}
|
|
622
629
|
local installed_ai
|
|
623
630
|
installed_ai=0
|
|
624
631
|
for cmd in "${ai_cmds[@]}"; do
|
|
625
|
-
|
|
632
|
+
IFS=, read -r -a binaries <<< "$cmd"
|
|
633
|
+
if command -v "${binaries[0]}" &>/dev/null || { [[ ${#binaries[@]} -gt 1 ]] && command -v "${binaries[1]}" &>/dev/null; }; then
|
|
634
|
+
((installed_ai++))
|
|
635
|
+
fi
|
|
626
636
|
done
|
|
627
637
|
log_info "AI registry: $registered_tools tools | Installed: $installed_ai"
|
|
628
638
|
fi
|
|
@@ -217,6 +217,17 @@ ia_sessions() {
|
|
|
217
217
|
done
|
|
218
218
|
fi
|
|
219
219
|
|
|
220
|
+
# Codebuff sessions
|
|
221
|
+
if [[ -d "$HOME/.codebuff" ]]; then
|
|
222
|
+
for f in "$HOME/.codebuff"/*.json; do
|
|
223
|
+
[[ -f "$f" ]] || continue
|
|
224
|
+
local basename; basename=$(basename "$f")
|
|
225
|
+
local ts; ts=$(stat -c %Y "$f" 2>/dev/null || echo "unknown")
|
|
226
|
+
local readable_ts; readable_ts=$(date -d "@$ts" +%Y%m%d_%H%M%S 2>/dev/null || echo "unknown")
|
|
227
|
+
sessions+=("[codebuff]|$readable_ts|$basename")
|
|
228
|
+
done
|
|
229
|
+
fi
|
|
230
|
+
|
|
220
231
|
# Freebuff sessions
|
|
221
232
|
if [[ -d "$HOME/.freebuff" ]]; then
|
|
222
233
|
for f in "$HOME/.freebuff"/*.json; do
|
|
@@ -431,7 +442,7 @@ ia_routes() {
|
|
|
431
442
|
local -a routes=()
|
|
432
443
|
|
|
433
444
|
# Collect all available AI CLIs (em sincronia com AI_TOOLS_REGISTRY em tools/ai/all.sh)
|
|
434
|
-
for cmd in qwen gemini claude vibe openclaude openclaw ollama codex opencode mimo engram codegraph pi agy mmx gentle-ai gga hermes kimi command-code freebuff kilocode kiro cline crush odysseus kimchi omni-route ctx7 openspec copilot amp cursor omp goose droid supercode puter; do
|
|
445
|
+
for cmd in qwen gemini claude vibe openclaude openclaw ollama codex opencode mimo engram codegraph pi agy mmx gentle-ai gga hermes kimi command-code codebuff freebuff kilocode kiro cline crush odysseus kimchi omni-route ctx7 openspec copilot amp cursor omp goose droid supercode puter; do
|
|
435
446
|
if command -v "$cmd" &>/dev/null; then
|
|
436
447
|
local path
|
|
437
448
|
path=$(command -v "$cmd")
|
|
@@ -31,6 +31,8 @@ install_main() {
|
|
|
31
31
|
list_item "deploy - Deploy CLIs (Vercel, Railway, Netlify, Supabase)"
|
|
32
32
|
list_item "games - Games (Buzz, CTF God, Detective, etc.)"
|
|
33
33
|
list_item "voice - Voice command (speech-to-agent)"
|
|
34
|
+
list_item "plugin - Install plugins from the official registry"
|
|
35
|
+
list_item "supabase - Supabase CLI (types, migrate, functions, secrets)"
|
|
34
36
|
echo
|
|
35
37
|
log_info "Install specific tools with flags:"
|
|
36
38
|
echo
|
|
@@ -28,6 +28,8 @@ list_main() {
|
|
|
28
28
|
list_item "utils - List utility scripts"
|
|
29
29
|
list_item "voice - List voice commands"
|
|
30
30
|
list_item "osint - List OSINT tools"
|
|
31
|
+
list_item "security - List security tools"
|
|
32
|
+
list_item "plugin - List installed plugins"
|
|
31
33
|
echo
|
|
32
34
|
return
|
|
33
35
|
fi
|
|
@@ -187,9 +189,10 @@ _list_ai() {
|
|
|
187
189
|
table_row "Hermes Agent" "--hermes-agent" "hermes" "$(_check_cmd "hermes")"
|
|
188
190
|
table_row "Kimi Code" "--kimi-code" "kimi" "$(_check_cmd "kimi")"
|
|
189
191
|
table_row "Command Code" "--command-code" "command-code" "$(_check_cmd "command-code")"
|
|
192
|
+
table_row "Codebuff" "--codebuff" "codebuff" "$(_check_cmd "codebuff")"
|
|
190
193
|
table_row "Freebuff" "--freebuff" "freebuff" "$(_check_cmd "freebuff")"
|
|
191
|
-
table_row "Kilo Code CLI" "--kilocode-cli" "kilocode" "$(
|
|
192
|
-
table_row "Kiro CLI" "--kiro" "kiro" "$(
|
|
194
|
+
table_row "Kilo Code CLI" "--kilocode-cli" "kilocode,kilo" "$(_check_cmd_any "kilocode,kilo")"
|
|
195
|
+
table_row "Kiro CLI" "--kiro" "kiro,kiro-cli" "$(_check_cmd_any "kiro,kiro-cli")"
|
|
193
196
|
table_row "Crush CLI" "--crush" "crush" "$(_check_cmd "crush")"
|
|
194
197
|
table_row "Cline CLI" "--cline" "cline" "$(_check_cmd "cline")"
|
|
195
198
|
table_row "Odysseus" "--odysseus" "odysseus" "$(_check_cmd "odysseus")"
|
|
@@ -199,7 +202,7 @@ _list_ai() {
|
|
|
199
202
|
table_row "OpenSpec SDD" "--openspec" "openspec" "$(_check_cmd "openspec")"
|
|
200
203
|
table_row "Qoder" "--qoder" "qodercli" "$(_check_cmd "qodercli")"
|
|
201
204
|
table_row "AMP Code CLI" "--ampcode" "amp" "$(_check_cmd "amp")"
|
|
202
|
-
table_row "Cursor CLI" "--cursor-cli" "cursor" "$(
|
|
205
|
+
table_row "Cursor CLI" "--cursor-cli" "cursor,cursor-agent" "$(_check_cmd_any "cursor,cursor-agent")"
|
|
203
206
|
table_row "Oh-My-Pi" "--oh-my-pi" "omp" "$(_check_cmd "omp")"
|
|
204
207
|
table_row "Goose CLI" "--goose" "goose" "$(_check_cmd "goose")"
|
|
205
208
|
table_row "Factory Droid" "--droid" "droid" "$(_check_cmd "droid")"
|
|
@@ -262,6 +265,8 @@ _list_dev() {
|
|
|
262
265
|
table_row "Shfmt" "--shfmt" "$(_check_pkg "shfmt")"
|
|
263
266
|
table_row "Make" "--make" "$(_check_pkg "make")"
|
|
264
267
|
table_row "Udocker" "--udocker" "$(_check_pkg "udocker")"
|
|
268
|
+
table_row "OpenSSH" "--openssh" "$(_check_pkg "openssh")"
|
|
269
|
+
table_row "Tmux" "--tmux" "$(_check_pkg "tmux")"
|
|
265
270
|
table_row "Snyk" "--snyk" "$(_check_cmd "snyk")"
|
|
266
271
|
table_end
|
|
267
272
|
|
|
@@ -289,7 +294,7 @@ _list_games() {
|
|
|
289
294
|
table_end
|
|
290
295
|
|
|
291
296
|
echo
|
|
292
|
-
log_info "Install specific: ${D_CYAN}karnel install games --buzz --
|
|
297
|
+
log_info "Install specific: ${D_CYAN}karnel install games --buzz --ctfgod${NC}"
|
|
293
298
|
log_info "Install all: ${D_CYAN}karnel install games${NC}"
|
|
294
299
|
echo
|
|
295
300
|
}
|
|
@@ -467,6 +472,20 @@ _check_cmd() {
|
|
|
467
472
|
fi
|
|
468
473
|
}
|
|
469
474
|
|
|
475
|
+
# Check if any of the comma-separated commands exists
|
|
476
|
+
_check_cmd_any() {
|
|
477
|
+
local bin_list="$1"
|
|
478
|
+
local bin
|
|
479
|
+
IFS=',' read -ra bins <<< "$bin_list"
|
|
480
|
+
for bin in "${bins[@]}"; do
|
|
481
|
+
if command -v "$bin" &>/dev/null; then
|
|
482
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
483
|
+
return 0
|
|
484
|
+
fi
|
|
485
|
+
done
|
|
486
|
+
echo -e "${D_RED}not installed${NC}"
|
|
487
|
+
}
|
|
488
|
+
|
|
470
489
|
# Check if package is installed via pkg
|
|
471
490
|
_check_pkg() {
|
|
472
491
|
local pkg="$1"
|
|
@@ -137,7 +137,6 @@ open_help() {
|
|
|
137
137
|
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "osint" "OSINT tools"
|
|
138
138
|
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "plugin" "Plugin system"
|
|
139
139
|
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "security" "Security tools"
|
|
140
|
-
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "backup" "Backup & Restore"
|
|
141
140
|
echo
|
|
142
141
|
separator_section "Website"
|
|
143
142
|
echo
|
|
@@ -30,6 +30,9 @@ reinstall_main() {
|
|
|
30
30
|
list_item "deploy - Reinstall deploy CLIs (Vercel, Railway, Netlify, Supabase)"
|
|
31
31
|
list_item "voice - Reinstall voice command"
|
|
32
32
|
list_item "osint - Reinstall OSINT tools"
|
|
33
|
+
list_item "security - Reinstall security tools"
|
|
34
|
+
list_item "plugin - Reinstall plugins"
|
|
35
|
+
list_item "supabase - Reinstall Supabase CLI"
|
|
33
36
|
echo
|
|
34
37
|
log_info "Reinstall specific tools with flags:"
|
|
35
38
|
echo
|
|
@@ -166,6 +169,7 @@ _reinstall_full_module() {
|
|
|
166
169
|
*)
|
|
167
170
|
log_warn "Unknown reinstall target: $target"
|
|
168
171
|
echo "Run 'karnel reinstall' to see available targets"
|
|
172
|
+
return 1
|
|
169
173
|
;;
|
|
170
174
|
esac
|
|
171
175
|
}
|
|
@@ -271,6 +275,10 @@ _reinstall_specific_tools() {
|
|
|
271
275
|
reinstall_command_code
|
|
272
276
|
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
273
277
|
;;
|
|
278
|
+
codebuff)
|
|
279
|
+
reinstall_codebuff
|
|
280
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
281
|
+
;;
|
|
274
282
|
freebuff)
|
|
275
283
|
reinstall_freebuff
|
|
276
284
|
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
@@ -291,6 +299,30 @@ _reinstall_specific_tools() {
|
|
|
291
299
|
reinstall_puter
|
|
292
300
|
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
293
301
|
;;
|
|
302
|
+
qoder)
|
|
303
|
+
reinstall_qoder
|
|
304
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
305
|
+
;;
|
|
306
|
+
ampcode)
|
|
307
|
+
reinstall_ampcode
|
|
308
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
309
|
+
;;
|
|
310
|
+
cursor-cli)
|
|
311
|
+
reinstall_cursor_cli
|
|
312
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
313
|
+
;;
|
|
314
|
+
oh-my-pi)
|
|
315
|
+
reinstall_oh_my_pi
|
|
316
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
317
|
+
;;
|
|
318
|
+
goose)
|
|
319
|
+
reinstall_goose
|
|
320
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
321
|
+
;;
|
|
322
|
+
droid)
|
|
323
|
+
reinstall_droid
|
|
324
|
+
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
325
|
+
;;
|
|
294
326
|
copilot-termux)
|
|
295
327
|
reinstall_copilot_termux
|
|
296
328
|
case $? in 0) ((reinstalled_count++));; 1) ((failed_count++));; esac
|
|
@@ -819,9 +851,13 @@ _reinstall_specific_tools() {
|
|
|
819
851
|
utils)
|
|
820
852
|
_batch_tool_action "utils" "reinstall" "${tools[@]}"
|
|
821
853
|
;;
|
|
854
|
+
security|deploy)
|
|
855
|
+
_batch_tool_action "$module" "reinstall" "${tools[@]}"
|
|
856
|
+
;;
|
|
822
857
|
*)
|
|
823
858
|
log_warn "Unknown reinstall target: $module"
|
|
824
859
|
echo "Run 'karnel reinstall' to see available targets"
|
|
860
|
+
return 1
|
|
825
861
|
;;
|
|
826
862
|
esac
|
|
827
863
|
}
|
|
@@ -22,7 +22,6 @@ show_main() {
|
|
|
22
22
|
list_item "karnel show osint --robin"
|
|
23
23
|
list_item "karnel show backup Show backup docs"
|
|
24
24
|
list_item "karnel show restore Show restore docs"
|
|
25
|
-
list_item "karnel show all --<tool>"
|
|
26
25
|
echo
|
|
27
26
|
log_info "Run ${D_CYAN}karnel list <module>${NC} to see available tools"
|
|
28
27
|
echo
|
|
@@ -66,15 +65,21 @@ show_main() {
|
|
|
66
65
|
log_error "Unknown module: $module"
|
|
67
66
|
return 1
|
|
68
67
|
fi
|
|
68
|
+
local documented_tools=0
|
|
69
69
|
for t in "$tool_dir"/*/; do
|
|
70
70
|
local name="${t%/}"
|
|
71
71
|
name="${name##*/}"
|
|
72
72
|
if [[ -f "$tool_dir/$name/README.md" ]]; then
|
|
73
|
+
((documented_tools++))
|
|
73
74
|
local first_line
|
|
74
75
|
first_line=$(head -1 "$tool_dir/$name/README.md" 2>/dev/null)
|
|
75
76
|
printf " ${D_CYAN}%-16s${NC} %s\n" "$name" "${first_line#\# }"
|
|
76
77
|
fi
|
|
77
78
|
done
|
|
79
|
+
if [[ $documented_tools -eq 0 ]]; then
|
|
80
|
+
log_warn "No tool documentation is available for $module"
|
|
81
|
+
return 1
|
|
82
|
+
fi
|
|
78
83
|
echo
|
|
79
84
|
log_info "Run ${D_CYAN}karnel show $module --<tool>${NC} for details"
|
|
80
85
|
echo
|
|
@@ -30,6 +30,9 @@ uninstall_main() {
|
|
|
30
30
|
list_item "deploy - Remove deploy CLIs (Vercel, Railway, Netlify, Supabase)"
|
|
31
31
|
list_item "voice - Remove voice command"
|
|
32
32
|
list_item "osint - Remove OSINT tools"
|
|
33
|
+
list_item "security - Remove security tools"
|
|
34
|
+
list_item "plugin - Remove plugins"
|
|
35
|
+
list_item "supabase - Remove Supabase CLI"
|
|
33
36
|
echo
|
|
34
37
|
log_info "Uninstall specific tools with flags:"
|
|
35
38
|
echo
|
|
@@ -29,6 +29,7 @@ update_main() {
|
|
|
29
29
|
list_item "utils - Update utility scripts"
|
|
30
30
|
list_item "games - Update games"
|
|
31
31
|
list_item "deploy - Update deploy CLIs (Vercel, Railway, Netlify, Supabase)"
|
|
32
|
+
list_item "supabase - Update Supabase CLI"
|
|
32
33
|
list_item "voice - Update voice command"
|
|
33
34
|
list_item "osint - Update OSINT tools"
|
|
34
35
|
list_item "security - Update security tools"
|
|
@@ -212,20 +213,48 @@ _update_cleanup() {
|
|
|
212
213
|
_update_try_curl() {
|
|
213
214
|
command -v curl &>/dev/null || return 1
|
|
214
215
|
|
|
215
|
-
local installer
|
|
216
|
-
|
|
216
|
+
local meta installer sumfile tag
|
|
217
|
+
meta=$(mktemp "${TMPDIR:-/tmp}/karnel-meta.XXXXXX") || return 1
|
|
218
|
+
installer=$(mktemp "${TMPDIR:-/tmp}/karnel-install.XXXXXX") || { rm -f "$meta"; return 1; }
|
|
219
|
+
sumfile=$(mktemp "${TMPDIR:-/tmp}/karnel-sum.XXXXXX") || { rm -f "$meta" "$installer"; return 1; }
|
|
217
220
|
|
|
218
221
|
log_info "Trying the official curl installer..."
|
|
222
|
+
|
|
219
223
|
if ! curl --fail --silent --show-error --location \
|
|
220
|
-
"https://
|
|
224
|
+
"https://api.github.com/repos/israelmarques1024-dotcom/karnel-termux/releases/latest" \
|
|
225
|
+
-o "$meta"; then
|
|
226
|
+
rm -f "$meta" "$installer" "$sumfile"
|
|
227
|
+
return 1
|
|
228
|
+
fi
|
|
229
|
+
|
|
230
|
+
tag=$(_update_latest_release_tag "$meta")
|
|
231
|
+
if [[ -z "$tag" || ! "$tag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
232
|
+
log_error "GitHub returned an invalid release tag: ${tag:-none}"
|
|
233
|
+
rm -f "$meta" "$installer" "$sumfile"
|
|
234
|
+
return 1
|
|
235
|
+
fi
|
|
236
|
+
|
|
237
|
+
if ! curl --fail --silent --show-error --location \
|
|
238
|
+
"https://github.com/israelmarques1024-dotcom/karnel-termux/releases/download/$tag/karnel-termux-install.sh.sha256" \
|
|
239
|
+
-o "$sumfile" ||
|
|
240
|
+
! curl --fail --silent --show-error --location \
|
|
241
|
+
"https://github.com/israelmarques1024-dotcom/karnel-termux/releases/download/$tag/karnel-termux-install.sh" \
|
|
221
242
|
-o "$installer"; then
|
|
222
|
-
rm -f "$installer"
|
|
243
|
+
rm -f "$meta" "$installer" "$sumfile"
|
|
244
|
+
return 1
|
|
245
|
+
fi
|
|
246
|
+
|
|
247
|
+
if ! _verify_sha256 "$installer" "$sumfile"; then
|
|
248
|
+
log_error "Checksum verification failed for the curl installer"
|
|
249
|
+
rm -f "$meta" "$installer" "$sumfile"
|
|
223
250
|
return 1
|
|
224
251
|
fi
|
|
225
252
|
|
|
253
|
+
rm -f "$meta" "$sumfile"
|
|
254
|
+
|
|
226
255
|
if bash "$installer"; then
|
|
227
256
|
rm -f "$installer"
|
|
228
|
-
log_success "Karnel-Termux updated via curl"
|
|
257
|
+
log_success "Karnel-Termux updated via curl (v$tag)"
|
|
229
258
|
return 0
|
|
230
259
|
fi
|
|
231
260
|
|
|
@@ -234,6 +263,41 @@ _update_try_curl() {
|
|
|
234
263
|
return 1
|
|
235
264
|
}
|
|
236
265
|
|
|
266
|
+
_update_latest_release_tag() {
|
|
267
|
+
local meta="$1"
|
|
268
|
+
if command -v node &>/dev/null; then
|
|
269
|
+
node -e '
|
|
270
|
+
let s = "";
|
|
271
|
+
process.stdin.resume();
|
|
272
|
+
process.stdin.on("data", (d) => { s += d; });
|
|
273
|
+
process.stdin.on("end", () => {
|
|
274
|
+
try { process.stdout.write(JSON.parse(s).tag_name || ""); } catch (e) {}
|
|
275
|
+
});
|
|
276
|
+
' < "$meta"
|
|
277
|
+
return
|
|
278
|
+
fi
|
|
279
|
+
grep -oP '"tag_name":\s*"\K[^"]+' "$meta" 2>/dev/null | head -n 1
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_verify_sha256() {
|
|
283
|
+
local file="$1" sumfile="$2"
|
|
284
|
+
local expected actual
|
|
285
|
+
expected=$(awk 'NR == 1 { print $1 }' "$sumfile")
|
|
286
|
+
[[ -n "$expected" ]] || return 1
|
|
287
|
+
if command -v sha256sum &>/dev/null; then
|
|
288
|
+
actual=$(sha256sum "$file" | awk '{ print $1 }')
|
|
289
|
+
elif command -v node &>/dev/null; then
|
|
290
|
+
actual=$(node -e '
|
|
291
|
+
const fs = require("fs");
|
|
292
|
+
const crypto = require("crypto");
|
|
293
|
+
process.stdout.write(crypto.createHash("sha256").update(fs.readFileSync(process.argv[1])).digest("hex"));
|
|
294
|
+
' "$file")
|
|
295
|
+
else
|
|
296
|
+
return 1
|
|
297
|
+
fi
|
|
298
|
+
[[ "$actual" == "$expected" ]]
|
|
299
|
+
}
|
|
300
|
+
|
|
237
301
|
_update_try_git() {
|
|
238
302
|
[[ -d "$KARNEL_PATH/../.git" ]] || return 1
|
|
239
303
|
loading "Updating via git" _update_karnel_repo
|
|
@@ -61,7 +61,14 @@ voice_main() {
|
|
|
61
61
|
# Parse all arguments: flags can appear anywhere
|
|
62
62
|
while [[ $# -gt 0 ]]; do
|
|
63
63
|
case "$1" in
|
|
64
|
-
--lang)
|
|
64
|
+
--lang)
|
|
65
|
+
if [[ -z "${2:-}" || "${2:-}" == -* ]]; then
|
|
66
|
+
log_error "--lang requires a language code"
|
|
67
|
+
return 1
|
|
68
|
+
fi
|
|
69
|
+
lang="$2"
|
|
70
|
+
shift 2
|
|
71
|
+
;;
|
|
65
72
|
--raw) skip_edit=true; shift ;;
|
|
66
73
|
--no-clip) no_clip=true; shift ;;
|
|
67
74
|
--help|-h) voice_help; return ;;
|