karnel-termux 4.13.10 → 4.13.11

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 (110) hide show
  1. package/README.md +6 -2
  2. package/docs/CHANGELOG.md +11 -0
  3. package/docs/cli/README.md +8 -4
  4. package/install.sh +8 -2
  5. package/karnel/bin/karnel +1 -1
  6. package/karnel/cli/commands/install.sh +4 -4
  7. package/karnel/cli/commands/list.sh +29 -14
  8. package/karnel/cli/commands/open.sh +4 -0
  9. package/karnel/cli/commands/supabase.sh +1 -1
  10. package/karnel/cli/karnel.sh +1 -1
  11. package/karnel/modules/ai.sh +0 -15
  12. package/karnel/modules/auto.sh +0 -4
  13. package/karnel/modules/db.sh +0 -4
  14. package/karnel/modules/deploy.sh +0 -4
  15. package/karnel/modules/dev.sh +0 -4
  16. package/karnel/modules/editor.sh +0 -4
  17. package/karnel/modules/games.sh +0 -4
  18. package/karnel/modules/lang.sh +0 -4
  19. package/karnel/modules/network.sh +0 -4
  20. package/karnel/modules/npm.sh +0 -4
  21. package/karnel/modules/osint.sh +0 -4
  22. package/karnel/modules/shell.sh +3 -5
  23. package/karnel/modules/ui.sh +0 -4
  24. package/karnel/modules/utils.sh +0 -4
  25. package/karnel/tools/ai/all.sh +0 -12
  26. package/karnel/tools/ai/antigravity-cli/install.sh +5 -3
  27. package/karnel/tools/ai/claude-code/README.md +2 -3
  28. package/karnel/tools/ai/claude-code/install.sh +3 -3
  29. package/karnel/tools/ai/codegraph/install.sh +36 -8
  30. package/karnel/tools/ai/command-code/install.sh +33 -4
  31. package/karnel/tools/ai/cursor-cli/install.sh +49 -5
  32. package/karnel/tools/ai/droid/README.md +2 -1
  33. package/karnel/tools/ai/droid/install.sh +9 -45
  34. package/karnel/tools/ai/goose/install.sh +30 -14
  35. package/karnel/tools/ai/hermes-agent/README.md +1 -1
  36. package/karnel/tools/ai/keelcode/README.md +15 -0
  37. package/karnel/tools/ai/keelcode/install.sh +50 -5
  38. package/karnel/tools/ai/kilocode-cli/install.sh +71 -25
  39. package/karnel/tools/ai/kiro/install.sh +16 -6
  40. package/karnel/tools/ai/mimocode/install.sh +5 -3
  41. package/karnel/tools/ai/odysseus/install.sh +98 -25
  42. package/karnel/tools/ai/oh-my-pi/install.sh +45 -17
  43. package/karnel/tools/ai/omni-route/README.md +4 -5
  44. package/karnel/tools/ai/omni-route/install.sh +39 -23
  45. package/karnel/tools/ai/opencode/README.md +4 -5
  46. package/karnel/tools/ai/opencode/install.sh +3 -3
  47. package/karnel/tools/ai/puter/install.sh +13 -20
  48. package/karnel/tools/deploy/netlify/install.sh +18 -2
  49. package/karnel/tools/deploy/railway/install.sh +109 -15
  50. package/karnel/tools/editor/code-server/install.sh +7 -3
  51. package/karnel/tools/editor/nvchad/install.sh +7 -3
  52. package/karnel/tools/games/arcade/install.sh +8 -15
  53. package/karnel/tools/games/buzz/install.sh +8 -16
  54. package/karnel/tools/games/ctfgod/install.sh +8 -15
  55. package/karnel/tools/games/detective/install.sh +8 -15
  56. package/karnel/tools/games/pet-friends/install.sh +8 -15
  57. package/karnel/tools/games/tamagotchi/install.sh +8 -15
  58. package/karnel/tools/lang/bun/install.sh +111 -31
  59. package/karnel/tools/network/dark/install.sh +8 -15
  60. package/karnel/tools/network/dedsec-network/install.sh +8 -15
  61. package/karnel/tools/npm/turbopack/README.md +1 -1
  62. package/karnel/tools/npm/turbopack/bin/next-turbopack +2 -2
  63. package/karnel/tools/npm/turbopack/bin/node-glibc.sh +1 -1
  64. package/karnel/tools/npm/turbopack/bin/precheck-native.js +0 -1
  65. package/karnel/tools/npm/turbopack/install.sh +92 -31
  66. package/karnel/tools/plugins/install.sh +18 -1
  67. package/karnel/tools/security/amass/install.sh +24 -13
  68. package/karnel/tools/security/burpsuite/install.sh +5 -2
  69. package/karnel/tools/security/dnsrecon/install.sh +5 -2
  70. package/karnel/tools/security/enum4linux/install.sh +5 -2
  71. package/karnel/tools/security/ffuf/install.sh +23 -9
  72. package/karnel/tools/security/gobuster/install.sh +22 -11
  73. package/karnel/tools/security/masscan/install.sh +13 -7
  74. package/karnel/tools/security/metasploit/install.sh +9 -5
  75. package/karnel/tools/security/nikto/install.sh +5 -2
  76. package/karnel/tools/security/sqlmap/install.sh +5 -2
  77. package/karnel/tools/security/subfinder/install.sh +23 -9
  78. package/karnel/tools/security/theharvester/install.sh +5 -2
  79. package/karnel/tools/security/whatweb/install.sh +5 -2
  80. package/karnel/tools/security/zap/install.sh +41 -22
  81. package/karnel/tools/ui/banner/README.md +1 -2
  82. package/karnel/tools/ui/banner/install.sh +24 -16
  83. package/karnel/tools/ui/cursor/install.sh +14 -5
  84. package/karnel/tools/ui/extra-keys/README.md +1 -2
  85. package/karnel/tools/ui/extra-keys/install.sh +14 -5
  86. package/karnel/tools/ui/font/install.sh +12 -3
  87. package/karnel/tools/utils/applaunch/install.sh +7 -14
  88. package/karnel/tools/utils/fconv/install.sh +7 -15
  89. package/karnel/tools/utils/filecheck/install.sh +7 -15
  90. package/karnel/tools/utils/notes/install.sh +7 -15
  91. package/karnel/tools/utils/passman/install.sh +7 -15
  92. package/karnel/tools/utils/qrcode/install.sh +7 -15
  93. package/karnel/tools/utils/splash/install.sh +7 -15
  94. package/karnel/tools/utils/superfile/install.sh +41 -13
  95. package/karnel/tools/utils/treex/install.sh +7 -15
  96. package/karnel/tools/utils/websites/install.sh +7 -15
  97. package/karnel/tools/utils/zork/install.sh +55 -13
  98. package/karnel/utils/downloaded-python.sh +50 -0
  99. package/karnel/utils/log.sh +0 -143
  100. package/karnel/utils/uninstall.sh +10 -0
  101. package/package.json +1 -1
  102. package/scripts/npm-install.js +5 -3
  103. package/karnel/tools/games/arcade/arcade.py +0 -193
  104. package/karnel/tools/games/buzz/buzz.py +0 -1264
  105. package/karnel/tools/games/ctfgod/ctfgod.py +0 -1576
  106. package/karnel/tools/games/detective/detective.py +0 -2091
  107. package/karnel/tools/games/pet-friends/pet-friends.py +0 -42677
  108. package/karnel/tools/games/tamagotchi/tamagotchi.py +0 -1224
  109. package/karnel/tools/network/dark/dark.py +0 -709
  110. package/karnel/tools/network/dedsec-network/dedsec-network.py +0 -709
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.10-0078D4?style=for-the-badge" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-4.13.11-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">
@@ -166,6 +166,10 @@ user's permissions. They are not sandboxed. Registry plugins have reviewed
166
166
  metadata and are staged, validated, and atomically activated, but you should
167
167
  still review code you do not trust.
168
168
 
169
+ Each Karnel release pins and verifies one reviewed registry snapshot. New
170
+ registry entries become available after updating Karnel to a release that
171
+ includes that snapshot.
172
+
169
173
  Installing an arbitrary GitHub repository requires both `--unsafe` and an
170
174
  interactive confirmation:
171
175
 
@@ -304,7 +308,7 @@ karnel install ai --opencode --ollama # Install specific agents
304
308
  | **Cursor CLI** | `--cursor-cli` | Official Cursor AI agent adapted for Termux (glibc) |
305
309
  | **Oh-My-Pi** | `--oh-my-pi` | Enhanced Pi agent with native Rust addons |
306
310
  | **Goose CLI** | `--goose` | AI agent framework by Block (native Termux musl) |
307
- | **Factory Droid** | `--droid` | Enterprise AI agent (via proot-distro Ubuntu) |
311
+ | **Factory Droid** | `--droid` | Enterprise AI agent (Ubuntu proot-distro with pinned npm package) |
308
312
  | **Supercode CLI** | `--supercode-cli` | Supercode CLI — official npm package |
309
313
  | **Puter CLI** | `--puter` | Puter CLI for sites and workers |
310
314
  | **KeelCode** | `--keelcode` | Hosted coding-agent CLI |
package/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Documentation Changelog
2
2
 
3
+ ## 4.13.11 - 2026-08-10
4
+
5
+ - Hardened installers to preserve user-managed commands and data, with atomic
6
+ staging for downloaded payloads and native binaries.
7
+ - Added verified plugin registry snapshots, npm release pinning, and regression
8
+ contracts for installers, ownership, and package postinstall behavior.
9
+ - Added Android-compatible Railway installation through Ubuntu Proot and
10
+ verified Railway and Netlify CLI installation on Termux.
11
+ - Synchronized CLI, GitHub README, npm metadata, and site documentation.
12
+ - Corrected the portable npm postinstall fixture used by release validation.
13
+
3
14
  ## 4.13.10 - 2026-08-06
4
15
 
5
16
  - Included root documentation in the npm package and synchronized help, TUI, and release assets.
@@ -36,7 +36,7 @@ karnel install <module> --tool1 --tool2 # Install specific tools only
36
36
  | `osint` | Robin v2.8 — dark web OSINT via Tor + LLM |
37
37
  | `voice` | Speech-to-agent via Termux:API |
38
38
  | `security`| Nmap, Hydra, SQLMap, Metasploit, and 26 other tools |
39
- | `plugin` | Install plugins from the official registry |
39
+ | `plugin` | Built-in manager for plugins from the official registry |
40
40
 
41
41
  ### Per-module tool flags
42
42
 
@@ -76,8 +76,8 @@ karnel uninstall <module> --tool1 --tool2
76
76
 
77
77
  Same modules and flags as `install`. Removes installed packages and binaries.
78
78
  User configuration is preserved by default; Karnel asks for confirmation before
79
- removing configuration paths it manages. `ui --extra-keys` is a legacy
80
- exception: it replaces and removes `~/.termux/termux.properties` directly.
79
+ removing configuration paths it manages. `ui --extra-keys` adds and removes
80
+ only its marked block in `~/.termux/termux.properties`.
81
81
 
82
82
  ```bash
83
83
  karnel uninstall ai --opencode --ollama
@@ -205,6 +205,7 @@ Opens the official documentation page for a module using
205
205
  | `ui` | Termux UI |
206
206
  | `auto` | Automation tools |
207
207
  | `deploy` | Deploy CLIs |
208
+ | `supabase` | Supabase CLI |
208
209
  | `games` | Games |
209
210
  | `cleanup` | Cache cleanup |
210
211
  | `network` | Network tools |
@@ -778,7 +779,10 @@ The main tool modules work with `install`, `uninstall`, `reinstall`, `update`,
778
779
  `list`, `show`, and `open`:
779
780
 
780
781
  `ai` `auto` `db` `deploy` `dev` `editor` `games` `lang` `network` `npm`
781
- `osint` `security` `shell` `ui` `utils` `voice`
782
+ `osint` `security` `shell` `ui` `utils`
783
+
784
+ `voice` works with `install`, `uninstall`, `reinstall`, `update`, `list`, and
785
+ `open`; it has no per-tool README for `show`.
782
786
 
783
787
  `plugin` works with `install`, `uninstall`, `reinstall`, `update`, `list`, and
784
788
  `open`, but does not expose tool documentation through `show`.
package/install.sh CHANGED
@@ -207,6 +207,12 @@ clone_repo() {
207
207
  log_info "Developer installation detected"
208
208
  log_ok "Using local repository"
209
209
  elif [[ -d "$KARNEL_REPO/.git" ]]; then
210
+ local origin_url
211
+ origin_url="$(git -C "$KARNEL_REPO" remote get-url origin 2>/dev/null)"
212
+ if [[ "$origin_url" != "$REPO" && "$origin_url" != "${REPO%.git}" ]]; then
213
+ log_fail "Existing Karnel repository has an unexpected origin"
214
+ return 1
215
+ fi
210
216
  progress_bar 3 10
211
217
  if [[ -n "$RELEASE_REF" ]]; then
212
218
  if ! git -C "$KARNEL_REPO" fetch --depth=1 origin "refs/tags/$BRANCH" &>/dev/null ||
@@ -215,7 +221,7 @@ clone_repo() {
215
221
  return 1
216
222
  fi
217
223
  else
218
- if ! git -C "$KARNEL_REPO" pull origin "$BRANCH" &>/dev/null; then
224
+ if ! git -c core.hooksPath=/dev/null -C "$KARNEL_REPO" pull origin "$BRANCH" &>/dev/null; then
219
225
  log_fail "Failed to update existing repository"
220
226
  return 1
221
227
  fi
@@ -224,7 +230,6 @@ clone_repo() {
224
230
  echo
225
231
  log_ok "Repository updated"
226
232
  else
227
- _INSTALL_CREATED_KARNEL_REPO=true
228
233
  progress_bar 0 10
229
234
  git clone --depth=1 -b "$BRANCH" "$REPO" "$KARNEL_REPO" &>/dev/null &
230
235
  local pid=$!
@@ -235,6 +240,7 @@ clone_repo() {
235
240
  sleep 0.5
236
241
  done
237
242
  wait "$pid" || { log_fail "Failed to clone repository"; _cleanup_failed; exit 1; }
243
+ _INSTALL_CREATED_KARNEL_REPO=true
238
244
  progress_bar 10 10
239
245
  echo
240
246
  log_ok "Repository cloned"
package/karnel/bin/karnel CHANGED
@@ -75,7 +75,7 @@ show_update_notification() {
75
75
  echo
76
76
  log_warn "New version available: ${D_GREEN}$new_version${D_NC} (current: ${D_CYAN}$KARNEL_VERSION${D_NC})"
77
77
  echo
78
- list_item "Run: ${D_CYAN}karnel update${D_NC} to update"
78
+ list_item "Run: ${D_CYAN}karnel update karnel${D_NC} to update"
79
79
  echo
80
80
  fi
81
81
  }
@@ -233,13 +233,13 @@ _install_specific_tools() {
233
233
  ((failed_count++))
234
234
  fi
235
235
  ;;
236
- *)
237
- ((failed_count++))
238
- ;;
239
- 2)
236
+ 2)
240
237
  # Already installed (skipped)
241
238
  ((skipped_count++))
242
239
  ;;
240
+ *)
241
+ ((failed_count++))
242
+ ;;
243
243
  esac
244
244
  else
245
245
  log_warn "Function not found: $func_name"
@@ -197,7 +197,7 @@ _list_ai() {
197
197
  table_row "Cline CLI" "--cline" "cline" "$(_check_cmd "cline")"
198
198
  table_row "Odysseus" "--odysseus" "odysseus" "$(_check_cmd "odysseus")"
199
199
  table_row "Kimchi CLI" "--kimchi-code" "kimchi" "$(_check_cmd "kimchi")"
200
- table_row "omniRoute" "--omni-route" "omni-route" "$(_check_cmd "omni-route")"
200
+ table_row "omniRoute" "--omni-route" "omni-route" "$(_check_omni_route)"
201
201
  table_row "Context7 Docs" "--ctx7" "ctx7" "$(_check_cmd "ctx7")"
202
202
  table_row "OpenSpec SDD" "--openspec" "openspec" "$(_check_cmd "openspec")"
203
203
  table_row "Qoder" "--qoder" "qodercli" "$(_check_cmd "qodercli")"
@@ -229,7 +229,7 @@ _list_editor() {
229
229
  table_start "Component" "Install Flag" "Status"
230
230
  table_row "code-server" "--code-server" "$(_check_cmd "code-server")"
231
231
  table_row "neovim" "--neovim" "$(_check_cmd "nvim")"
232
- table_row "nvchad" "--nvchad" "$(_check_cmd "nvim")"
232
+ table_row "nvchad" "--nvchad" "$(_check_nvchad)"
233
233
  table_end
234
234
 
235
235
  echo
@@ -364,9 +364,9 @@ _list_ui() {
364
364
  echo
365
365
 
366
366
  table_start "Component" "Install Flag" "Status"
367
- table_row "Meslo Nerd Font" "--font" "$(_check_file "$HOME/.termux/font.ttf")"
367
+ table_row "Meslo Nerd Font" "--font" "$(_check_font)"
368
368
  table_row "Extra Keys" "--extra-keys" "$(_check_extra_keys)"
369
- table_row "Cursor Color" "--cursor" "$(_check_file "$HOME/.termux/colors.properties")"
369
+ table_row "Cursor Color" "--cursor" "$(_check_cursor)"
370
370
  table_row "Startup Banner" "--banner" "$(_grep_config "$HOME/.zshrc" "# ===== Karnel Banner =====" "$HOME/.bashrc")"
371
371
  table_end
372
372
 
@@ -474,6 +474,22 @@ _check_cmd() {
474
474
  fi
475
475
  }
476
476
 
477
+ _check_omni_route() {
478
+ if command -v omni-route &>/dev/null && omni-route --version &>/dev/null 2>&1; then
479
+ echo -e "${D_GREEN}installed${NC}"
480
+ else
481
+ echo -e "${D_RED}not installed${NC}"
482
+ fi
483
+ }
484
+
485
+ _check_nvchad() {
486
+ if [[ -d "$KARNEL_DATA/nvchad-termux/.git" && -d "$HOME/.config/nvim" ]]; then
487
+ echo -e "${D_GREEN}installed${NC}"
488
+ else
489
+ echo -e "${D_RED}not installed${NC}"
490
+ fi
491
+ }
492
+
477
493
  # Check if any of the comma-separated commands exists
478
494
  _check_cmd_any() {
479
495
  local bin_list="$1"
@@ -498,28 +514,27 @@ _check_pkg() {
498
514
  fi
499
515
  }
500
516
 
501
- # Check if directory exists
502
- _check_dir() {
503
- local dir="$1"
504
- if [[ -d "$dir" ]]; then
517
+ _check_robin() {
518
+ if _robin_is_installed; then
505
519
  echo -e "${D_GREEN}installed${NC}"
506
520
  else
507
521
  echo -e "${D_RED}not installed${NC}"
508
522
  fi
509
523
  }
510
524
 
511
- _check_robin() {
512
- if _robin_is_installed; then
525
+ _check_font() {
526
+ local font_source
527
+ font_source="$(dirname "$KARNEL_PATH")/assets/fonts/font.ttf"
528
+ if [[ -f "$font_source" ]] && cmp -s "$font_source" "$HOME/.termux/font.ttf"; then
513
529
  echo -e "${D_GREEN}installed${NC}"
514
530
  else
515
531
  echo -e "${D_RED}not installed${NC}"
516
532
  fi
517
533
  }
518
534
 
519
- # Check if file exists
520
- _check_file() {
521
- local file="$1"
522
- if [[ -f "$file" ]]; then
535
+ _check_cursor() {
536
+ if grep -qF '# Karnel cursor begin' "$HOME/.termux/colors.properties" 2>/dev/null &&
537
+ grep -qF '# Karnel cursor end' "$HOME/.termux/colors.properties" 2>/dev/null; then
523
538
  echo -e "${D_GREEN}installed${NC}"
524
539
  else
525
540
  echo -e "${D_RED}not installed${NC}"
@@ -48,6 +48,9 @@ open_main() {
48
48
  deploy)
49
49
  url="$OPEN_BASE_URL/karnel/deploy"
50
50
  ;;
51
+ supabase)
52
+ url="$OPEN_BASE_URL/karnel/supabase"
53
+ ;;
51
54
  cleanup)
52
55
  url="$OPEN_BASE_URL/karnel/cleanup"
53
56
  ;;
@@ -129,6 +132,7 @@ open_help() {
129
132
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "ui" "Termux UI"
130
133
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "auto" "Automation tools"
131
134
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "deploy" "Deploy CLIs"
135
+ printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "supabase" "Supabase CLI"
132
136
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "games" "Games"
133
137
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "cleanup" "Cache cleanup"
134
138
  printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "network" "Network tools"
@@ -199,7 +199,7 @@ supabase_remote() {
199
199
  log_info "For full local development, use a Linux host:"
200
200
  echo
201
201
  list_item "1. SSH into a Linux VPS, Codespaces, or local Linux machine"
202
- list_item "2. Install Docker: ${D_CYAN}curl -fsSL https://get.docker.com | sh${NC}"
202
+ list_item "2. Install Docker using the official Linux installation guide"
203
203
  list_item "3. Install Supabase CLI on that machine"
204
204
  list_item "4. Clone your project there"
205
205
  list_item "5. Run ${D_CYAN}supabase start${NC} for local stack"
@@ -370,7 +370,7 @@ _tui_list_menu() {
370
370
  local modules="ai db lang dev editor npm shell ui auto deploy games network utils osint voice plugin security"
371
371
  local choice
372
372
  choice=$(_dialog_menu "List Tools" "Select a module to list:" \
373
- "ai" "AI Agents (39)" \
373
+ "ai" "AI Agents (41)" \
374
374
  "db" "Databases" \
375
375
  "lang" "Programming Languages" \
376
376
  "editor" "Code Editors" \
@@ -60,21 +60,6 @@ _install_ai_tools_wrapper() {
60
60
  uninstall_ai() {
61
61
  import "@/tools/ai/all"
62
62
 
63
- # Verifica se alguma ferramenta AI está instalada via AI_TOOLS_REGISTRY
64
- local found=false
65
- local _reg_entry _id _name _bins
66
- for _reg_entry in "${AI_TOOLS_REGISTRY[@]}"; do
67
- IFS=':' read -r _id _name _bins <<< "$_reg_entry"
68
- local _first_bin="${_bins%%,*}"
69
- if command -v "$_first_bin" &>/dev/null; then
70
- found=true
71
- break
72
- fi
73
- done
74
- if [[ "$found" == "false" ]]; then
75
- log_info "AI Tools are not installed"
76
- return 0
77
- fi
78
63
  separator
79
64
  box "Uninstalling AI Tools"
80
65
  separator
@@ -36,10 +36,6 @@ _install_auto_wrapper() {
36
36
  }
37
37
 
38
38
  uninstall_auto() {
39
- if ! command -v n8n &>/dev/null; then
40
- log_info "Automation Tools are not installed"
41
- return 0
42
- fi
43
39
  separator
44
40
  box "Uninstalling Automation Tools"
45
41
  separator
@@ -45,10 +45,6 @@ _install_db_tools_wrapper() {
45
45
  }
46
46
 
47
47
  uninstall_db() {
48
- if ! command -v postgres &>/dev/null; then
49
- log_info "Databases are not installed"
50
- return 0
51
- fi
52
48
  separator
53
49
  box "Uninstalling Databases"
54
50
  separator
@@ -30,10 +30,6 @@ _install_deploy_wrapper() {
30
30
  }
31
31
 
32
32
  uninstall_deploy() {
33
- if ! command -v vercel &>/dev/null && ! command -v railway &>/dev/null && ! command -v netlify &>/dev/null; then
34
- log_info "Deploy CLIs are not installed"
35
- return 0
36
- fi
37
33
  separator
38
34
  box "Uninstalling Deploy CLIs"
39
35
  separator
@@ -36,10 +36,6 @@ _install_dev_wrapper() {
36
36
  }
37
37
 
38
38
  uninstall_dev() {
39
- if ! command -v gh &>/dev/null; then
40
- log_info "Development Tools are not installed"
41
- return 0
42
- fi
43
39
  separator
44
40
  box "Uninstalling Development Tools"
45
41
  separator
@@ -32,10 +32,6 @@ install_editor() {
32
32
  }
33
33
 
34
34
  uninstall_editor() {
35
- if ! command -v code-server &>/dev/null; then
36
- log_info "Code Editor is not installed"
37
- return 0
38
- fi
39
35
  separator
40
36
  box "Uninstalling Code Editor"
41
37
  separator
@@ -29,10 +29,6 @@ install_games() {
29
29
  }
30
30
 
31
31
  uninstall_games() {
32
- if ! command -v buzz &>/dev/null && ! command -v ctfgod &>/dev/null; then
33
- log_info "Games are not installed"
34
- return 0
35
- fi
36
32
  separator
37
33
  box "Uninstalling Games"
38
34
  separator
@@ -42,10 +42,6 @@ _install_lang_wrapper() {
42
42
  }
43
43
 
44
44
  uninstall_lang() {
45
- if ! command -v node &>/dev/null; then
46
- log_info "Language Packages are not installed"
47
- return 0
48
- fi
49
45
  separator
50
46
  box "Uninstalling Language Packages"
51
47
  separator
@@ -29,10 +29,6 @@ install_network() {
29
29
  }
30
30
 
31
31
  uninstall_network() {
32
- if ! command -v dark &>/dev/null && ! command -v dedsec-network &>/dev/null; then
33
- log_info "Network Tools are not installed"
34
- return 0
35
- fi
36
32
  separator
37
33
  box "Uninstalling Network Tools"
38
34
  separator
@@ -48,10 +48,6 @@ _install_npm_wrapper() {
48
48
  }
49
49
 
50
50
  uninstall_npm() {
51
- if ! command -v tsc &>/dev/null; then
52
- log_info "Node.js Modules are not installed"
53
- return 0
54
- fi
55
51
  separator
56
52
  box "Uninstalling Node.js Modules"
57
53
  separator
@@ -39,10 +39,6 @@ _install_osint_wrapper() {
39
39
 
40
40
  uninstall_osint() {
41
41
  _robin_print_disclaimer
42
- if [[ ! -d "$KARNEL_TOOLS/osint" ]]; then
43
- log_info "OSINT tools are not installed"
44
- return 0
45
- fi
46
42
  separator
47
43
  box "Uninstalling OSINT Tools"
48
44
  separator
@@ -240,10 +240,6 @@ uninstall_oh_my_zsh() {
240
240
  }
241
241
 
242
242
  uninstall_shell() {
243
- if [[ ! -d "$OH_MY_ZSH_DIR" ]]; then
244
- log_info "ZSH Shell Environment is not installed"
245
- return 0
246
- fi
247
243
  separator
248
244
  box "Uninstalling ZSH Shell Environment"
249
245
  separator
@@ -253,7 +249,9 @@ uninstall_shell() {
253
249
 
254
250
  local rc=0
255
251
  _uninstall_shell_plugins_wrapper || rc=$?
256
- uninstall_oh_my_zsh || rc=1
252
+ local oh_my_zsh_rc=0
253
+ uninstall_oh_my_zsh || oh_my_zsh_rc=$?
254
+ ((rc += oh_my_zsh_rc))
257
255
 
258
256
  echo
259
257
  separator
@@ -51,10 +51,6 @@ _setup_ui_wrapper() {
51
51
  }
52
52
 
53
53
  uninstall_ui() {
54
- if [[ ! -d "$TERMUX_DIR" ]]; then
55
- log_info "Termux UI Configuration is not installed"
56
- return 0
57
- fi
58
54
  separator
59
55
  box "Uninstalling Termux UI Configuration"
60
56
  separator
@@ -29,10 +29,6 @@ install_utils() {
29
29
  }
30
30
 
31
31
  uninstall_utils() {
32
- if ! command -v fconv &>/dev/null && ! command -v notes &>/dev/null; then
33
- log_info "Utility Tools are not installed"
34
- return 0
35
- fi
36
32
  separator
37
33
  box "Uninstalling Utility Tools"
38
34
  separator
@@ -113,18 +113,6 @@ _validate_tool_installed() {
113
113
  return 1
114
114
  }
115
115
 
116
- # Valida que o binário realmente executa (tenta --version ou --help)
117
- _validate_tool_executable() {
118
- local binary="$1"
119
- local tool_name="$2"
120
- if command -v "$binary" &>/dev/null; then
121
- # Tenta executar com --version (ignora exit code, só verifica se não crasha)
122
- "$binary" --version &>/dev/null || "$binary" --help &>/dev/null || "$binary" -h &>/dev/null || true
123
- return 0
124
- fi
125
- return 1
126
- }
127
-
128
116
  # ---- FUNÇÕES DE LOTE ----
129
117
 
130
118
  _all_ai_tools_action() {
@@ -223,7 +223,8 @@ _install_antigravity_proot_impl() {
223
223
  export SHELL=/bin/bash
224
224
  export TMPDIR=/tmp
225
225
  export HOME=/root
226
- curl -fsSL https://antigravity.google/cli/install.sh | bash
226
+ echo "Antigravity Proot installation is unavailable because upstream does not publish a verifiable artifact." >&2
227
+ exit 1
227
228
  ' &>>"$LOG_FILE"
228
229
 
229
230
  local ubuntu_root
@@ -318,7 +319,7 @@ install_antigravity_cli() {
318
319
 
319
320
  read_select "Installation method" SELECTED_METHOD \
320
321
  "Native (recommended) - Compile with glibc support" \
321
- "Proot-distro (alternative) - Ubuntu container"
322
+ "Proot-distro (unavailable: upstream has no verifiable artifact)"
322
323
 
323
324
  case "$SELECTED_METHOD" in
324
325
  *Native*)
@@ -391,7 +392,8 @@ _update_antigravity_cli_impl() {
391
392
  export SHELL=/bin/bash
392
393
  export TMPDIR=/tmp
393
394
  export HOME=/root
394
- curl -fsSL https://antigravity.google/cli/install.sh | bash
395
+ echo "Antigravity Proot update is unavailable because upstream does not publish a verifiable artifact." >&2
396
+ exit 1
395
397
  ' &>>"$LOG_FILE"
396
398
 
397
399
  local ubuntu_root
@@ -16,7 +16,7 @@ Claude Code is Anthropic's AI-powered coding assistant that runs directly in you
16
16
  ## Dependencies
17
17
 
18
18
  - **Native mode:** glibc-repo, glibc, clang, curl, tar
19
- - **Proot mode:** proot-distro, curl, ca-certificates
19
+ - **Proot mode:** proot-distro, ca-certificates, nodejs, npm
20
20
 
21
21
  ## Install
22
22
 
@@ -39,7 +39,6 @@ karnel update ai --claude-code
39
39
  ## Notes
40
40
 
41
41
  - Native installation (recommended): runs directly with glibc support via a C bootstrapper
42
- - Proot-distro (alternative): runs inside an Ubuntu container for compatibility
42
+ - Proot-distro (alternative): runs the pinned `@anthropic-ai/claude-code@2.1.226` npm package inside an Ubuntu container
43
43
  - The installer will prompt you to select which method to use
44
44
  - Data directory: `~/.local/share/karnel-data/claude/`
45
-
@@ -154,14 +154,14 @@ _install_claude_proot_impl() {
154
154
  fi
155
155
 
156
156
  _claude_proot_ubuntu /bin/bash -c \
157
- 'apt-get update && apt-get upgrade -y && apt-get install -y curl ca-certificates' \
157
+ 'apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates nodejs npm' \
158
158
  &>>"$LOG_FILE"
159
159
 
160
160
  _claude_proot_ubuntu /bin/bash -c '
161
161
  export SHELL=/bin/bash
162
162
  export TMPDIR=/tmp
163
163
  export HOME=/root
164
- curl -fsSL https://claude.ai/install.sh | bash
164
+ npm install -g @anthropic-ai/claude-code@2.1.226
165
165
  ' &>>"$LOG_FILE"
166
166
 
167
167
  local ubuntu_root
@@ -262,7 +262,7 @@ _do_update_claude_code() {
262
262
 
263
263
  _claude_proot_ubuntu /bin/bash -c '
264
264
  export HOME=/root
265
- curl -fsSL https://claude.ai/install.sh | bash
265
+ npm install -g @anthropic-ai/claude-code@2.1.226
266
266
  ' &>>"$LOG_FILE"
267
267
 
268
268
  if ! _claude_proot_ubuntu test -x /root/.local/bin/claude &>>"$LOG_FILE"; then
@@ -39,6 +39,7 @@ _download_codegraph() {
39
39
  }
40
40
 
41
41
  _download_codegraph_impl() {
42
+ local staging_dir old_dir
42
43
  LATEST_VERSION=$(curl -sI https://github.com/colbymchenry/codegraph/releases/latest | grep -i location | sed -E 's#.*/tag/([^[:space:]]+).*#\1#')
43
44
  LATEST_VERSION="${LATEST_VERSION#v}"
44
45
 
@@ -52,22 +53,35 @@ _download_codegraph_impl() {
52
53
  return 1
53
54
  fi
54
55
 
55
- local tarball
56
- tarball=$(mktemp "$KARNEL_DATA/codegraph-XXXXXX.tar.gz")
56
+ mkdir -p "$KARNEL_DATA"
57
+ staging_dir=$(mktemp -d "$KARNEL_DATA/.codegraph.XXXXXX") || return 1
58
+ local tarball="$staging_dir/codegraph.tar.gz"
57
59
 
58
60
  if ! curl -L "https://github.com/colbymchenry/codegraph/releases/download/v${LATEST_VERSION}/codegraph-linux-arm64.tar.gz" -o "$tarball" &>>"$LOG_FILE"; then
59
61
  log_error "Failed to download CodeGraph"
60
- rm -f "$tarball"
62
+ rm -rf "$staging_dir"
61
63
  return 1
62
64
  fi
63
65
 
64
- if ! tar -xzf "$tarball" -C "$KARNEL_DATA" &>>"$LOG_FILE"; then
66
+ if ! tar -xzf "$tarball" -C "$staging_dir" &>>"$LOG_FILE" ||
67
+ [[ ! -f "$staging_dir/codegraph-linux-arm64/lib/dist/bin/codegraph.js" ]]; then
65
68
  log_error "Failed to extract CodeGraph"
66
- rm -f "$tarball"
69
+ rm -rf "$staging_dir"
67
70
  return 1
68
71
  fi
69
72
 
70
73
  rm -f "$tarball"
74
+ old_dir="$KARNEL_DATA/.codegraph-linux-arm64.previous.$$"
75
+ if [ -d "$KARNEL_DATA/codegraph-linux-arm64" ] && ! mv "$KARNEL_DATA/codegraph-linux-arm64" "$old_dir"; then
76
+ rm -rf "$staging_dir"
77
+ return 1
78
+ fi
79
+ if ! mv "$staging_dir/codegraph-linux-arm64" "$KARNEL_DATA/codegraph-linux-arm64"; then
80
+ [[ -d "$old_dir" ]] && mv "$old_dir" "$KARNEL_DATA/codegraph-linux-arm64"
81
+ rm -rf "$staging_dir"
82
+ return 1
83
+ fi
84
+ rm -rf "$staging_dir" "$old_dir"
71
85
 
72
86
  return 0
73
87
  }
@@ -82,8 +96,23 @@ _write_codegraph_wrapper_impl() {
82
96
  log_error "Wrapper template not found at $wrapper_src"
83
97
  return 1
84
98
  fi
85
- cp "$wrapper_src" "$PREFIX/bin/codegraph"
86
- chmod +x "$PREFIX/bin/codegraph"
99
+ local staging_wrapper old_wrapper
100
+ mkdir -p "$PREFIX/bin"
101
+ staging_wrapper=$(mktemp "$PREFIX/bin/.codegraph.XXXXXX") || return 1
102
+ if ! cp "$wrapper_src" "$staging_wrapper" || ! chmod +x "$staging_wrapper" || [[ ! -x "$staging_wrapper" ]]; then
103
+ rm -f "$staging_wrapper"
104
+ return 1
105
+ fi
106
+ old_wrapper="$PREFIX/bin/codegraph.previous.$$"
107
+ if [ -e "$PREFIX/bin/codegraph" ] && ! mv "$PREFIX/bin/codegraph" "$old_wrapper"; then
108
+ rm -f "$staging_wrapper"
109
+ return 1
110
+ fi
111
+ if ! mv "$staging_wrapper" "$PREFIX/bin/codegraph"; then
112
+ [[ -e "$old_wrapper" ]] && mv "$old_wrapper" "$PREFIX/bin/codegraph"
113
+ return 1
114
+ fi
115
+ rm -f "$old_wrapper"
87
116
 
88
117
  return 0
89
118
  }
@@ -136,7 +165,6 @@ update_codegraph() {
136
165
  }
137
166
 
138
167
  _do_update_codegraph() {
139
- loading "Removing old CodeGraph" _update_codegraph_remove_impl
140
168
  _codegraph_dependencies || return 1
141
169
  _download_codegraph || return 1
142
170
  _write_codegraph_wrapper || return 1