karnel-termux 4.7.7 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +46 -5
  2. package/install.sh +2 -2
  3. package/karnel/cli/commands/backup.sh +13 -2
  4. package/karnel/cli/commands/doctor/fixes.sh +111 -13
  5. package/karnel/cli/commands/doctor.sh +112 -10
  6. package/karnel/cli/commands/init.sh +2 -2
  7. package/karnel/cli/commands/install.sh +155 -118
  8. package/karnel/cli/commands/list.sh +106 -13
  9. package/karnel/cli/commands/open.sh +28 -8
  10. package/karnel/cli/commands/reinstall.sh +79 -46
  11. package/karnel/cli/commands/restore.sh +16 -0
  12. package/karnel/cli/commands/robin.sh +656 -0
  13. package/karnel/cli/commands/search.sh +1 -0
  14. package/karnel/cli/commands/show.sh +1 -0
  15. package/karnel/cli/commands/start.sh +12 -2
  16. package/karnel/cli/commands/status.sh +11 -0
  17. package/karnel/cli/commands/uninstall.sh +47 -0
  18. package/karnel/cli/commands/update.sh +43 -0
  19. package/karnel/cli/commands/version.sh +2 -0
  20. package/karnel/cli/commands/voice.sh +11 -6
  21. package/karnel/cli/karnel.sh +115 -69
  22. package/karnel/modules/ai.sh +21 -6
  23. package/karnel/modules/deploy.sh +4 -0
  24. package/karnel/modules/dev.sh +19 -46
  25. package/karnel/modules/games.sh +81 -4
  26. package/karnel/modules/network.sh +88 -0
  27. package/karnel/modules/osint.sh +123 -0
  28. package/karnel/modules/shell.sh +1 -1
  29. package/karnel/modules/ui.sh +4 -0
  30. package/karnel/modules/utils.sh +88 -0
  31. package/karnel/modules/voice.sh +8 -2
  32. package/karnel/tools/ai/all.sh +1 -0
  33. package/karnel/tools/ai/antigravity-cli/install.sh +0 -0
  34. package/karnel/tools/ai/claude-code/install.sh +0 -0
  35. package/karnel/tools/ai/cline/install.sh +8 -8
  36. package/karnel/tools/ai/codegraph/install.sh +8 -5
  37. package/karnel/tools/ai/codex/install.sh +0 -0
  38. package/karnel/tools/ai/command-code/install.sh +0 -0
  39. package/karnel/tools/ai/copilot-termux/install.sh +0 -0
  40. package/karnel/tools/ai/crush/install.sh +1 -1
  41. package/karnel/tools/ai/ctx7/install.sh +0 -0
  42. package/karnel/tools/ai/engram/install.sh +5 -2
  43. package/karnel/tools/ai/freebuff/install.sh +0 -0
  44. package/karnel/tools/ai/gemini-cli/install.sh +0 -0
  45. package/karnel/tools/ai/gentle-ai/install.sh +1 -1
  46. package/karnel/tools/ai/hermes-agent/install.sh +0 -0
  47. package/karnel/tools/ai/kilocode-cli/install.sh +0 -0
  48. package/karnel/tools/ai/kimchi-code/install.sh +3 -1
  49. package/karnel/tools/ai/kimi-code/install.sh +0 -0
  50. package/karnel/tools/ai/kiro/install.sh +0 -0
  51. package/karnel/tools/ai/mimocode/install.sh +0 -0
  52. package/karnel/tools/ai/minimax-cli/install.sh +0 -0
  53. package/karnel/tools/ai/mistral-vibe/install.sh +0 -0
  54. package/karnel/tools/ai/odysseus/install.sh +0 -0
  55. package/karnel/tools/ai/ollama/install.sh +0 -0
  56. package/karnel/tools/ai/omni-route/install.sh +1 -1
  57. package/karnel/tools/ai/openclaude/install.sh +0 -0
  58. package/karnel/tools/ai/openclaw/install.sh +0 -0
  59. package/karnel/tools/ai/opencode/install.sh +0 -0
  60. package/karnel/tools/ai/openspec/install.sh +0 -0
  61. package/karnel/tools/ai/pi/install.sh +0 -0
  62. package/karnel/tools/ai/qoder/README.md +50 -0
  63. package/karnel/tools/ai/qoder/bin/qodercli +28 -0
  64. package/karnel/tools/ai/qoder/helper/qoder_helper.c +47 -0
  65. package/karnel/tools/ai/qoder/install.sh +367 -0
  66. package/karnel/tools/ai/qwen-code/install.sh +0 -0
  67. package/karnel/tools/auto/all.sh +1 -1
  68. package/karnel/tools/auto/n8n/install.sh +0 -0
  69. package/karnel/tools/db/all.sh +1 -1
  70. package/karnel/tools/db/mariadb/install.sh +0 -0
  71. package/karnel/tools/db/mongodb/install.sh +0 -0
  72. package/karnel/tools/db/postgresql/install.sh +0 -0
  73. package/karnel/tools/db/sqlite/install.sh +0 -0
  74. package/karnel/tools/deploy/all.sh +2 -2
  75. package/karnel/tools/deploy/netlify/install.sh +0 -0
  76. package/karnel/tools/deploy/railway/install.sh +1 -1
  77. package/karnel/tools/deploy/vercel/install.sh +0 -0
  78. package/karnel/tools/dev/all.sh +36 -13
  79. package/karnel/tools/dev/bat/install.sh +0 -0
  80. package/karnel/tools/dev/bc/install.sh +0 -0
  81. package/karnel/tools/dev/cloudflared/install.sh +0 -0
  82. package/karnel/tools/dev/curl/install.sh +0 -0
  83. package/karnel/tools/dev/fzf/install.sh +36 -9
  84. package/karnel/tools/dev/gh/install.sh +0 -0
  85. package/karnel/tools/dev/html2text/install.sh +0 -0
  86. package/karnel/tools/dev/imagemagick/install.sh +0 -0
  87. package/karnel/tools/dev/jq/install.sh +0 -0
  88. package/karnel/tools/dev/lsd/install.sh +0 -0
  89. package/karnel/tools/dev/make/install.sh +0 -0
  90. package/karnel/tools/dev/ncurses/install.sh +0 -0
  91. package/karnel/tools/dev/proot/install.sh +0 -0
  92. package/karnel/tools/dev/shfmt/install.sh +0 -0
  93. package/karnel/tools/dev/snyk/install.sh +0 -0
  94. package/karnel/tools/dev/tmate/install.sh +0 -0
  95. package/karnel/tools/dev/translate/install.sh +0 -0
  96. package/karnel/tools/dev/tree/install.sh +0 -0
  97. package/karnel/tools/dev/udocker/install.sh +0 -0
  98. package/karnel/tools/dev/wget/install.sh +0 -0
  99. package/karnel/tools/editor/all.sh +1 -1
  100. package/karnel/tools/editor/code-server/install.sh +0 -0
  101. package/karnel/tools/games/all.sh +1 -1
  102. package/karnel/tools/games/arcade/install.sh +0 -0
  103. package/karnel/tools/games/buzz/install.sh +0 -0
  104. package/karnel/tools/games/ctfgod/install.sh +0 -0
  105. package/karnel/tools/games/detective/install.sh +0 -0
  106. package/karnel/tools/games/pet-friends/install.sh +0 -0
  107. package/karnel/tools/games/tamagotchi/install.sh +0 -0
  108. package/karnel/tools/lang/all.sh +2 -1
  109. package/karnel/tools/lang/bun/bin/bun +27 -0
  110. package/karnel/tools/lang/bun/install.sh +318 -0
  111. package/karnel/tools/lang/bun/src/bun-shim.c +352 -0
  112. package/karnel/tools/lang/bun/src/bun_wrapper.c +55 -0
  113. package/karnel/tools/lang/clang/install.sh +0 -0
  114. package/karnel/tools/lang/golang/install.sh +0 -0
  115. package/karnel/tools/lang/nodejs/install.sh +0 -0
  116. package/karnel/tools/lang/perl/install.sh +0 -0
  117. package/karnel/tools/lang/php/install.sh +0 -0
  118. package/karnel/tools/lang/python/install.sh +0 -0
  119. package/karnel/tools/lang/rust/install.sh +0 -0
  120. package/karnel/tools/network/all.sh +65 -0
  121. package/karnel/tools/network/dark/README.md +45 -0
  122. package/karnel/tools/network/dark/dark.py +709 -0
  123. package/karnel/tools/network/dark/install.sh +51 -0
  124. package/karnel/tools/network/dedsec-network/README.md +42 -0
  125. package/karnel/tools/network/dedsec-network/dedsec-network.py +709 -0
  126. package/karnel/tools/network/dedsec-network/install.sh +50 -0
  127. package/karnel/tools/npm/all.sh +1 -1
  128. package/karnel/tools/npm/live-server/install.sh +0 -0
  129. package/karnel/tools/npm/localtunnel/install.sh +0 -0
  130. package/karnel/tools/npm/markserv/install.sh +0 -0
  131. package/karnel/tools/npm/ncu/install.sh +0 -0
  132. package/karnel/tools/npm/nestjs/install.sh +0 -0
  133. package/karnel/tools/npm/ngrok/install.sh +0 -0
  134. package/karnel/tools/npm/prettier/install.sh +0 -0
  135. package/karnel/tools/npm/psqlformat/install.sh +0 -0
  136. package/karnel/tools/npm/turbopack/install.sh +2 -0
  137. package/karnel/tools/npm/typescript/install.sh +0 -0
  138. package/karnel/tools/npm/vercel/install.sh +0 -0
  139. package/karnel/tools/osint/all.sh +65 -0
  140. package/karnel/tools/osint/robin/README.md +99 -0
  141. package/karnel/tools/osint/robin/common.sh +258 -0
  142. package/karnel/tools/osint/robin/install.sh +548 -0
  143. package/karnel/tools/osint/robin/requirements-termux.txt +33 -0
  144. package/karnel/tools/shell/all.sh +1 -1
  145. package/karnel/tools/shell/better-npm/install.sh +0 -0
  146. package/karnel/tools/shell/fzf-tab/install.sh +0 -0
  147. package/karnel/tools/shell/history-substring/install.sh +0 -0
  148. package/karnel/tools/shell/powerlevel10k/install.sh +0 -0
  149. package/karnel/tools/shell/you-should-use/install.sh +0 -0
  150. package/karnel/tools/shell/zsh-autopair/install.sh +0 -0
  151. package/karnel/tools/shell/zsh-autosuggestions/install.sh +0 -0
  152. package/karnel/tools/shell/zsh-completions/install.sh +0 -0
  153. package/karnel/tools/shell/zsh-defer/install.sh +0 -0
  154. package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +0 -0
  155. package/karnel/tools/ui/all.sh +1 -1
  156. package/karnel/tools/ui/banner/install.sh +0 -0
  157. package/karnel/tools/ui/cursor/install.sh +0 -0
  158. package/karnel/tools/ui/extra-keys/install.sh +0 -0
  159. package/karnel/tools/ui/font/install.sh +0 -0
  160. package/karnel/tools/utils/all.sh +88 -0
  161. package/karnel/tools/utils/applaunch/README.md +43 -0
  162. package/karnel/tools/{dev → utils}/applaunch/install.sh +3 -3
  163. package/karnel/tools/utils/fconv/README.md +41 -0
  164. package/karnel/tools/{dev → utils}/fconv/install.sh +3 -3
  165. package/karnel/tools/utils/filecheck/README.md +41 -0
  166. package/karnel/tools/{dev → utils}/filecheck/install.sh +3 -3
  167. package/karnel/tools/utils/httptmux/README.md +42 -0
  168. package/karnel/tools/{dev → utils}/httptmux/install.sh +0 -0
  169. package/karnel/tools/utils/notes/README.md +41 -0
  170. package/karnel/tools/{dev → utils}/notes/install.sh +3 -3
  171. package/karnel/tools/utils/passman/README.md +42 -0
  172. package/karnel/tools/{dev → utils}/passman/install.sh +3 -3
  173. package/karnel/tools/utils/qrcode/README.md +41 -0
  174. package/karnel/tools/utils/qrcode/install.sh +50 -0
  175. package/karnel/tools/utils/qrcode/qrcode.py +89 -0
  176. package/karnel/tools/utils/splash/README.md +41 -0
  177. package/karnel/tools/{dev → utils}/splash/install.sh +3 -3
  178. package/karnel/tools/utils/treex/README.md +41 -0
  179. package/karnel/tools/{dev → utils}/treex/install.sh +3 -3
  180. package/karnel/tools/utils/websites/README.md +41 -0
  181. package/karnel/tools/{dev → utils}/websites/install.sh +3 -3
  182. package/karnel/tools/utils/zork/README.md +43 -0
  183. package/karnel/tools/{dev → utils}/zork/install.sh +3 -3
  184. package/karnel/utils/banner.sh +8 -6
  185. package/karnel/utils/bootstrap.sh +1 -1
  186. package/karnel/utils/env.sh +16 -2
  187. package/karnel/utils/log.sh +0 -1
  188. package/karnel/utils/tools.sh +9 -2
  189. package/package.json +6 -1
  190. package/scripts/check-package.js +45 -0
  191. package/scripts/completion.bash +8 -3
  192. package/scripts/completion.zsh +8 -13
  193. package/karnel/cli/commands/doctor/system.sh +0 -87
  194. package/karnel/tools/dev/applaunch/__pycache__/applaunch.cpython-314.pyc +0 -0
  195. package/karnel/tools/dev/fconv/__pycache__/fconv.cpython-314.pyc +0 -0
  196. package/karnel/tools/dev/filecheck/__pycache__/filecheck.cpython-314.pyc +0 -0
  197. package/karnel/tools/dev/notes/__pycache__/notes.cpython-314.pyc +0 -0
  198. package/karnel/tools/dev/passman/__pycache__/passman.cpython-314.pyc +0 -0
  199. package/karnel/tools/dev/splash/__pycache__/splash.cpython-314.pyc +0 -0
  200. package/karnel/tools/dev/websites/__pycache__/websites.cpython-314.pyc +0 -0
  201. package/karnel/tools/games/arcade/__pycache__/arcade.cpython-314.pyc +0 -0
  202. package/karnel/tools/games/buzz/__pycache__/buzz.cpython-314.pyc +0 -0
  203. package/karnel/tools/games/ctfgod/__pycache__/ctfgod.cpython-314.pyc +0 -0
  204. package/karnel/tools/games/detective/__pycache__/detective.cpython-314.pyc +0 -0
  205. package/karnel/tools/games/pet-friends/__pycache__/pet-friends.cpython-314.pyc +0 -0
  206. package/karnel/tools/games/tamagotchi/__pycache__/tamagotchi.cpython-314.pyc +0 -0
  207. package/karnel/tools/games/terminal-arcade/__pycache__/terminal-arcade.cpython-314.pyc +0 -0
  208. /package/karnel/tools/{dev → utils}/applaunch/applaunch.py +0 -0
  209. /package/karnel/tools/{dev → utils}/fconv/fconv.py +0 -0
  210. /package/karnel/tools/{dev → utils}/filecheck/filecheck.py +0 -0
  211. /package/karnel/tools/{dev → utils}/notes/notes.py +0 -0
  212. /package/karnel/tools/{dev → utils}/passman/passman.py +0 -0
  213. /package/karnel/tools/{dev → utils}/splash/splash.py +0 -0
  214. /package/karnel/tools/{dev → utils}/treex/treex.py +0 -0
  215. /package/karnel/tools/{dev → utils}/websites/websites.py +0 -0
@@ -1,11 +1,88 @@
1
1
  #!/usr/bin/env bash
2
+
2
3
  import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_games.log"
3
7
 
4
8
  install_games() {
5
- local installed_count=0
9
+ separator
10
+ box "Installing Games"
11
+ separator
12
+ echo
13
+
6
14
  log_info "Installing games..."
15
+
16
+ mkdir -p "$(dirname "$LOG_FILE")"
17
+
18
+ local rc=0
19
+ import "@/tools/games/all"
20
+ install_all_games || rc=$?
21
+ if [ "$rc" -eq 0 ]; then
22
+ log_success "Games installed"
23
+ else
24
+ log_warn "$rc game(s) failed to install"
25
+ fi
26
+ separator
27
+ echo
28
+ }
29
+
30
+ uninstall_games() {
31
+ if ! command -v buzz &>/dev/null && ! command -v ctfgod &>/dev/null; then
32
+ log_info "Games are not installed"
33
+ return 0
34
+ fi
35
+ separator
36
+ box "Uninstalling Games"
37
+ separator
38
+ echo
39
+
40
+ log_info "Uninstalling games..."
41
+
42
+ local rc=0
43
+ import "@/tools/games/all"
44
+ uninstall_all_games || rc=$?
45
+ if [ "$rc" -eq 0 ]; then
46
+ log_success "Games uninstalled"
47
+ else
48
+ log_warn "$rc game(s) failed to uninstall"
49
+ fi
50
+ }
51
+
52
+ update_games() {
53
+ separator
54
+ box "Updating Games"
55
+ separator
56
+ echo
57
+
58
+ log_info "Updating games..."
59
+
60
+ local rc=0
61
+ import "@/tools/games/all"
62
+ update_all_games || rc=$?
63
+ if [ "$rc" -eq 0 ]; then
64
+ log_success "Games updated"
65
+ else
66
+ log_warn "$rc game(s) failed to update"
67
+ fi
68
+ }
69
+
70
+ reinstall_games() {
71
+ separator
72
+ box "Reinstalling Games"
73
+ separator
74
+ echo
75
+
76
+ log_info "Reinstalling games..."
77
+
78
+ local rc=0
7
79
  import "@/tools/games/all"
8
- install_all_games || return 1
9
- log_success "Games installed"
10
- return 0
80
+ reinstall_all_games || rc=$?
81
+ if [ "$rc" -eq 0 ]; then
82
+ log_success "Games reinstalled"
83
+ else
84
+ log_warn "$rc game(s) failed to reinstall"
85
+ fi
86
+ separator
87
+ echo
11
88
  }
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_network.log"
7
+
8
+ install_network() {
9
+ separator
10
+ box "Installing Network Tools"
11
+ separator
12
+ echo
13
+
14
+ log_info "Installing network tools..."
15
+
16
+ mkdir -p "$(dirname "$LOG_FILE")"
17
+
18
+ local rc=0
19
+ import "@/tools/network/all"
20
+ install_all_network || rc=$?
21
+ if [ "$rc" -eq 0 ]; then
22
+ log_success "Network tools installed"
23
+ else
24
+ log_warn "$rc network tool(s) failed to install"
25
+ fi
26
+ separator
27
+ echo
28
+ }
29
+
30
+ uninstall_network() {
31
+ if ! command -v dark &>/dev/null && ! command -v dedsec-network &>/dev/null; then
32
+ log_info "Network Tools are not installed"
33
+ return 0
34
+ fi
35
+ separator
36
+ box "Uninstalling Network Tools"
37
+ separator
38
+ echo
39
+
40
+ log_info "Uninstalling network tools..."
41
+
42
+ local rc=0
43
+ import "@/tools/network/all"
44
+ uninstall_all_network || rc=$?
45
+ if [ "$rc" -eq 0 ]; then
46
+ log_success "Network tools uninstalled"
47
+ else
48
+ log_warn "$rc network tool(s) failed to uninstall"
49
+ fi
50
+ }
51
+
52
+ update_network() {
53
+ separator
54
+ box "Updating Network Tools"
55
+ separator
56
+ echo
57
+
58
+ log_info "Updating network tools..."
59
+
60
+ local rc=0
61
+ import "@/tools/network/all"
62
+ update_all_network || rc=$?
63
+ if [ "$rc" -eq 0 ]; then
64
+ log_success "Network tools updated"
65
+ else
66
+ log_warn "$rc network tool(s) failed to update"
67
+ fi
68
+ }
69
+
70
+ reinstall_network() {
71
+ separator
72
+ box "Reinstalling Network Tools"
73
+ separator
74
+ echo
75
+
76
+ log_info "Reinstalling network tools..."
77
+
78
+ local rc=0
79
+ import "@/tools/network/all"
80
+ reinstall_all_network || rc=$?
81
+ if [ "$rc" -eq 0 ]; then
82
+ log_success "Network tools reinstalled"
83
+ else
84
+ log_warn "$rc network tool(s) failed to reinstall"
85
+ fi
86
+ separator
87
+ echo
88
+ }
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+ import "@/tools/osint/robin/common"
6
+
7
+ LOG_FILE="$KARNEL_CACHE/install_osint.log"
8
+
9
+ install_osint() {
10
+ _robin_print_disclaimer
11
+ separator
12
+ box "Installing OSINT Tools"
13
+ separator
14
+ echo
15
+
16
+ log_info "Installing OSINT tools..."
17
+ echo
18
+ mkdir -p "$(dirname "$LOG_FILE")"
19
+
20
+ local rc=0
21
+ _install_osint_wrapper || rc=$?
22
+ if [ "$rc" -eq 0 ]; then
23
+ log_success "OSINT tools installed successfully"
24
+ else
25
+ log_warn "$rc OSINT tool(s) failed to install"
26
+ fi
27
+ separator
28
+ echo
29
+ list_item "Robin — AI-powered Dark Web OSINT tool (Tor + LLM)"
30
+ echo
31
+ return "$rc"
32
+ }
33
+
34
+ _install_osint_wrapper() {
35
+ import "@/tools/osint/all"
36
+ install_all_osint
37
+ return $?
38
+ }
39
+
40
+ uninstall_osint() {
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
+ separator
47
+ box "Uninstalling OSINT Tools"
48
+ separator
49
+ echo
50
+
51
+ log_info "Uninstalling OSINT tools..."
52
+
53
+ local rc=0
54
+ _uninstall_osint_wrapper || rc=$?
55
+ if [ "$rc" -eq 0 ]; then
56
+ log_success "OSINT tools uninstalled"
57
+ else
58
+ log_warn "$rc OSINT tool(s) failed to uninstall"
59
+ fi
60
+ return "$rc"
61
+ }
62
+
63
+ _uninstall_osint_wrapper() {
64
+ import "@/tools/osint/all"
65
+ uninstall_all_osint
66
+ return $?
67
+ }
68
+
69
+ update_osint() {
70
+ _robin_print_disclaimer
71
+ separator
72
+ box "Updating OSINT Tools"
73
+ separator
74
+ echo
75
+
76
+ log_info "Updating OSINT tools..."
77
+
78
+ local rc=0
79
+ _update_osint_wrapper || rc=$?
80
+ if [ "$rc" -eq 0 ]; then
81
+ log_success "OSINT tools updated"
82
+ else
83
+ log_warn "$rc OSINT tool(s) failed to update"
84
+ fi
85
+ return "$rc"
86
+ }
87
+
88
+ _update_osint_wrapper() {
89
+ import "@/tools/osint/all"
90
+ update_all_osint
91
+ return $?
92
+ }
93
+
94
+ reinstall_osint() {
95
+ _robin_print_disclaimer
96
+ separator
97
+ box "Reinstalling OSINT Tools"
98
+ separator
99
+ echo
100
+
101
+ log_info "Reinstalling OSINT tools..."
102
+ echo
103
+ mkdir -p "$(dirname "$LOG_FILE")"
104
+
105
+ local rc=0
106
+ _reinstall_osint_wrapper || rc=$?
107
+ if [ "$rc" -eq 0 ]; then
108
+ log_success "OSINT tools reinstalled successfully"
109
+ else
110
+ log_warn "$rc OSINT tool(s) failed to reinstall"
111
+ fi
112
+ separator
113
+ echo
114
+ list_item "Robin — AI-powered Dark Web OSINT tool (Tor + LLM)"
115
+ echo
116
+ return "$rc"
117
+ }
118
+
119
+ _reinstall_osint_wrapper() {
120
+ import "@/tools/osint/all"
121
+ reinstall_all_osint
122
+ return $?
123
+ }
@@ -80,7 +80,7 @@ setupPersistentSession() {
80
80
 
81
81
  mkdir -p "$KARNEL_CACHE" 2>/dev/null || mkdir -p ~/.cache/karnel
82
82
 
83
- echo "$HOME" > ~/.cache/karnel/last_dir
83
+ echo "$HOME" > "$KARNEL_CACHE/last_dir"
84
84
 
85
85
  if grep -q "# ===== Persistent Directory =====" ~/.zshrc 2>/dev/null; then
86
86
  log_warn "Persistent session already configured"
@@ -7,6 +7,10 @@ TERMUX_DIR="$HOME/.termux"
7
7
  TERMUX_ASSETS_DIR="$(dirname "$KARNEL_PATH")/assets"
8
8
  LOG_FILE="$KARNEL_CACHE/install_ui.log"
9
9
 
10
+ install_ui() {
11
+ setup_ui
12
+ }
13
+
10
14
  setup_ui() {
11
15
  separator
12
16
  box "Configuring Termux UI"
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_utils.log"
7
+
8
+ install_utils() {
9
+ separator
10
+ box "Installing Utility Tools"
11
+ separator
12
+ echo
13
+
14
+ log_info "Installing utility tools..."
15
+
16
+ mkdir -p "$(dirname "$LOG_FILE")"
17
+
18
+ local rc=0
19
+ import "@/tools/utils/all"
20
+ install_all_utils || rc=$?
21
+ if [ "$rc" -eq 0 ]; then
22
+ log_success "Utility tools installed"
23
+ else
24
+ log_warn "$rc utility tool(s) failed to install"
25
+ fi
26
+ separator
27
+ echo
28
+ }
29
+
30
+ uninstall_utils() {
31
+ if ! command -v fconv &>/dev/null && ! command -v notes &>/dev/null; then
32
+ log_info "Utility Tools are not installed"
33
+ return 0
34
+ fi
35
+ separator
36
+ box "Uninstalling Utility Tools"
37
+ separator
38
+ echo
39
+
40
+ log_info "Uninstalling utility tools..."
41
+
42
+ local rc=0
43
+ import "@/tools/utils/all"
44
+ uninstall_all_utils || rc=$?
45
+ if [ "$rc" -eq 0 ]; then
46
+ log_success "Utility tools uninstalled"
47
+ else
48
+ log_warn "$rc utility tool(s) failed to uninstall"
49
+ fi
50
+ }
51
+
52
+ update_utils() {
53
+ separator
54
+ box "Updating Utility Tools"
55
+ separator
56
+ echo
57
+
58
+ log_info "Updating utility tools..."
59
+
60
+ local rc=0
61
+ import "@/tools/utils/all"
62
+ update_all_utils || rc=$?
63
+ if [ "$rc" -eq 0 ]; then
64
+ log_success "Utility tools updated"
65
+ else
66
+ log_warn "$rc utility tool(s) failed to update"
67
+ fi
68
+ }
69
+
70
+ reinstall_utils() {
71
+ separator
72
+ box "Reinstalling Utility Tools"
73
+ separator
74
+ echo
75
+
76
+ log_info "Reinstalling utility tools..."
77
+
78
+ local rc=0
79
+ import "@/tools/utils/all"
80
+ reinstall_all_utils || rc=$?
81
+ if [ "$rc" -eq 0 ]; then
82
+ log_success "Utility tools reinstalled"
83
+ else
84
+ log_warn "$rc utility tool(s) failed to reinstall"
85
+ fi
86
+ separator
87
+ echo
88
+ }
@@ -15,7 +15,12 @@ install_voice() {
15
15
 
16
16
  mkdir -p "$(dirname "$LOG_FILE")"
17
17
 
18
- loading "Installing Termux:API" _install_voice_deps
18
+ local deps_rc=0
19
+ loading "Installing Termux:API" _install_voice_deps || deps_rc=$?
20
+ if [ "$deps_rc" -ne 0 ]; then
21
+ log_error "Failed to install Termux:API dependencies"
22
+ return 1
23
+ fi
19
24
  log_success "Voice dependencies installed"
20
25
 
21
26
  local rc=0
@@ -35,7 +40,8 @@ install_voice() {
35
40
  }
36
41
 
37
42
  _install_voice_deps() {
38
- pkg install termux-api -y &>"$LOG_FILE"
43
+ pkg install termux-api -y &>>"$LOG_FILE"
44
+ return $?
39
45
  }
40
46
 
41
47
  _install_voice_shell() {
@@ -59,6 +59,7 @@ AI_TOOLS_REGISTRY=(
59
59
  "ctx7:Context7 Documentation Provider:ctx7"
60
60
  "openspec:OpenSpec SDD Framework:openspec"
61
61
  "copilot-termux:Copilot-Termux:copilot"
62
+ "qoder:Qoder:qodercli"
62
63
  )
63
64
 
64
65
  # ---- IMPORTAR TODOS OS SCRIPTS INDIVIDUAIS ----
File without changes
File without changes
@@ -57,16 +57,16 @@ _cline_install_global_impl() {
57
57
  fi
58
58
 
59
59
  # Step 3: Extract to global node_modules
60
- mkdir -p /data/data/com.termux/files/usr/lib/node_modules/@cline
60
+ mkdir -p "$PREFIX/lib/node_modules/@cline"
61
61
  tar -xzf "$tarball" \
62
- -C /data/data/com.termux/files/usr/lib/node_modules/@cline/ &>>"$LOG_FILE"
63
- mv /data/data/com.termux/files/usr/lib/node_modules/@cline/package \
64
- /data/data/com.termux/files/usr/lib/node_modules/@cline/cli-linux-arm64 &>>"$LOG_FILE" || true
62
+ -C "$PREFIX/lib/node_modules/@cline/" &>>"$LOG_FILE"
63
+ mv "$PREFIX/lib/node_modules/@cline/package" \
64
+ "$PREFIX/lib/node_modules/@cline/cli-linux-arm64" &>>"$LOG_FILE" || true
65
65
  rm -f "$tarball"
66
66
 
67
67
  # Step 4: Create cached binary for fast startup
68
- local binary="/data/data/com.termux/files/usr/lib/node_modules/@cline/cli-linux-arm64/bin/cline"
69
- local cached="/data/data/com.termux/files/usr/lib/node_modules/cline/bin/.cline"
68
+ local binary="$PREFIX/lib/node_modules/@cline/cli-linux-arm64/bin/cline"
69
+ local cached="$PREFIX/lib/node_modules/cline/bin/.cline"
70
70
  if [ -f "$binary" ]; then
71
71
  cp "$binary" "$cached" 2>/dev/null
72
72
  chmod 755 "$cached" 2>/dev/null
@@ -128,8 +128,8 @@ uninstall_cline() {
128
128
  fi
129
129
 
130
130
  npm uninstall -g cline &>>"$LOG_FILE" || true
131
- rm -rf /data/data/com.termux/files/usr/lib/node_modules/@cline/cli-linux-arm64 &>>"$LOG_FILE" || true
132
- rm -f /data/data/com.termux/files/usr/lib/node_modules/cline/bin/.cline &>>"$LOG_FILE" || true
131
+ rm -rf "$PREFIX/lib/node_modules/@cline/cli-linux-arm64" &>>"$LOG_FILE" || true
132
+ rm -f "$PREFIX/lib/node_modules/cline/bin/.cline" &>>"$LOG_FILE" || true
133
133
 
134
134
  log_success "Cline CLI uninstalled"
135
135
  return 0
@@ -120,10 +120,13 @@ uninstall_codegraph() {
120
120
  }
121
121
 
122
122
  _uninstall_codegraph_impl() {
123
- if rm -rf "$KARNEL_DATA/codegraph-linux-arm64" && rm -f "$PREFIX/bin/codegraph" &>>"$LOG_FILE"; then
123
+ if [[ -n "$KARNEL_DATA" && -d "$KARNEL_DATA/codegraph-linux-arm64" ]]; then
124
+ rm -rf "$KARNEL_DATA/codegraph-linux-arm64"
125
+ fi
126
+ if rm -f "$PREFIX/bin/codegraph" &>>"$LOG_FILE"; then
124
127
  return 0
125
128
  else
126
- log_error "Failed to uninstall CodeGraph"
129
+ log_error "Failed to remove old CodeGraph installation"
127
130
  return 1
128
131
  fi
129
132
  }
@@ -141,11 +144,11 @@ _do_update_codegraph() {
141
144
  }
142
145
 
143
146
  _update_codegraph_remove_impl() {
144
- if ! rm -rf "$KARNEL_DATA/codegraph-linux-arm64" &>>"$LOG_FILE"; then
145
- log_error "Failed to remove old CodeGraph installation"
146
- return 1
147
+ if [[ -n "$KARNEL_DATA" && -d "$KARNEL_DATA/codegraph-linux-arm64" ]]; then
148
+ rm -rf "$KARNEL_DATA/codegraph-linux-arm64" &>>"$LOG_FILE"
147
149
  fi
148
150
 
151
+
149
152
  if ! rm -f "$PREFIX/bin/codegraph" &>>"$LOG_FILE"; then
150
153
  log_error "Failed to remove old CodeGraph wrapper"
151
154
  return 1
File without changes
File without changes
File without changes
@@ -68,7 +68,7 @@ uninstall_crush() {
68
68
 
69
69
  log_info "Uninstalling Crush..."
70
70
  rm -f "$PREFIX/bin/crush"
71
- npm uninstall -g @charmland/crush &>>"$LOG_FILE" 2>/dev/null
71
+ npm uninstall -g @charmland/crush &>>"$LOG_FILE"
72
72
  log_success "Crush uninstalled"
73
73
  return 0
74
74
  }
File without changes
@@ -92,7 +92,10 @@ uninstall_engram() {
92
92
  }
93
93
 
94
94
  _uninstall_engram_impl() {
95
- if rm -rf "$KARNEL_DATA/engram" && rm "$PREFIX/bin/engram" &>>"$LOG_FILE"; then
95
+ if [[ -n "$KARNEL_DATA" && -d "$KARNEL_DATA/engram" ]]; then
96
+ rm -rf "$KARNEL_DATA/engram"
97
+ fi
98
+ if rm -f "$PREFIX/bin/engram" &>>"$LOG_FILE"; then
96
99
  return 0
97
100
  else
98
101
  log_error "Failed to uninstall Engram"
@@ -109,7 +112,7 @@ _update_engram_impl() {
109
112
  export GOCACHE="$HOME/.cache/go"
110
113
  export GOMODCACHE="$GOPATH/pkg/mod"
111
114
 
112
- if ! git -C "$KARNEL_DATA/engram" pull &>>"$LOG_FILE" && go build -C "$KARNEL_DATA/engram/cmd/engram" -o $PREFIX/bin/engram &>>"$LOG_FILE"; then
115
+ if ! git -C "$KARNEL_DATA/engram" pull &>>"$LOG_FILE" && go build -C "$KARNEL_DATA/engram/cmd/engram" -o "$PREFIX/bin/engram" &>>"$LOG_FILE"; then
113
116
  log_error "Failed to update Engram"
114
117
  return 1
115
118
  fi
File without changes
File without changes
@@ -6,7 +6,7 @@ import "@/utils/colors"
6
6
 
7
7
  : "${KARNEL_CACHE:=$HOME/.cache/karnel}"
8
8
  : "${KARNEL_PATH:=$HOME/karnel}"
9
- : "${PREFIX:=$PREFIX}"
9
+ : "${PREFIX:=/data/data/com.termux/files/usr}"
10
10
 
11
11
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
12
12
  GENTLE_AI_DATA_DIR="${GENTLE_AI_DATA_DIR:-$HOME/.local/share/karnel-data/gentle-ai}"
File without changes
File without changes
@@ -136,8 +136,10 @@ KIMCHI_DIR="/data/data/com.termux/files/home/.local/share/karnel-data/kimchi"
136
136
  KIMCHI_BIN="$KIMCHI_DIR/kimchi"
137
137
 
138
138
  ARGS=""
139
+ sep=""
139
140
  for arg in "$@"; do
140
- ARGS="$ARGS '$arg'"
141
+ ARGS="$ARGS$sep$(printf '%q ' "$arg")"
142
+ sep=" "
141
143
  done
142
144
 
143
145
  exec proot-distro login ubuntu -- bash -c "
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -134,7 +134,7 @@ uninstall_omni_route() {
134
134
  fi
135
135
 
136
136
  log_info "Uninstalling omniRoute..."
137
- npm uninstall -g karnelroute 2>>"$LOG_FILE" 2>/dev/null
137
+ npm uninstall -g karnelroute &>>"$LOG_FILE"
138
138
  rm -rf "$HOME/.karnel/packages/karnelroute"
139
139
  rm -f "$PREFIX/bin/karnelroute" "$PREFIX/bin/omni-route"
140
140
  log_success "omniRoute uninstalled"
File without changes
File without changes
File without changes
File without changes
File without changes