karnel-termux 4.8.0 → 4.9.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.
Files changed (197) hide show
  1. package/README.md +9 -3
  2. package/install.sh +2 -2
  3. package/karnel/cli/commands/backup.sh +5 -2
  4. package/karnel/cli/commands/doctor/fixes.sh +111 -13
  5. package/karnel/cli/commands/doctor.sh +104 -10
  6. package/karnel/cli/commands/init.sh +2 -2
  7. package/karnel/cli/commands/install.sh +26 -44
  8. package/karnel/cli/commands/list.sh +74 -13
  9. package/karnel/cli/commands/open.sh +18 -2
  10. package/karnel/cli/commands/reinstall.sh +68 -46
  11. package/karnel/cli/commands/restore.sh +16 -0
  12. package/karnel/cli/commands/search.sh +1 -0
  13. package/karnel/cli/commands/start.sh +7 -2
  14. package/karnel/cli/commands/uninstall.sh +38 -0
  15. package/karnel/cli/commands/update.sh +34 -0
  16. package/karnel/cli/commands/voice.sh +11 -6
  17. package/karnel/cli/karnel.sh +81 -45
  18. package/karnel/modules/ai.sh +21 -6
  19. package/karnel/modules/deploy.sh +4 -0
  20. package/karnel/modules/games.sh +81 -4
  21. package/karnel/modules/network.sh +88 -0
  22. package/karnel/modules/shell.sh +1 -1
  23. package/karnel/modules/ui.sh +4 -0
  24. package/karnel/modules/utils.sh +88 -0
  25. package/karnel/modules/voice.sh +8 -2
  26. package/karnel/tools/ai/all.sh +1 -0
  27. package/karnel/tools/ai/antigravity-cli/install.sh +0 -0
  28. package/karnel/tools/ai/claude-code/install.sh +0 -0
  29. package/karnel/tools/ai/cline/bin/cline +28 -0
  30. package/karnel/tools/ai/cline/helper/cline_helper.c +54 -0
  31. package/karnel/tools/ai/cline/install.sh +8 -8
  32. package/karnel/tools/ai/codegraph/install.sh +8 -5
  33. package/karnel/tools/ai/codex/install.sh +0 -0
  34. package/karnel/tools/ai/command-code/install.sh +0 -0
  35. package/karnel/tools/ai/copilot-termux/install.sh +0 -0
  36. package/karnel/tools/ai/crush/install.sh +0 -0
  37. package/karnel/tools/ai/ctx7/install.sh +0 -0
  38. package/karnel/tools/ai/engram/install.sh +5 -2
  39. package/karnel/tools/ai/freebuff/install.sh +0 -0
  40. package/karnel/tools/ai/gemini-cli/install.sh +0 -0
  41. package/karnel/tools/ai/gentle-ai/install.sh +1 -1
  42. package/karnel/tools/ai/gga/termux.patch +70 -0
  43. package/karnel/tools/ai/hermes-agent/install.sh +0 -0
  44. package/karnel/tools/ai/kilocode-cli/install.sh +0 -0
  45. package/karnel/tools/ai/kimchi-code/install.sh +3 -1
  46. package/karnel/tools/ai/kimi-code/install.sh +0 -0
  47. package/karnel/tools/ai/kiro/install.sh +0 -0
  48. package/karnel/tools/ai/mimocode/install.sh +0 -0
  49. package/karnel/tools/ai/minimax-cli/install.sh +0 -0
  50. package/karnel/tools/ai/mistral-vibe/install.sh +0 -0
  51. package/karnel/tools/ai/odysseus/install.sh +0 -0
  52. package/karnel/tools/ai/ollama/install.sh +0 -0
  53. package/karnel/tools/ai/openclaude/install.sh +0 -0
  54. package/karnel/tools/ai/openclaw/install.sh +0 -0
  55. package/karnel/tools/ai/opencode/install.sh +0 -0
  56. package/karnel/tools/ai/openspec/install.sh +0 -0
  57. package/karnel/tools/ai/pi/install.sh +0 -0
  58. package/karnel/tools/ai/qoder/README.md +50 -0
  59. package/karnel/tools/ai/qoder/bin/qodercli +28 -0
  60. package/karnel/tools/ai/qoder/helper/qoder_helper.c +47 -0
  61. package/karnel/tools/ai/qoder/install.sh +367 -0
  62. package/karnel/tools/ai/qwen-code/install.sh +0 -0
  63. package/karnel/tools/auto/all.sh +1 -1
  64. package/karnel/tools/auto/n8n/install.sh +0 -0
  65. package/karnel/tools/db/all.sh +1 -1
  66. package/karnel/tools/db/mariadb/install.sh +0 -0
  67. package/karnel/tools/db/mongodb/install.sh +0 -0
  68. package/karnel/tools/db/postgresql/install.sh +0 -0
  69. package/karnel/tools/db/sqlite/install.sh +0 -0
  70. package/karnel/tools/deploy/all.sh +2 -2
  71. package/karnel/tools/deploy/netlify/install.sh +0 -0
  72. package/karnel/tools/deploy/railway/install.sh +0 -0
  73. package/karnel/tools/deploy/vercel/install.sh +0 -0
  74. package/karnel/tools/dev/all.sh +1 -21
  75. package/karnel/tools/dev/bat/install.sh +0 -0
  76. package/karnel/tools/dev/bc/install.sh +0 -0
  77. package/karnel/tools/dev/cloudflared/install.sh +0 -0
  78. package/karnel/tools/dev/curl/install.sh +0 -0
  79. package/karnel/tools/dev/fzf/install.sh +0 -0
  80. package/karnel/tools/dev/gh/install.sh +0 -0
  81. package/karnel/tools/dev/html2text/install.sh +0 -0
  82. package/karnel/tools/dev/imagemagick/install.sh +0 -0
  83. package/karnel/tools/dev/jq/install.sh +0 -0
  84. package/karnel/tools/dev/lsd/install.sh +0 -0
  85. package/karnel/tools/dev/make/install.sh +0 -0
  86. package/karnel/tools/dev/ncurses/install.sh +0 -0
  87. package/karnel/tools/dev/proot/install.sh +0 -0
  88. package/karnel/tools/dev/shfmt/install.sh +0 -0
  89. package/karnel/tools/dev/snyk/install.sh +0 -0
  90. package/karnel/tools/dev/tmate/install.sh +0 -0
  91. package/karnel/tools/dev/translate/install.sh +0 -0
  92. package/karnel/tools/dev/tree/install.sh +0 -0
  93. package/karnel/tools/dev/udocker/install.sh +0 -0
  94. package/karnel/tools/dev/wget/install.sh +0 -0
  95. package/karnel/tools/editor/all.sh +1 -1
  96. package/karnel/tools/editor/code-server/install.sh +0 -0
  97. package/karnel/tools/games/all.sh +1 -1
  98. package/karnel/tools/games/arcade/install.sh +0 -0
  99. package/karnel/tools/games/buzz/install.sh +0 -0
  100. package/karnel/tools/games/ctfgod/install.sh +0 -0
  101. package/karnel/tools/games/detective/install.sh +0 -0
  102. package/karnel/tools/games/pet-friends/install.sh +0 -0
  103. package/karnel/tools/games/tamagotchi/install.sh +0 -0
  104. package/karnel/tools/lang/all.sh +2 -1
  105. package/karnel/tools/lang/bun/bin/bun +27 -0
  106. package/karnel/tools/lang/bun/bin/bunx +27 -0
  107. package/karnel/tools/lang/bun/install.sh +318 -0
  108. package/karnel/tools/lang/bun/src/bun-android-shim.c +481 -0
  109. package/karnel/tools/lang/bun/src/bun-bundle.c +96 -0
  110. package/karnel/tools/lang/bun/src/bun-shim.c +352 -0
  111. package/karnel/tools/lang/bun/src/bun_wrapper.c +55 -0
  112. package/karnel/tools/lang/clang/install.sh +0 -0
  113. package/karnel/tools/lang/golang/install.sh +0 -0
  114. package/karnel/tools/lang/nodejs/install.sh +0 -0
  115. package/karnel/tools/lang/perl/install.sh +0 -0
  116. package/karnel/tools/lang/php/install.sh +0 -0
  117. package/karnel/tools/lang/python/install.sh +0 -0
  118. package/karnel/tools/lang/rust/install.sh +0 -0
  119. package/karnel/tools/network/all.sh +65 -0
  120. package/karnel/tools/network/dark/README.md +45 -0
  121. package/karnel/tools/network/dark/dark.py +709 -0
  122. package/karnel/tools/network/dark/install.sh +51 -0
  123. package/karnel/tools/network/dedsec-network/README.md +42 -0
  124. package/karnel/tools/network/dedsec-network/dedsec-network.py +709 -0
  125. package/karnel/tools/network/dedsec-network/install.sh +50 -0
  126. package/karnel/tools/npm/all.sh +1 -1
  127. package/karnel/tools/npm/live-server/install.sh +0 -0
  128. package/karnel/tools/npm/localtunnel/install.sh +0 -0
  129. package/karnel/tools/npm/markserv/install.sh +0 -0
  130. package/karnel/tools/npm/ncu/install.sh +0 -0
  131. package/karnel/tools/npm/nestjs/install.sh +0 -0
  132. package/karnel/tools/npm/ngrok/install.sh +0 -0
  133. package/karnel/tools/npm/prettier/install.sh +0 -0
  134. package/karnel/tools/npm/psqlformat/install.sh +0 -0
  135. package/karnel/tools/npm/turbopack/install.sh +0 -0
  136. package/karnel/tools/npm/typescript/install.sh +0 -0
  137. package/karnel/tools/npm/vercel/install.sh +0 -0
  138. package/karnel/tools/osint/all.sh +1 -1
  139. package/karnel/tools/osint/robin/common.sh +0 -0
  140. package/karnel/tools/osint/robin/install.sh +0 -0
  141. package/karnel/tools/shell/all.sh +1 -1
  142. package/karnel/tools/shell/better-npm/install.sh +0 -0
  143. package/karnel/tools/shell/fzf-tab/install.sh +0 -0
  144. package/karnel/tools/shell/history-substring/install.sh +0 -0
  145. package/karnel/tools/shell/powerlevel10k/install.sh +0 -0
  146. package/karnel/tools/shell/you-should-use/install.sh +0 -0
  147. package/karnel/tools/shell/zsh-autopair/install.sh +0 -0
  148. package/karnel/tools/shell/zsh-autosuggestions/install.sh +0 -0
  149. package/karnel/tools/shell/zsh-completions/install.sh +0 -0
  150. package/karnel/tools/shell/zsh-defer/install.sh +0 -0
  151. package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +0 -0
  152. package/karnel/tools/ui/all.sh +1 -1
  153. package/karnel/tools/ui/banner/install.sh +0 -0
  154. package/karnel/tools/ui/cursor/install.sh +0 -0
  155. package/karnel/tools/ui/extra-keys/install.sh +0 -0
  156. package/karnel/tools/ui/font/install.sh +0 -0
  157. package/karnel/tools/utils/all.sh +88 -0
  158. package/karnel/tools/utils/applaunch/README.md +43 -0
  159. package/karnel/tools/{dev → utils}/applaunch/install.sh +3 -3
  160. package/karnel/tools/utils/fconv/README.md +41 -0
  161. package/karnel/tools/{dev → utils}/fconv/install.sh +3 -3
  162. package/karnel/tools/utils/filecheck/README.md +41 -0
  163. package/karnel/tools/{dev → utils}/filecheck/install.sh +3 -3
  164. package/karnel/tools/utils/httptmux/README.md +42 -0
  165. package/karnel/tools/{dev → utils}/httptmux/install.sh +0 -0
  166. package/karnel/tools/utils/notes/README.md +41 -0
  167. package/karnel/tools/{dev → utils}/notes/install.sh +3 -3
  168. package/karnel/tools/utils/passman/README.md +42 -0
  169. package/karnel/tools/{dev → utils}/passman/install.sh +3 -3
  170. package/karnel/tools/utils/qrcode/README.md +41 -0
  171. package/karnel/tools/utils/qrcode/install.sh +50 -0
  172. package/karnel/tools/utils/qrcode/qrcode.py +89 -0
  173. package/karnel/tools/utils/splash/README.md +41 -0
  174. package/karnel/tools/{dev → utils}/splash/install.sh +3 -3
  175. package/karnel/tools/utils/treex/README.md +41 -0
  176. package/karnel/tools/{dev → utils}/treex/install.sh +3 -3
  177. package/karnel/tools/utils/websites/README.md +41 -0
  178. package/karnel/tools/{dev → utils}/websites/install.sh +3 -3
  179. package/karnel/tools/utils/zork/README.md +43 -0
  180. package/karnel/tools/{dev → utils}/zork/install.sh +3 -3
  181. package/karnel/utils/banner.sh +8 -6
  182. package/karnel/utils/bootstrap.sh +1 -1
  183. package/karnel/utils/env.sh +1 -1
  184. package/karnel/utils/log.sh +0 -1
  185. package/karnel/utils/version.sh +2 -2
  186. package/package.json +1 -1
  187. package/scripts/completion.bash +3 -3
  188. package/scripts/completion.zsh +0 -12
  189. package/karnel/cli/commands/doctor/system.sh +0 -89
  190. /package/karnel/tools/{dev → utils}/applaunch/applaunch.py +0 -0
  191. /package/karnel/tools/{dev → utils}/fconv/fconv.py +0 -0
  192. /package/karnel/tools/{dev → utils}/filecheck/filecheck.py +0 -0
  193. /package/karnel/tools/{dev → utils}/notes/notes.py +0 -0
  194. /package/karnel/tools/{dev → utils}/passman/passman.py +0 -0
  195. /package/karnel/tools/{dev → utils}/splash/splash.py +0 -0
  196. /package/karnel/tools/{dev → utils}/treex/treex.py +0 -0
  197. /package/karnel/tools/{dev → utils}/websites/websites.py +0 -0
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.8.0-0078D4?style=for-the-badge" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-4.9.0-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">
@@ -36,7 +36,9 @@ Created by **Israel Marques**.
36
36
  - **31 AI agents** for coding — Claude, Gemini, OpenCode, Ollama, Cline, karnelRoute and more
37
37
  - **7 languages** — Node.js, Python, Go, Rust, C/C++, PHP, Perl
38
38
  - **5 databases** — PostgreSQL, MariaDB, SQLite, MongoDB, Redis
39
- - **32 dev tools** — gh, curl, fzf, bat, lsd, jq, tmux, openssh, snyk and more
39
+ - **22 dev tools** — gh, curl, fzf, bat, lsd, jq, tmux, openssh, snyk and more
40
+ - **11 utility scripts** — fconv, notes, treex, qrcode, zork and more
41
+ - **2 network tools** — dark, dedsec-network
40
42
  - **3 deploy CLIs** — Vercel, Railway, Netlify
41
43
  - **Responsible OSINT** — Robin v2.8 through Tor with a loopback-only web UI
42
44
  - **Professional editor** — code-server (VS Code in browser)
@@ -119,6 +121,8 @@ karnel
119
121
  | `auto` | Automation with n8n | `karnel install auto` |
120
122
  | `deploy` | Vercel, Railway, Netlify | `karnel install deploy` |
121
123
  | `games` | Buzz, CTF God, Detective, Tamagotchi and more | `karnel install games` |
124
+ | `network` | Dark Web OSINT, DedSec Network Toolkit | `karnel install network` |
125
+ | `utils` | fconv, notes, treex, passman, applaunch, qrcode, zork and more | `karnel install utils` |
122
126
  | `osint` | Robin v2.8, Tor, Streamlit, and LLM providers | `karnel install osint` |
123
127
  | `voice` | Speech-to-agent through Termux:API | `karnel install voice` |
124
128
 
@@ -428,12 +432,14 @@ karnel/
428
432
  │ │ ├── ai/ # 31 AI agents
429
433
  │ │ ├── lang/ # Languages
430
434
  │ │ ├── db/ # Databases
431
- │ │ ├── dev/ # Dev tools
435
+ │ │ ├── dev/ # 22 dev tools
432
436
  │ │ ├── editor/ # Code editor
433
437
  │ │ ├── npm/ # Global npm packages
434
438
  │ │ ├── shell/ # ZSH plugins
435
439
  │ │ ├── ui/ # Termux interface
436
440
  │ │ ├── auto/ # Automation
441
+ │ │ ├── network/ # 2 network tools
442
+ │ │ ├── utils/ # 11 utility tools
437
443
  │ │ └── deploy/ # Deploy CLIs
438
444
  │ └── utils/ # Utilities (banner, log, env, etc.)
439
445
  ├── install.sh # Installation script
package/install.sh CHANGED
@@ -111,8 +111,8 @@ bootstrap_dependencies() {
111
111
 
112
112
  if [[ $needed_tput -eq 1 ]]; then
113
113
  echo -e " ${P_BORDER}→${P_NC} Installing ncurses-utils..."
114
- pkg install -y ncurses-utils &>/dev/null
115
- echo -e " ${P_OK}✔${P_NC} ncurses-utils installed"
114
+ pkg install -y ncurses &>/dev/null
115
+ echo -e " ${P_OK}✔${P_NC} ncurses installed"
116
116
  echo
117
117
  fi
118
118
 
@@ -47,7 +47,7 @@ backup_main() {
47
47
  local tool
48
48
  tool=$(basename "${t%/}")
49
49
  local bins
50
- bins=$(grep "\"$tool:" "$m/all.sh" 2>/dev/null | cut -d: -f3 | tr -d '"')
50
+ bins=$(grep -F "\"$tool:" "$m/all.sh" 2>/dev/null | cut -d: -f3 | tr -d '"')
51
51
  local found=false
52
52
  for b in ${bins//,/ }; do
53
53
  command -v "$b" &>/dev/null && found=true && break
@@ -91,9 +91,12 @@ backup_main() {
91
91
  tar -czf "$file" -C "$tmp" . 2>/dev/null
92
92
  rm -rf "$tmp"
93
93
 
94
- local size
94
+ local size checksum
95
95
  size=$(du -h "$file" | awk '{print $1}')
96
+ checksum=$(sha256sum "$file" | awk '{print $1}')
97
+ echo "$checksum" > "$file.sha256"
96
98
  log_success "Backup: $(basename "$file") ($size)"
99
+ log_success "Checksum (SHA256): ${checksum:0:16}...${checksum: -16}"
97
100
 
98
101
  # Cloud
99
102
  if $cloud; then
@@ -134,6 +134,7 @@ _fix_banner() {
134
134
 
135
135
  $marker
136
136
  source "$KARNEL_UTILS/banner.sh"
137
+ render_banner
137
138
  EOF
138
139
  return 0
139
140
  fi
@@ -273,19 +274,6 @@ _fix_proot_ubuntu() {
273
274
  return 1
274
275
  }
275
276
 
276
- _fix_dns() {
277
- if command -v nslookup &>/dev/null && nslookup github.com &>/dev/null; then
278
- return 0
279
- fi
280
- local resolv_conf="$PREFIX/etc/resolv.conf"
281
- if [[ -w "$resolv_conf" ]] || [[ -w "$PREFIX/etc" ]]; then
282
- cp "$resolv_conf" "${resolv_conf}.bak" 2>/dev/null
283
- echo 'nameserver 8.8.8.8' > "$resolv_conf" 2>/dev/null && return 0
284
- echo 'nameserver 8.8.4.4' >> "$resolv_conf" 2>/dev/null || true
285
- fi
286
- return 1
287
- }
288
-
289
277
  _fix_mirror() {
290
278
  if command -v termux-change-repo &>/dev/null; then
291
279
  termux-change-repo 2>/dev/null
@@ -325,3 +313,113 @@ _fix_url_quote_magic() {
325
313
  "$uqm_file" 2>/dev/null
326
314
  return $?
327
315
  }
316
+
317
+ # ===== SCRIPT KEEPER FIX CALLBACKS =====
318
+
319
+ _fix_script_symlinks() {
320
+ local fixed=0 module_dir tool_dir
321
+ while IFS= read -r -d '' module_dir; do
322
+ while IFS= read -r -d '' tool_dir; do
323
+ local installer="$tool_dir/install.sh"
324
+ [[ -f "$installer" ]] || continue
325
+ local tool_name
326
+ tool_name=$(basename "$tool_dir")
327
+ local bin_names
328
+ bin_names=$(grep -E '^local BIN_NAME=' "$installer" 2>/dev/null | head -1 | sed "s/.*BIN_NAME=\"\?//;s/\"\?$//")
329
+ [[ -z "$bin_names" ]] && bin_names="$tool_name"
330
+ for bin_name in $bin_names; do
331
+ local expected="$tool_dir/$bin_name.py"
332
+ local link="$PREFIX/bin/$bin_name"
333
+ if [[ -L "$link" ]]; then
334
+ local target
335
+ target=$(readlink "$link")
336
+ if [[ "$target" != "$expected" ]]; then
337
+ ln -sf "$expected" "$link" 2>/dev/null && ((fixed++))
338
+ fi
339
+ fi
340
+ done
341
+ done < <(find "$module_dir" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
342
+ done < <(find "$KARNEL_PATH/tools/" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
343
+ [[ $fixed -gt 0 ]] && log_success "Fixed $fixed symlink(s)"
344
+ return 0
345
+ }
346
+
347
+ _fix_script_shebangs() {
348
+ local fixed=0 f
349
+ while IFS= read -r -d '' f; do
350
+ local shebang
351
+ shebang=$(head -1 "$f" 2>/dev/null | tr -d '\0')
352
+ case "$shebang" in
353
+ "#!/usr/bin/env node")
354
+ sed -i "1s|^.*$|#!$PREFIX/bin/node|" "$f" && ((fixed++)) ;;
355
+ "#!/usr/bin/env bash"|"#!/usr/bin/env sh")
356
+ sed -i "1s|^.*$|#!$PREFIX/bin/bash|" "$f" && ((fixed++)) ;;
357
+ "#!/usr/bin/env python3"|"#!/usr/bin/env python")
358
+ sed -i "1s|^.*$|#!$PREFIX/bin/python3|" "$f" && ((fixed++)) ;;
359
+ esac
360
+ done < <(find "$PREFIX/bin" -maxdepth 1 -type f -print0 2>/dev/null || true)
361
+ [[ $fixed -gt 0 ]] && log_success "Fixed $fixed shebang(s)"
362
+ return 0
363
+ }
364
+
365
+ _fix_script_perms() {
366
+ local fixed=0 script module_dir tool_dir
367
+ while IFS= read -r -d '' module_dir; do
368
+ while IFS= read -r -d '' tool_dir; do
369
+ while IFS= read -r -d '' script; do
370
+ [[ -x "$script" ]] || { chmod +x "$script" 2>/dev/null && ((fixed++)); }
371
+ done < <(find "$tool_dir" -maxdepth 1 -type f \( -name '*.py' -o -name '*.sh' \) -print0 2>/dev/null || true)
372
+ done < <(find "$module_dir" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
373
+ done < <(find "$KARNEL_PATH/tools/" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
374
+ [[ $fixed -gt 0 ]] && log_success "Fixed $fixed script permission(s)"
375
+ return 0
376
+ }
377
+
378
+ _fix_script_missing() {
379
+ local fixed=0 total=0 module_dir tool_dir
380
+ while IFS= read -r -d '' module_dir; do
381
+ while IFS= read -r -d '' tool_dir; do
382
+ local installer="$tool_dir/install.sh"
383
+ [[ -f "$installer" ]] || continue
384
+ local tool_name
385
+ tool_name=$(basename "$tool_dir")
386
+ local module_name
387
+ module_name=$(basename "$module_dir")
388
+ local bin_names
389
+ bin_names=$(grep -E '^local BIN_NAME=' "$installer" 2>/dev/null | head -1 | sed "s/.*BIN_NAME=\"\?//;s/\"\?$//")
390
+ [[ -z "$bin_names" ]] && bin_names="$tool_name"
391
+ for bin_name in $bin_names; do
392
+ ((total++))
393
+ if ! command -v "$bin_name" &>/dev/null; then
394
+ karnel install "$module_name" "--$tool_name" &>/dev/null && ((fixed++))
395
+ fi
396
+ done
397
+ done < <(find "$module_dir" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
398
+ done < <(find "$KARNEL_PATH/tools/" -mindepth 1 -maxdepth 1 -type d -print0 2>/dev/null || true)
399
+ [[ $fixed -gt 0 ]] && log_success "Reinstalled $fixed/$total missing tool(s)"
400
+ return 0
401
+ }
402
+
403
+ _fix_script_stale() {
404
+ local removed=0 bin_link
405
+ while IFS= read -r -d '' bin_link; do
406
+ if [[ -L "$bin_link" ]]; then
407
+ local target
408
+ target=$(readlink "$bin_link")
409
+ if echo "$target" | grep -q "$KARNEL_PATH/tools/" && [[ ! -f "$target" ]]; then
410
+ rm -f "$bin_link" 2>/dev/null && ((removed++))
411
+ fi
412
+ fi
413
+ done < <(find "$PREFIX/bin" -maxdepth 1 -print0 2>/dev/null || true)
414
+ [[ $removed -gt 0 ]] && log_success "Removed $removed stale symlink(s)"
415
+ return 0
416
+ }
417
+
418
+ _fix_keyring() {
419
+ pkg update -y &>/dev/null && pkg install -y termux-keyring &>/dev/null
420
+ }
421
+
422
+ _fix_apt_cache() {
423
+ rm -rf "$PREFIX/var/apt/lists"/* 2>/dev/null
424
+ pkg update -y &>/dev/null
425
+ }
@@ -641,7 +641,110 @@ doctor_termux() {
641
641
  ((warnings++))
642
642
  fi
643
643
 
644
- # ===== SHEBANG & BINARY HEALTH =====
644
+ # ===== SCRIPT KEEPER =====
645
+ echo
646
+ separator_section "Script Keeper — Karnel-managed Script Audit"
647
+ echo
648
+
649
+ local script_ok=0 script_warn=0 script_err=0
650
+ local found_symlink_issues=false found_shebang_issues=false
651
+ local found_perm_issues=false found_missing_issues=false found_stale_issues=false
652
+
653
+ for module_dir in "$KARNEL_PATH/tools/"*/; do
654
+ local module_name
655
+ module_name=$(basename "${module_dir%/}")
656
+ for tool_dir in "$module_dir"*/; do
657
+ [[ -d "$tool_dir" ]] || continue
658
+ local tool_name
659
+ tool_name=$(basename "${tool_dir%/}")
660
+ local installer="$tool_dir/install.sh"
661
+ [[ -f "$installer" ]] || continue
662
+
663
+ local bin_names
664
+ bin_names=$(grep -E '^local BIN_NAME=' "$installer" 2>/dev/null | head -1 | sed "s/.*BIN_NAME=\"\?//;s/\"\?$//")
665
+ [[ -z "$bin_names" ]] && bin_names="$tool_name"
666
+
667
+ for bin_name in $bin_names; do
668
+ local bin_path="$PREFIX/bin/$bin_name"
669
+ local tool_script="$tool_dir/$bin_name.py"
670
+
671
+ if [[ -L "$bin_path" ]]; then
672
+ local target
673
+ target=$(readlink "$bin_path")
674
+ if [[ "$target" == "$tool_script" ]]; then
675
+ log_success "$module_name/$tool_name → $bin_name (OK)"
676
+ ((script_ok++))
677
+ else
678
+ log_warn "$bin_name: symlink target changed (→ $target, expected $tool_script)"
679
+ ((script_warn++)); found_symlink_issues=true
680
+ fi
681
+
682
+ if [[ -f "$bin_path" ]] && head -1 "$bin_path" 2>/dev/null | grep -q "^#!/usr/bin/env"; then
683
+ log_warn "$bin_name: uses #!/usr/bin/env — will fail on Termux"
684
+ ((script_warn++)); found_shebang_issues=true
685
+ fi
686
+
687
+ if [[ -f "$tool_script" ]]; then
688
+ local perms
689
+ perms=$(stat -c "%a" "$tool_script" 2>/dev/null)
690
+ if [[ "$perms" != "755" ]] && [[ "$perms" != "555" ]] && [[ "$perms" != "775" ]]; then
691
+ log_warn "$bin_name: script permissions $perms (should be 755)"
692
+ ((script_warn++)); found_perm_issues=true
693
+ fi
694
+ fi
695
+ elif [[ -f "$bin_path" ]]; then
696
+ log_info "$bin_name: standalone binary (not Karnel-managed)"
697
+ else
698
+ log_warn "$module_name/$tool_name: $bin_name not found in PATH"
699
+ ((script_warn++)); found_missing_issues=true
700
+ fi
701
+ done
702
+ done
703
+ done
704
+
705
+ for bin_link in "$PREFIX/bin"/*; do
706
+ if [[ -L "$bin_link" ]]; then
707
+ local target
708
+ target=$(readlink "$bin_link")
709
+ if echo "$target" | grep -q "$KARNEL_PATH/tools/" && [[ ! -f "$target" ]]; then
710
+ log_warn "Stale symlink: $(basename "$bin_link") → $target (missing)"
711
+ ((script_warn++)); found_stale_issues=true
712
+ fi
713
+ fi
714
+ done
715
+
716
+ if $found_symlink_issues; then
717
+ fix_commands+=("_fix_script_symlinks")
718
+ fix_descriptions+=("Fix all Karnel tool symlinks")
719
+ fix_callbacks+=("_fix_script_symlinks")
720
+ fi
721
+ if $found_shebang_issues; then
722
+ fix_commands+=("_fix_script_shebangs")
723
+ fix_descriptions+=("Fix all Karnel tool shebangs for Termux")
724
+ fix_callbacks+=("_fix_script_shebangs")
725
+ fi
726
+ if $found_perm_issues; then
727
+ fix_commands+=("_fix_script_perms")
728
+ fix_descriptions+=("Fix all Karnel script permissions")
729
+ fix_callbacks+=("_fix_script_perms")
730
+ fi
731
+ if $found_missing_issues; then
732
+ fix_commands+=("_fix_script_missing")
733
+ fix_descriptions+=("Reinstall missing Karnel tools")
734
+ fix_callbacks+=("_fix_script_missing")
735
+ fi
736
+ if $found_stale_issues; then
737
+ fix_commands+=("_fix_script_stale")
738
+ fix_descriptions+=("Remove stale symlinks from PREFIX/bin")
739
+ fix_callbacks+=("_fix_script_stale")
740
+ fi
741
+
742
+ if (( script_err == 0 && script_warn == 0 )); then
743
+ log_success "All $script_ok Karnel-managed scripts healthy"
744
+ else
745
+ log_info "Scripts: $script_ok OK, $script_warn warnings, $script_err errors"
746
+ fi
747
+
645
748
  echo
646
749
  separator_section "Binary & Shebang Health"
647
750
  echo
@@ -1364,14 +1467,5 @@ EOF
1364
1467
  echo
1365
1468
  }
1366
1469
 
1367
- _fix_keyring() {
1368
- pkg update -y &>/dev/null && pkg install -y termux-keyring &>/dev/null
1369
- }
1370
-
1371
- _fix_apt_cache() {
1372
- rm -rf "$PREFIX/var/apt/lists"/* 2>/dev/null
1373
- pkg update -y &>/dev/null
1374
- }
1375
-
1376
1470
  import "@/cli/commands/doctor/fixes"
1377
1471
  import "@/cli/commands/doctor/code"
@@ -1008,7 +1008,7 @@ EOF
1008
1008
  # Create scripts/run.sh
1009
1009
  cat >scripts/run.sh <<'EOF'
1010
1010
  #!/usr/bin/env bash
1011
- cargo run
1011
+ go run cmd/api/main.go
1012
1012
  EOF
1013
1013
  chmod +x scripts/run.sh
1014
1014
 
@@ -1192,7 +1192,7 @@ EOF
1192
1192
  # Create scripts/run.sh
1193
1193
  cat >scripts/run.sh <<'EOF'
1194
1194
  #!/usr/bin/env bash
1195
- go run cmd/api/main.go
1195
+ cargo run
1196
1196
  EOF
1197
1197
  chmod +x scripts/run.sh
1198
1198
 
@@ -22,11 +22,15 @@ install_main() {
22
22
  list_item "dev - Development tools"
23
23
  list_item "npm - Node.js global modules (npm packages)"
24
24
  list_item "osint - OSINT tools (Robin — Dark Web + LLM)"
25
+ list_item "network - Network tools (Dark Web OSINT, DedSec Network)"
26
+ list_item "utils - Utility scripts (File Converter, Notes, QR Code, etc.)"
25
27
  list_item "shell - ZSH + Oh My Zsh + plugins"
26
28
  list_item "ui - Termux UI (font, cursor, extra-keys, banner)"
27
29
  list_item "auto - Automation Tools (n8n)"
28
30
  list_item "deploy - Deploy CLIs (Vercel, Railway, Netlify)"
29
-
31
+ list_item "games - Games (Buzz, CTF God, Detective, etc.)"
32
+ list_item "voice - Voice command (speech-to-agent)"
33
+
30
34
  echo
31
35
  log_info "Install specific tools with flags:"
32
36
  echo
@@ -140,6 +144,14 @@ _install_full_module() {
140
144
  import "@/modules/osint"
141
145
  install_osint
142
146
  ;;
147
+ network)
148
+ import "@/modules/network"
149
+ install_network
150
+ ;;
151
+ utils)
152
+ import "@/modules/utils"
153
+ install_utils
154
+ ;;
143
155
  *)
144
156
  log_warn "Unknown install target: $target"
145
157
  echo "Run 'karnel install' to see available targets"
@@ -373,49 +385,9 @@ _install_specific_tools() {
373
385
  install_snyk
374
386
  case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
375
387
  ;;
376
- httptmux)
377
- install_httptmux
378
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
379
- ;;
380
- zork)
381
- install_zork
382
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
383
- ;;
384
- fconv)
385
- install_fconv
386
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
387
- ;;
388
- filecheck)
389
- install_filecheck
390
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
391
- ;;
392
- websites)
393
- install_websites
394
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
395
- ;;
396
- notes)
397
- install_notes
398
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
399
- ;;
400
- treex)
401
- install_treex
402
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
403
- ;;
404
- passman)
405
- install_passman
406
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
407
- ;;
408
- applaunch)
409
- install_applaunch
410
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
411
- ;;
412
- splash)
413
- install_splash
414
- case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
415
- ;;
416
- *)
417
- log_warn "Unknown tool: --$tool"
418
- ;;
388
+ *)
389
+ log_warn "Unknown tool: --$tool"
390
+ ;;
419
391
  esac
420
392
  done
421
393
 
@@ -559,6 +531,10 @@ _install_specific_tools() {
559
531
 
560
532
  for tool in "${tools[@]}"; do
561
533
  case "$tool" in
534
+ bun)
535
+ install_bun
536
+ case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
537
+ ;;
562
538
  nodejs)
563
539
  install_nodejs
564
540
  case $? in 0) ((installed_count++));; 2) ((skipped_count++));; 1) ((failed_count++));; esac
@@ -824,6 +800,12 @@ _install_specific_tools() {
824
800
  _robin_print_disclaimer
825
801
  _batch_tool_action "osint" "install" "${tools[@]}"
826
802
  ;;
803
+ network)
804
+ _batch_tool_action "network" "install" "${tools[@]}"
805
+ ;;
806
+ utils)
807
+ _batch_tool_action "utils" "install" "${tools[@]}"
808
+ ;;
827
809
  *)
828
810
  log_warn "Unknown install target: $module"
829
811
  echo "Run 'karnel install' to see available targets"
@@ -24,6 +24,9 @@ list_main() {
24
24
  list_item "auto - List automation tools"
25
25
  list_item "deploy - List deploy CLIs"
26
26
  list_item "games - List games"
27
+ list_item "network - List network tools"
28
+ list_item "utils - List utility scripts"
29
+ list_item "voice - List voice commands"
27
30
  list_item "osint - List OSINT tools"
28
31
  echo
29
32
  return
@@ -67,6 +70,15 @@ list_main() {
67
70
  osint)
68
71
  _list_osint
69
72
  ;;
73
+ network)
74
+ _list_network
75
+ ;;
76
+ utils)
77
+ _list_utils
78
+ ;;
79
+ voice)
80
+ _list_voice
81
+ ;;
70
82
  *)
71
83
  log_warn "Unknown list target: $arg"
72
84
  echo "Run 'karnel list' to see available targets"
@@ -99,6 +111,7 @@ _list_lang() {
99
111
  echo
100
112
 
101
113
  table_start "Package" "Install Flag" "Status"
114
+ table_row "Bun" "--bun" "$(_check_cmd "bun")"
102
115
  table_row "Node.js LTS" "--nodejs" "$(_check_pkg "nodejs-lts")"
103
116
  table_row "Python" "--python" "$(_check_pkg "python")"
104
117
  table_row "Perl" "--perl" "$(_check_pkg "perl")"
@@ -233,16 +246,6 @@ _list_dev() {
233
246
  table_row "Make" "--make" "$(_check_pkg "make")"
234
247
  table_row "Udocker" "--udocker" "$(_check_pkg "udocker")"
235
248
  table_row "Snyk" "--snyk" "$(_check_cmd "snyk")"
236
- table_row "httptmux" "--httptmux" "$(_check_cmd "httptmux")"
237
- table_row "Zork" "--zork" "$(_check_cmd "zork")"
238
- table_row "File Converter" "--fconv" "$(_check_cmd "fconv")"
239
- table_row "File Checker" "--filecheck" "$(_check_cmd "filecheck")"
240
- table_row "Websites Creator" "--websites" "$(_check_cmd "websites")"
241
- table_row "Smart Notes" "--notes" "$(_check_cmd "notes")"
242
- table_row "Tree Explorer" "--treex" "$(_check_cmd "treex")"
243
- table_row "Password Master" "--passman" "$(_check_cmd "passman")"
244
- table_row "App Launcher" "--applaunch" "$(_check_cmd "applaunch")"
245
- table_row "Loading Screen" "--splash" "$(_check_cmd "splash")"
246
249
  table_end
247
250
 
248
251
  echo
@@ -292,9 +295,9 @@ _list_npm() {
292
295
  table_row "Markserv" "--markserv" "markserv" "$(_check_cmd "markserv")"
293
296
  table_row "PSQL Format" "--psqlformat" "psqlformat" "$(_check_cmd "psqlformat")"
294
297
  table_row "NPM Check Updates" "--ncu" "ncu" "$(_check_cmd "ncu")"
295
- table_row "Ngrok" "--ngrok" "ngrok" "$(_check_cmd "ngrok")"
296
- table_row "Turbopack" "--turbopack" "turbo" "$(_check_cmd "turbo")"
297
- table_end
298
+ table_row "Ngrok" "--ngrok" "ngrok" "$(_check_cmd "ngrok")"
299
+ table_row "Turbopack" "--turbopack" "turbo" "$(_check_cmd "turbo")"
300
+ table_end
298
301
 
299
302
  echo
300
303
  log_info "Install specific: ${D_CYAN}karnel install npm --typescript --prettier${NC}"
@@ -388,6 +391,53 @@ _list_osint() {
388
391
  echo
389
392
  }
390
393
 
394
+ # ===== LIST NETWORK =====
395
+ _list_network() {
396
+ echo
397
+ box "Network Tools"
398
+ echo
399
+ log_info "Available network tools and install commands:"
400
+ echo
401
+
402
+ table_start "Tool" "Install Flag" "Command" "Status"
403
+ table_row "Dark Web OSINT" "--dark" "dark" "$(_check_cmd "dark")"
404
+ table_row "DedSec Network Toolkit" "--dedsec-network" "dedsec-network" "$(_check_cmd "dedsec-network")"
405
+ table_end
406
+
407
+ echo
408
+ log_info "Install specific: ${D_CYAN}karnel install network --dark --dedsec-network${NC}"
409
+ log_info "Install all: ${D_CYAN}karnel install network${NC}"
410
+ echo
411
+ }
412
+
413
+ # ===== LIST UTILS =====
414
+ _list_utils() {
415
+ echo
416
+ box "Utility Scripts"
417
+ echo
418
+ log_info "Available utility scripts and install commands:"
419
+ echo
420
+
421
+ table_start "Tool" "Install Flag" "Command" "Status"
422
+ table_row "File Converter" "--fconv" "fconv" "$(_check_cmd "fconv")"
423
+ table_row "File Checker" "--filecheck" "filecheck" "$(_check_cmd "filecheck")"
424
+ table_row "Websites Creator" "--websites" "websites" "$(_check_cmd "websites")"
425
+ table_row "Smart Notes" "--notes" "notes" "$(_check_cmd "notes")"
426
+ table_row "Tree Explorer" "--treex" "treex" "$(_check_cmd "treex")"
427
+ table_row "Password Master" "--passman" "passman" "$(_check_cmd "passman")"
428
+ table_row "App Launcher" "--applaunch" "applaunch" "$(_check_cmd "applaunch")"
429
+ table_row "Loading Screen" "--splash" "splash" "$(_check_cmd "splash")"
430
+ table_row "httptmux (API client)" "--httptmux" "httptmux" "$(_check_cmd "httptmux")"
431
+ table_row "Zork (text adventure)" "--zork" "zork" "$(_check_cmd "zork")"
432
+ table_row "QR Code Generator" "--qrcode" "qrcode" "$(_check_cmd "qrcode")"
433
+ table_end
434
+
435
+ echo
436
+ log_info "Install specific: ${D_CYAN}karnel install utils --fconv --notes${NC}"
437
+ log_info "Install all: ${D_CYAN}karnel install utils${NC}"
438
+ echo
439
+ }
440
+
391
441
  # ===== HELPER FUNCTIONS =====
392
442
 
393
443
  # Check if command exists
@@ -471,3 +521,14 @@ _grep_config() {
471
521
  echo -e "${D_RED}not installed${NC}"
472
522
  fi
473
523
  }
524
+
525
+ # ===== LIST VOICE =====
526
+ _list_voice() {
527
+ echo
528
+ box "Voice Command"
529
+ echo
530
+ printf " ${D_GREEN}%-18s${NC} %s\n" "voice" "Speech-to-agent AI command"
531
+ echo
532
+ list_item "Usage: ${D_CYAN}karnel install voice${NC}"
533
+ echo
534
+ }
@@ -51,6 +51,18 @@ open_main() {
51
51
  cleanup)
52
52
  url="$OPEN_BASE_URL/karnel/cleanup"
53
53
  ;;
54
+ network)
55
+ url="$OPEN_BASE_URL/karnel/network"
56
+ ;;
57
+ utils)
58
+ url="$OPEN_BASE_URL/karnel/utils"
59
+ ;;
60
+ games)
61
+ url="$OPEN_BASE_URL/karnel/games"
62
+ ;;
63
+ voice)
64
+ url="$OPEN_BASE_URL/karnel/voice"
65
+ ;;
54
66
  osint|robin)
55
67
  url="$OPEN_BASE_URL/karnel/osint"
56
68
  ;;
@@ -98,9 +110,13 @@ open_help() {
98
110
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "npm" "Node.js tools"
99
111
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "shell" "ZSH shell"
100
112
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "ui" "Termux UI"
101
- printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "auto" "Automation tools"
102
- printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "deploy" "Deploy CLIs"
113
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "auto" "Automation tools"
114
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "deploy" "Deploy CLIs"
115
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "games" "Games"
103
116
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "cleanup" "Cache cleanup"
117
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "network" "Network tools"
118
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "utils" "Utility tools"
119
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "voice" "Voice command"
104
120
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "osint" "OSINT tools"
105
121
  echo
106
122
  separator_section "Website"