karnel-termux 0.0.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 (258) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +454 -0
  3. package/install.sh +272 -0
  4. package/karnel/bin/karnel +77 -0
  5. package/karnel/cli/commands/brain.sh +1553 -0
  6. package/karnel/cli/commands/cleanup.sh +66 -0
  7. package/karnel/cli/commands/doctor.sh +1528 -0
  8. package/karnel/cli/commands/env.sh +233 -0
  9. package/karnel/cli/commands/help.sh +8 -0
  10. package/karnel/cli/commands/ia.sh +502 -0
  11. package/karnel/cli/commands/init.sh +1274 -0
  12. package/karnel/cli/commands/install.sh +718 -0
  13. package/karnel/cli/commands/list.sh +399 -0
  14. package/karnel/cli/commands/open.sh +106 -0
  15. package/karnel/cli/commands/pg.sh +719 -0
  16. package/karnel/cli/commands/reinstall.sh +663 -0
  17. package/karnel/cli/commands/show.sh +90 -0
  18. package/karnel/cli/commands/start.sh +54 -0
  19. package/karnel/cli/commands/status.sh +96 -0
  20. package/karnel/cli/commands/uninstall.sh +668 -0
  21. package/karnel/cli/commands/update.sh +723 -0
  22. package/karnel/cli/commands/upgrade.sh +40 -0
  23. package/karnel/cli/commands/version.sh +3 -0
  24. package/karnel/cli/commands/voice.sh +230 -0
  25. package/karnel/cli/karnel.sh +706 -0
  26. package/karnel/modules/ai.sh +135 -0
  27. package/karnel/modules/auto.sh +114 -0
  28. package/karnel/modules/db.sh +132 -0
  29. package/karnel/modules/deploy.sh +74 -0
  30. package/karnel/modules/dev.sh +148 -0
  31. package/karnel/modules/editor.sh +115 -0
  32. package/karnel/modules/lang.sh +124 -0
  33. package/karnel/modules/npm.sh +146 -0
  34. package/karnel/modules/shell.sh +338 -0
  35. package/karnel/modules/ui.sh +139 -0
  36. package/karnel/modules/voice.sh +118 -0
  37. package/karnel/tools/ai/all.sh +209 -0
  38. package/karnel/tools/ai/antigravity-cli/README.md +45 -0
  39. package/karnel/tools/ai/antigravity-cli/bin/agy +28 -0
  40. package/karnel/tools/ai/antigravity-cli/helper/agy_helper.c +39 -0
  41. package/karnel/tools/ai/antigravity-cli/install.sh +469 -0
  42. package/karnel/tools/ai/claude-code/README.md +45 -0
  43. package/karnel/tools/ai/claude-code/bin/claude +29 -0
  44. package/karnel/tools/ai/claude-code/helper/claude_helper.c +42 -0
  45. package/karnel/tools/ai/claude-code/install.sh +278 -0
  46. package/karnel/tools/ai/cline/install.sh +160 -0
  47. package/karnel/tools/ai/codegraph/README.md +43 -0
  48. package/karnel/tools/ai/codegraph/bin/codegraph +5 -0
  49. package/karnel/tools/ai/codegraph/install.sh +160 -0
  50. package/karnel/tools/ai/codex/README.md +44 -0
  51. package/karnel/tools/ai/codex/install.sh +104 -0
  52. package/karnel/tools/ai/command-code/README.md +62 -0
  53. package/karnel/tools/ai/command-code/install.sh +136 -0
  54. package/karnel/tools/ai/crush/README.md +17 -0
  55. package/karnel/tools/ai/crush/install.sh +89 -0
  56. package/karnel/tools/ai/ctx7/README.md +26 -0
  57. package/karnel/tools/ai/ctx7/install.sh +61 -0
  58. package/karnel/tools/ai/engram/README.md +44 -0
  59. package/karnel/tools/ai/engram/install.sh +127 -0
  60. package/karnel/tools/ai/freebuff/README.md +52 -0
  61. package/karnel/tools/ai/freebuff/bin/freebuff +28 -0
  62. package/karnel/tools/ai/freebuff/helper/freebuff_helper.c +47 -0
  63. package/karnel/tools/ai/freebuff/install.sh +303 -0
  64. package/karnel/tools/ai/gemini-cli/README.md +46 -0
  65. package/karnel/tools/ai/gemini-cli/install.sh +111 -0
  66. package/karnel/tools/ai/gentle-ai/README.md +42 -0
  67. package/karnel/tools/ai/gentle-ai/install.sh +253 -0
  68. package/karnel/tools/ai/gentle-ai/termux-patches.go +256 -0
  69. package/karnel/tools/ai/gga/README.md +49 -0
  70. package/karnel/tools/ai/gga/install.sh +134 -0
  71. package/karnel/tools/ai/hermes-agent/README.md +50 -0
  72. package/karnel/tools/ai/hermes-agent/install.sh +120 -0
  73. package/karnel/tools/ai/kilocode-cli/README.md +45 -0
  74. package/karnel/tools/ai/kilocode-cli/bin/kilocode +21 -0
  75. package/karnel/tools/ai/kilocode-cli/helper/kilocode_helper.c +47 -0
  76. package/karnel/tools/ai/kilocode-cli/install.sh +179 -0
  77. package/karnel/tools/ai/kimchi-code/README.md +53 -0
  78. package/karnel/tools/ai/kimchi-code/install.sh +221 -0
  79. package/karnel/tools/ai/kimi-code/README.md +45 -0
  80. package/karnel/tools/ai/kimi-code/install.sh +111 -0
  81. package/karnel/tools/ai/kiro/README.md +17 -0
  82. package/karnel/tools/ai/kiro/install.sh +134 -0
  83. package/karnel/tools/ai/mimocode/README.md +43 -0
  84. package/karnel/tools/ai/mimocode/bin/mimo +28 -0
  85. package/karnel/tools/ai/mimocode/helper/mimocode_helper.c +47 -0
  86. package/karnel/tools/ai/mimocode/install.sh +287 -0
  87. package/karnel/tools/ai/minimax-cli/README.md +45 -0
  88. package/karnel/tools/ai/minimax-cli/install.sh +111 -0
  89. package/karnel/tools/ai/mistral-vibe/README.md +46 -0
  90. package/karnel/tools/ai/mistral-vibe/install.sh +119 -0
  91. package/karnel/tools/ai/odysseus/README.md +35 -0
  92. package/karnel/tools/ai/odysseus/install.sh +198 -0
  93. package/karnel/tools/ai/ollama/README.md +44 -0
  94. package/karnel/tools/ai/ollama/install.sh +78 -0
  95. package/karnel/tools/ai/omni-route/README.md +111 -0
  96. package/karnel/tools/ai/omni-route/install.sh +165 -0
  97. package/karnel/tools/ai/openclaude/README.md +46 -0
  98. package/karnel/tools/ai/openclaude/install.sh +110 -0
  99. package/karnel/tools/ai/openclaw/README.md +47 -0
  100. package/karnel/tools/ai/openclaw/install.sh +112 -0
  101. package/karnel/tools/ai/opencode/README.md +51 -0
  102. package/karnel/tools/ai/opencode/bin/opencode +28 -0
  103. package/karnel/tools/ai/opencode/helper/opencode_helper.c +57 -0
  104. package/karnel/tools/ai/opencode/install.sh +290 -0
  105. package/karnel/tools/ai/openspec/README.md +34 -0
  106. package/karnel/tools/ai/openspec/install.sh +61 -0
  107. package/karnel/tools/ai/pi/README.md +46 -0
  108. package/karnel/tools/ai/pi/install.sh +104 -0
  109. package/karnel/tools/ai/qwen-code/README.md +45 -0
  110. package/karnel/tools/ai/qwen-code/install.sh +111 -0
  111. package/karnel/tools/auto/all.sh +57 -0
  112. package/karnel/tools/auto/n8n/README.md +47 -0
  113. package/karnel/tools/auto/n8n/install.sh +102 -0
  114. package/karnel/tools/db/all.sh +61 -0
  115. package/karnel/tools/db/mariadb/README.md +43 -0
  116. package/karnel/tools/db/mariadb/install.sh +65 -0
  117. package/karnel/tools/db/mongodb/README.md +42 -0
  118. package/karnel/tools/db/mongodb/install.sh +73 -0
  119. package/karnel/tools/db/postgresql/README.md +45 -0
  120. package/karnel/tools/db/postgresql/install.sh +65 -0
  121. package/karnel/tools/db/redis/README.md +46 -0
  122. package/karnel/tools/db/redis/install.sh +64 -0
  123. package/karnel/tools/db/sqlite/README.md +44 -0
  124. package/karnel/tools/db/sqlite/install.sh +65 -0
  125. package/karnel/tools/deploy/all.sh +43 -0
  126. package/karnel/tools/deploy/netlify/install.sh +41 -0
  127. package/karnel/tools/deploy/railway/install.sh +109 -0
  128. package/karnel/tools/deploy/vercel/install.sh +43 -0
  129. package/karnel/tools/dev/all.sh +77 -0
  130. package/karnel/tools/dev/bat/README.md +44 -0
  131. package/karnel/tools/dev/bat/install.sh +82 -0
  132. package/karnel/tools/dev/bc/README.md +44 -0
  133. package/karnel/tools/dev/bc/install.sh +82 -0
  134. package/karnel/tools/dev/cloudflared/README.md +43 -0
  135. package/karnel/tools/dev/cloudflared/install.sh +82 -0
  136. package/karnel/tools/dev/curl/README.md +43 -0
  137. package/karnel/tools/dev/curl/install.sh +82 -0
  138. package/karnel/tools/dev/fzf/README.md +44 -0
  139. package/karnel/tools/dev/fzf/install.sh +82 -0
  140. package/karnel/tools/dev/gh/README.md +43 -0
  141. package/karnel/tools/dev/gh/install.sh +82 -0
  142. package/karnel/tools/dev/html2text/README.md +44 -0
  143. package/karnel/tools/dev/html2text/install.sh +82 -0
  144. package/karnel/tools/dev/imagemagick/README.md +44 -0
  145. package/karnel/tools/dev/imagemagick/install.sh +82 -0
  146. package/karnel/tools/dev/jq/README.md +44 -0
  147. package/karnel/tools/dev/jq/install.sh +82 -0
  148. package/karnel/tools/dev/lsd/README.md +44 -0
  149. package/karnel/tools/dev/lsd/install.sh +82 -0
  150. package/karnel/tools/dev/make/README.md +44 -0
  151. package/karnel/tools/dev/make/install.sh +82 -0
  152. package/karnel/tools/dev/ncurses/README.md +42 -0
  153. package/karnel/tools/dev/ncurses/install.sh +82 -0
  154. package/karnel/tools/dev/openssh/README.md +43 -0
  155. package/karnel/tools/dev/openssh/install.sh +75 -0
  156. package/karnel/tools/dev/proot/README.md +43 -0
  157. package/karnel/tools/dev/proot/install.sh +82 -0
  158. package/karnel/tools/dev/shfmt/README.md +44 -0
  159. package/karnel/tools/dev/shfmt/install.sh +82 -0
  160. package/karnel/tools/dev/tmate/README.md +44 -0
  161. package/karnel/tools/dev/tmate/install.sh +82 -0
  162. package/karnel/tools/dev/tmux/README.md +43 -0
  163. package/karnel/tools/dev/tmux/install.sh +75 -0
  164. package/karnel/tools/dev/translate/README.md +44 -0
  165. package/karnel/tools/dev/translate/install.sh +82 -0
  166. package/karnel/tools/dev/tree/README.md +44 -0
  167. package/karnel/tools/dev/tree/install.sh +82 -0
  168. package/karnel/tools/dev/udocker/README.md +44 -0
  169. package/karnel/tools/dev/udocker/install.sh +82 -0
  170. package/karnel/tools/dev/wget/README.md +44 -0
  171. package/karnel/tools/dev/wget/install.sh +82 -0
  172. package/karnel/tools/editor/all.sh +59 -0
  173. package/karnel/tools/editor/code-server/README.md +42 -0
  174. package/karnel/tools/editor/code-server/install.sh +74 -0
  175. package/karnel/tools/editor/neovim/README.md +43 -0
  176. package/karnel/tools/editor/neovim/install.sh +64 -0
  177. package/karnel/tools/editor/nvchad/README.md +45 -0
  178. package/karnel/tools/editor/nvchad/install.sh +105 -0
  179. package/karnel/tools/lang/all.sh +63 -0
  180. package/karnel/tools/lang/clang/README.md +43 -0
  181. package/karnel/tools/lang/clang/install.sh +79 -0
  182. package/karnel/tools/lang/golang/README.md +43 -0
  183. package/karnel/tools/lang/golang/install.sh +79 -0
  184. package/karnel/tools/lang/nodejs/README.md +43 -0
  185. package/karnel/tools/lang/nodejs/install.sh +79 -0
  186. package/karnel/tools/lang/perl/README.md +43 -0
  187. package/karnel/tools/lang/perl/install.sh +79 -0
  188. package/karnel/tools/lang/php/README.md +43 -0
  189. package/karnel/tools/lang/php/install.sh +79 -0
  190. package/karnel/tools/lang/python/README.md +43 -0
  191. package/karnel/tools/lang/python/install.sh +79 -0
  192. package/karnel/tools/lang/rust/README.md +43 -0
  193. package/karnel/tools/lang/rust/install.sh +79 -0
  194. package/karnel/tools/npm/all.sh +90 -0
  195. package/karnel/tools/npm/live-server/README.md +43 -0
  196. package/karnel/tools/npm/live-server/install.sh +96 -0
  197. package/karnel/tools/npm/localtunnel/README.md +43 -0
  198. package/karnel/tools/npm/localtunnel/install.sh +112 -0
  199. package/karnel/tools/npm/markserv/README.md +43 -0
  200. package/karnel/tools/npm/markserv/install.sh +95 -0
  201. package/karnel/tools/npm/ncu/README.md +43 -0
  202. package/karnel/tools/npm/ncu/install.sh +95 -0
  203. package/karnel/tools/npm/nestjs/README.md +43 -0
  204. package/karnel/tools/npm/nestjs/install.sh +95 -0
  205. package/karnel/tools/npm/ngrok/README.md +44 -0
  206. package/karnel/tools/npm/ngrok/install.sh +95 -0
  207. package/karnel/tools/npm/prettier/README.md +43 -0
  208. package/karnel/tools/npm/prettier/install.sh +95 -0
  209. package/karnel/tools/npm/psqlformat/README.md +43 -0
  210. package/karnel/tools/npm/psqlformat/install.sh +95 -0
  211. package/karnel/tools/npm/turbopack/README.md +8 -0
  212. package/karnel/tools/npm/turbopack/install.sh +42 -0
  213. package/karnel/tools/npm/typescript/README.md +43 -0
  214. package/karnel/tools/npm/typescript/install.sh +95 -0
  215. package/karnel/tools/npm/vercel/README.md +43 -0
  216. package/karnel/tools/npm/vercel/install.sh +95 -0
  217. package/karnel/tools/shell/all.sh +67 -0
  218. package/karnel/tools/shell/better-npm/README.md +43 -0
  219. package/karnel/tools/shell/better-npm/install.sh +85 -0
  220. package/karnel/tools/shell/fzf-tab/README.md +44 -0
  221. package/karnel/tools/shell/fzf-tab/install.sh +85 -0
  222. package/karnel/tools/shell/history-substring/README.md +43 -0
  223. package/karnel/tools/shell/history-substring/install.sh +85 -0
  224. package/karnel/tools/shell/powerlevel10k/README.md +43 -0
  225. package/karnel/tools/shell/powerlevel10k/install.sh +85 -0
  226. package/karnel/tools/shell/you-should-use/README.md +43 -0
  227. package/karnel/tools/shell/you-should-use/install.sh +85 -0
  228. package/karnel/tools/shell/zsh-autopair/README.md +44 -0
  229. package/karnel/tools/shell/zsh-autopair/install.sh +85 -0
  230. package/karnel/tools/shell/zsh-autosuggestions/README.md +43 -0
  231. package/karnel/tools/shell/zsh-autosuggestions/install.sh +85 -0
  232. package/karnel/tools/shell/zsh-completions/README.md +43 -0
  233. package/karnel/tools/shell/zsh-completions/install.sh +85 -0
  234. package/karnel/tools/shell/zsh-defer/README.md +43 -0
  235. package/karnel/tools/shell/zsh-defer/install.sh +85 -0
  236. package/karnel/tools/shell/zsh-syntax-highlighting/README.md +43 -0
  237. package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +72 -0
  238. package/karnel/tools/ui/all.sh +61 -0
  239. package/karnel/tools/ui/banner/README.md +42 -0
  240. package/karnel/tools/ui/banner/install.sh +160 -0
  241. package/karnel/tools/ui/cursor/README.md +42 -0
  242. package/karnel/tools/ui/cursor/install.sh +58 -0
  243. package/karnel/tools/ui/extra-keys/README.md +43 -0
  244. package/karnel/tools/ui/extra-keys/install.sh +62 -0
  245. package/karnel/tools/ui/font/README.md +43 -0
  246. package/karnel/tools/ui/font/install.sh +63 -0
  247. package/karnel/tools/voice/all.sh +27 -0
  248. package/karnel/tools/voice/install.sh +10 -0
  249. package/karnel/tools/voice/uninstall.sh +8 -0
  250. package/karnel/utils/banner.sh +492 -0
  251. package/karnel/utils/bootstrap.sh +25 -0
  252. package/karnel/utils/colors.sh +33 -0
  253. package/karnel/utils/dialogrc +30 -0
  254. package/karnel/utils/env.sh +53 -0
  255. package/karnel/utils/log.sh +567 -0
  256. package/karnel/utils/version.sh +205 -0
  257. package/package.json +42 -0
  258. package/scripts/npm-install.js +60 -0
@@ -0,0 +1,44 @@
1
+ # Wget
2
+
3
+ Network downloader for retrieving files from the web
4
+
5
+ **Package:** wget
6
+ **Author:** israel marques
7
+ **Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
8
+ **Official:** https://www.gnu.org/software/wget
9
+ **Type:** Development tool (pkg)
10
+ **License:** GPL-3.0
11
+
12
+ ## Description
13
+
14
+ GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, recursive downloading, and works in the background without user intervention.
15
+
16
+ ## Dependencies
17
+
18
+ - Installed via pkg
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ karnel install dev --wget
24
+ ```
25
+
26
+ ## Uninstall
27
+
28
+ ```bash
29
+ karnel uninstall dev --wget
30
+ ```
31
+
32
+ ## Update
33
+
34
+ ```bash
35
+ karnel update dev --wget
36
+ ```
37
+
38
+ ## Notes
39
+
40
+ - Command: `wget`
41
+ - Supports recursive downloads
42
+ - Resume interrupted downloads
43
+ - Bandwidth limiting
44
+
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+
5
+ LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
+
7
+ _install_wget_pkg() {
8
+ loading "Installing Wget" _install_wget_pkg_impl
9
+ }
10
+
11
+ _install_wget_pkg_impl() {
12
+ if ! pkg install wget -y &>>"$LOG_FILE"; then
13
+ log_error "Failed to install Wget"
14
+ return 1
15
+ fi
16
+ return 0
17
+ }
18
+
19
+ _uninstall_wget_pkg() {
20
+ loading "Uninstalling Wget" _uninstall_wget_pkg_impl
21
+ }
22
+
23
+ _uninstall_wget_pkg_impl() {
24
+ if ! pkg uninstall wget -y &>>"$LOG_FILE"; then
25
+ log_error "Failed to uninstall Wget"
26
+ return 1
27
+ fi
28
+ return 0
29
+ }
30
+
31
+ _update_wget_pkg() {
32
+ loading "Updating Wget" _update_wget_pkg_impl
33
+ }
34
+
35
+ _update_wget_pkg_impl() {
36
+ if ! pkg upgrade wget -y &>>"$LOG_FILE"; then
37
+ log_error "Failed to update Wget"
38
+ return 1
39
+ fi
40
+ return 0
41
+ }
42
+
43
+ install_wget() {
44
+ if command -v wget &>/dev/null; then
45
+ log_info "Wget is already installed"
46
+ return 2
47
+ fi
48
+ log_info "Installing Wget..."
49
+
50
+ mkdir -p "$(dirname "$LOG_FILE")"
51
+
52
+ _install_wget_pkg || return 1
53
+ log_success "Wget installed"
54
+ return 0
55
+ }
56
+
57
+ uninstall_wget() {
58
+ if ! command -v wget &>/dev/null; then
59
+ log_info "Wget is not installed"
60
+ return 2
61
+ fi
62
+ log_info "Uninstalling Wget..."
63
+ mkdir -p "$(dirname "$LOG_FILE")"
64
+
65
+ _uninstall_wget_pkg || return 1
66
+ log_success "Wget uninstalled"
67
+ return 0
68
+ }
69
+
70
+ update_wget() {
71
+ log_info "Updating Wget..."
72
+ mkdir -p "$(dirname "$LOG_FILE")"
73
+
74
+ _update_wget_pkg || return 1
75
+ log_success "Wget updated"
76
+ return 0
77
+ }
78
+
79
+ reinstall_wget() {
80
+ uninstall_wget
81
+ install_wget
82
+ }
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+
5
+ LOG_FILE="$KARNEL_CACHE/install_editor.log"
6
+
7
+ EDITOR_COMPONENTS=(
8
+ "code-server"
9
+ "neovim"
10
+ "nvchad"
11
+ )
12
+
13
+ for _tool in "${EDITOR_COMPONENTS[@]}"; do
14
+ source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
15
+ done
16
+ unset _tool
17
+
18
+ _batch_editor() {
19
+ local action="$1"
20
+ local action_past="$2"
21
+ local count_var="$3"
22
+ local count=0
23
+ local failed=0
24
+ local total=${#EDITOR_COMPONENTS[@]}
25
+ local current=0
26
+ local func_name
27
+
28
+ progress_start "$total" "${action_past}ing editor components..."
29
+
30
+ for tool in "${EDITOR_COMPONENTS[@]}"; do
31
+ func_name="${action}_${tool//-/_}"
32
+ if declare -f "$func_name" &>/dev/null; then
33
+ loading "${action_past^}ing ${tool}" "$func_name"
34
+ case $? in 0) ((count++));; 1) ((failed++));; esac
35
+ fi
36
+ ((current++))
37
+ progress_update "$current" "$total"
38
+ done
39
+
40
+ progress_done "$total"
41
+ eval "$count_var=$count"
42
+ return $failed
43
+ }
44
+
45
+ install_all_editor_components() {
46
+ _batch_editor "install" "install" "installed_count"
47
+ }
48
+
49
+ uninstall_all_editor_components() {
50
+ _batch_editor "uninstall" "uninstall" "uninstalled_count"
51
+ }
52
+
53
+ update_all_editor_components() {
54
+ _batch_editor "update" "update" "updated_count"
55
+ }
56
+
57
+ reinstall_all_editor_components() {
58
+ _batch_editor "reinstall" "reinstall" "reinstalled_count"
59
+ }
@@ -0,0 +1,42 @@
1
+ # code-server
2
+
3
+ VS Code in the browser, running on Termux.
4
+
5
+ ## What is it?
6
+
7
+ [code-server](https://github.com/coder/code-server) lets you run VS Code on any machine and access it in the browser. On Termux/Android, it gives you a full VS Code experience without needing a desktop environment.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ karnel install editor --code-server
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```bash
18
+ # Start code-server (binds to localhost:8080 by default)
19
+ code-server .
20
+
21
+ # Start on a specific port
22
+ code-server . --bind-addr 0.0.0.0:8080
23
+
24
+ # Start with a password
25
+ code-server . --auth password
26
+ ```
27
+
28
+ Then open `http://localhost:8080` in your browser.
29
+
30
+ ## How it works
31
+
32
+ - Uses `tur-repo` package repository (required for Termux)
33
+ - Installs via `pkg install code-server`
34
+ - Runs as a local web server
35
+ - Access via any browser on the device
36
+
37
+ ## Notes
38
+
39
+ - For best experience, use a Chromium-based browser
40
+ - The terminal inside code-server uses Termux's shell
41
+ - Extensions install normally through the VS Code marketplace
42
+ - First run generates a config at `~/.config/code-server/config.yaml`
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # code-server - VS Code in the browser for Termux
4
+ # Official docs: https://coder.com/docs/code-server
5
+ # Termux install: pkg install tur-repo && pkg install code-server
6
+
7
+ CODE_SERVER_PASSWORD="$(head -c 16 /dev/urandom | base64 | tr -d '/+=' | head -c 16)"
8
+
9
+ install_code_server() {
10
+ if command -v code-server &>/dev/null; then
11
+ log_info "code-server is already installed"
12
+ return 2
13
+ fi
14
+
15
+ log_info "Installing code-server (VS Code for Termux)..."
16
+
17
+ # Add tur-repo if not present (required for code-server on Termux)
18
+ if ! pkg list-installed 2>/dev/null | grep -q tur-repo; then
19
+ log_info "Adding tur-repo (required for code-server)..."
20
+ pkg install -y tur-repo 2>/dev/null
21
+ fi
22
+
23
+ pkg install -y code-server 2>/dev/null
24
+ local rc=$?
25
+
26
+ if [[ $rc -eq 0 ]] && command -v code-server &>/dev/null; then
27
+ # Configure code-server with password
28
+ mkdir -p "$HOME/.config/code-server"
29
+ chmod 700 "$HOME/.config/code-server"
30
+ cat > "$HOME/.config/code-server/config.yaml" << CONF
31
+ bind-addr: 127.0.0.1:8080
32
+ auth: password
33
+ password: ${CODE_SERVER_PASSWORD}
34
+ cert: false
35
+ CONF
36
+ chmod 600 "$HOME/.config/code-server/config.yaml"
37
+ log_success "code-server installed successfully"
38
+ log_info "Run: code-server"
39
+ log_info "Then open http://localhost:8080 in your browser"
40
+ log_info "The generated password is stored in ~/.config/code-server/config.yaml (chmod 600)"
41
+ return 0
42
+ else
43
+ log_error "code-server installation failed"
44
+ return 1
45
+ fi
46
+ }
47
+
48
+ uninstall_code_server() {
49
+ if ! command -v code-server &>/dev/null; then
50
+ log_info "code-server is not installed"
51
+ return 0
52
+ fi
53
+
54
+ log_info "Uninstalling code-server..."
55
+ pkg uninstall -y code-server 2>/dev/null
56
+ return $?
57
+ }
58
+
59
+ update_code_server() {
60
+ if ! command -v code-server &>/dev/null; then
61
+ log_warn "code-server is not installed"
62
+ return 1
63
+ fi
64
+
65
+ log_info "Updating code-server..."
66
+ pkg upgrade -y code-server 2>/dev/null
67
+ return $?
68
+ }
69
+
70
+ reinstall_code_server() {
71
+ uninstall_code_server 2>/dev/null
72
+ install_code_server
73
+ return $?
74
+ }
@@ -0,0 +1,43 @@
1
+ # Neovim
2
+
3
+ Fast, extensible code editor (modern Vim fork)
4
+
5
+ **Package:** neovim
6
+ **Author:** israel
7
+ **Repository:** https://github.com/israelOfficial/karnel-termux
8
+ **Official:** https://neovim.io
9
+ **Type:** Code editor (pkg)
10
+ **License:** Apache 2.0
11
+
12
+ ## Description
13
+
14
+ Neovim is a hyper-extensible, modern fork of Vim. It provides a powerful editing experience with built-in LSP support, asynchronous job control, and a plugin architecture that allows extensive customization. It serves as the foundation for the NvChad configuration.
15
+
16
+ ## Dependencies
17
+
18
+ - Installed via pkg
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ karnel install editor --neovim
24
+ ```
25
+
26
+ ## Uninstall
27
+
28
+ ```bash
29
+ karnel uninstall editor --neovim
30
+ ```
31
+
32
+ ## Update
33
+
34
+ ```bash
35
+ karnel update editor --neovim
36
+ ```
37
+
38
+ ## Notes
39
+
40
+ - Command: `nvim`
41
+ - Can be configured standalone or with NvChad
42
+ - Supports LSP, treesitter, and Lua configuration
43
+
@@ -0,0 +1,64 @@
1
+ #!/data/data/com.termux/files/usr/bin/bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/version"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_editor.log"
7
+
8
+ _install_neovim_impl() {
9
+ mkdir -p "$(dirname "$LOG_FILE")"
10
+ if yes | pkg install neovim &>>"$LOG_FILE"; then
11
+ log_success "Neovim installed"
12
+ return 0
13
+ else
14
+ log_error "Failed to install Neovim"
15
+ return 1
16
+ fi
17
+ }
18
+
19
+ install_neovim() {
20
+ if command -v nvim &>/dev/null; then
21
+ log_info "Neovim is already installed"
22
+ return 0
23
+ fi
24
+ log_info "Installing Neovim..."
25
+ loading "Installing Neovim" _install_neovim_impl
26
+ }
27
+
28
+ _uninstall_neovim_impl() {
29
+ mkdir -p "$(dirname "$LOG_FILE")"
30
+ if pkg uninstall neovim -y &>>"$LOG_FILE"; then
31
+ log_success "Neovim uninstalled"
32
+ return 0
33
+ else
34
+ log_error "Failed to uninstall Neovim"
35
+ return 1
36
+ fi
37
+ }
38
+
39
+ uninstall_neovim() {
40
+ if ! command -v nvim &>/dev/null; then
41
+ log_info "Neovim is not installed"
42
+ return 2
43
+ fi
44
+ log_info "Uninstalling Neovim..."
45
+ loading "Uninstalling Neovim" _uninstall_neovim_impl
46
+ }
47
+
48
+ _update_neovim_impl() {
49
+ loading "Updating Neovim" _do_neovim_update
50
+ }
51
+
52
+ _do_neovim_update() {
53
+ mkdir -p "$(dirname "$LOG_FILE")"
54
+ yes | pkg upgrade neovim -y &>>"$LOG_FILE"
55
+ }
56
+
57
+ update_neovim() {
58
+ _check_update_needed "Neovim" "$(_get_installed_pkg_version neovim "Neovim")" "$(_get_remote_pkg_version neovim)" _update_neovim_impl
59
+ }
60
+
61
+ reinstall_neovim() {
62
+ uninstall_neovim
63
+ install_neovim
64
+ }
@@ -0,0 +1,45 @@
1
+ # NvChad
2
+
3
+ Modern Neovim configuration with preconfigured plugins
4
+
5
+ **Package:** nvchad (configuration)
6
+ **Author:** israel
7
+ **Repository:** https://github.com/israelOfficial/karnel-termux
8
+ **Official:** https://github.com/israelOfficial/nvchad-termux
9
+ **Type:** Code editor configuration (git clone)
10
+ **License:** MIT
11
+
12
+ ## Description
13
+
14
+ NvChad is a modern Neovim configuration that provides a complete IDE-like experience out of the box. The Karnel-Termux version includes GitHub Copilot, CodeCompanion AI, preconfigured LSP support, syntax highlighting, file explorer, and much more.
15
+
16
+ ## Dependencies
17
+
18
+ - Neovim, git, nodejs-lts, python, perl, curl, wget
19
+ - lua-language-server, ripgrep, stylua, tree-sitter
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ karnel install editor --nvchad
25
+ ```
26
+
27
+ ## Uninstall
28
+
29
+ ```bash
30
+ karnel uninstall editor --nvchad
31
+ ```
32
+
33
+ ## Update
34
+
35
+ ```bash
36
+ karnel update editor --nvchad
37
+ ```
38
+
39
+ ## Notes
40
+
41
+ - Installs to `~/.config/nvim/`
42
+ - Includes GitHub Copilot and CodeCompanion
43
+ - Preconfigured for TypeScript, JavaScript, Python, PHP, Perl, Rust, Lua
44
+ - For detailed information: https://github.com/israelOfficial/nvchad-termux
45
+
@@ -0,0 +1,105 @@
1
+ #!/data/data/com.termux/files/usr/bin/bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/version"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_editor.log"
7
+ NVCHAD_REPO="https://github.com/DevCoreXOfficial/nvchad-termux.git"
8
+ NVCHAD_DIR="$KARNEL_DATA/nvchad-termux"
9
+
10
+ _nvchad_dependencies() {
11
+ declare -A DEPS=(
12
+ ["git"]="git"
13
+ ["neovim"]="nvim"
14
+ ["nodejs-lts"]="node"
15
+ ["python"]="python"
16
+ ["perl"]="perl"
17
+ ["curl"]="curl"
18
+ ["wget"]="wget"
19
+ ["lua-language-server"]="lua-language-server"
20
+ ["ripgrep"]="rg"
21
+ ["stylua"]="stylua"
22
+ ["tree-sitter"]="tree-sitter"
23
+ )
24
+
25
+ local pkg_name bin_name
26
+ for pkg_name in "${!DEPS[@]}"; do
27
+ bin_name="${DEPS[$pkg_name]}"
28
+ if ! command -v "$bin_name" &>/dev/null; then
29
+ if ! yes | pkg install "$pkg_name" &>>"$LOG_FILE"; then
30
+ log_error "Failed to install $pkg_name"
31
+ return 1
32
+ fi
33
+ fi
34
+ done
35
+
36
+ log_success "NvChad dependencies installed"
37
+ return 0
38
+ }
39
+
40
+ _install_nvchad_impl() {
41
+ _nvchad_dependencies
42
+
43
+ mkdir -p "$(dirname "$LOG_FILE")"
44
+
45
+ rm -rf "$NVCHAD_DIR" &>>"$LOG_FILE"
46
+ if git clone "$NVCHAD_REPO" "$NVCHAD_DIR" &>>"$LOG_FILE"; then
47
+ cp -r "$NVCHAD_DIR/nvim" ~/.config/ &>>"$LOG_FILE"
48
+ nvim --headless "+Lazy! sync" +qa &>>"$LOG_FILE"
49
+ nvim --headless "+Lazy! clean nvim-treesitter" +qa &>>"$LOG_FILE"
50
+ nvim --headless "+Lazy! install nvim-treesitter" +qa &>>"$LOG_FILE"
51
+ log_success "NvChad installed"
52
+ return 0
53
+ else
54
+ log_error "Failed to install NvChad"
55
+ return 1
56
+ fi
57
+ }
58
+
59
+ install_nvchad() {
60
+ if [[ -d "$HOME/.config/nvim" ]]; then
61
+ log_info "NvChad already installed"
62
+ return 0
63
+ fi
64
+ log_info "Installing NvChad..."
65
+ loading "Installing NvChad" _install_nvchad_impl
66
+ }
67
+
68
+ _uninstall_nvchad_impl() {
69
+ if [[ -d "$HOME/.config/nvim" ]]; then
70
+ rm -rf ~/.config/nvim &>>"$LOG_FILE"
71
+ rm -rf ~/.local/state/nvim &>>"$LOG_FILE"
72
+ rm -rf ~/.local/share/nvim &>>"$LOG_FILE"
73
+ rm -rf "$NVCHAD_DIR" &>>"$LOG_FILE"
74
+ log_success "NvChad uninstalled"
75
+ else
76
+ log_warn "NvChad not installed"
77
+ fi
78
+ }
79
+
80
+ uninstall_nvchad() {
81
+ if [[ ! -d "$HOME/.config/nvim" ]]; then
82
+ log_info "NvChad is not installed"
83
+ return 2
84
+ fi
85
+ log_info "Uninstalling NvChad..."
86
+ loading "Uninstalling NvChad" _uninstall_nvchad_impl
87
+ }
88
+
89
+ _update_nvchad() {
90
+ loading "Updating NvChad" _do_nvchad_update
91
+ }
92
+
93
+ _do_nvchad_update() {
94
+ rm -rf "$HOME/.config/nvim" 2>/dev/null
95
+ cp -r "$NVCHAD_DIR/nvim" "$HOME/.config/nvim"
96
+ }
97
+
98
+ update_nvchad() {
99
+ _update_nvchad
100
+ }
101
+
102
+ reinstall_nvchad() {
103
+ uninstall_nvchad
104
+ install_nvchad
105
+ }
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+
5
+ LOG_FILE="$KARNEL_CACHE/install_lang.log"
6
+
7
+ LANGUAGE_PACKAGES=(
8
+ "nodejs"
9
+ "python"
10
+ "perl"
11
+ "php"
12
+ "rust"
13
+ "clang"
14
+ "golang"
15
+ )
16
+
17
+ for _tool in "${LANGUAGE_PACKAGES[@]}"; do
18
+ source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
19
+ done
20
+ unset _tool
21
+
22
+ _batch_lang() {
23
+ local action="$1"
24
+ local action_past="$2"
25
+ local count_var="$3"
26
+ local count=0
27
+ local failed=0
28
+ local total=${#LANGUAGE_PACKAGES[@]}
29
+ local current=0
30
+ local func_name
31
+
32
+ progress_start "$total" "${action_past}ing language packages..."
33
+
34
+ for tool in "${LANGUAGE_PACKAGES[@]}"; do
35
+ func_name="${action}_${tool//-/_}"
36
+ if declare -f "$func_name" &>/dev/null; then
37
+ loading "${action_past^}ing ${tool}" "$func_name"
38
+ case $? in 0) ((count++));; 1) ((failed++));; esac
39
+ fi
40
+ ((current++))
41
+ progress_update "$current" "$total"
42
+ done
43
+
44
+ progress_done "$total"
45
+ eval "$count_var=$count"
46
+ return $failed
47
+ }
48
+
49
+ install_all_lang_packages() {
50
+ _batch_lang "install" "install" "installed_count"
51
+ }
52
+
53
+ uninstall_all_lang_packages() {
54
+ _batch_lang "uninstall" "uninstall" "uninstalled_count"
55
+ }
56
+
57
+ update_all_lang_packages() {
58
+ _batch_lang "update" "update" "updated_count"
59
+ }
60
+
61
+ reinstall_all_lang_packages() {
62
+ _batch_lang "reinstall" "reinstall" "reinstalled_count"
63
+ }
@@ -0,0 +1,43 @@
1
+ # C/C++ (Clang)
2
+
3
+ LLVM C/C++ compiler for systems programming
4
+
5
+ **Package:** clang
6
+ **Author:** israel marques
7
+ **Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
8
+ **Official:** https://clang.llvm.org
9
+ **Type:** Language compiler (pkg)
10
+ **License:** Apache 2.0 with LLVM Exceptions
11
+
12
+ ## Description
13
+
14
+ Clang is a C, C++, and Objective-C compiler which aims to deliver amazingly fast compiles, extremely useful error and warning messages, and to provide a platform for building great source level tools. It is part of the LLVM compiler infrastructure project.
15
+
16
+ ## Dependencies
17
+
18
+ - Installed via pkg
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ karnel install lang --clang
24
+ ```
25
+
26
+ ## Uninstall
27
+
28
+ ```bash
29
+ karnel uninstall lang --clang
30
+ ```
31
+
32
+ ## Update
33
+
34
+ ```bash
35
+ karnel update lang --clang
36
+ ```
37
+
38
+ ## Notes
39
+
40
+ - Commands: `clang`, `clang++`, `clang-format`
41
+ - Includes LLVM tools
42
+ - Required for compiling many native extensions
43
+