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,50 @@
1
+ # Hermes Agent
2
+ The self-improving AI agent built by Nous Research
3
+
4
+ **Package:** hermes-agent
5
+ **Author:** israel marques
6
+ **Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
7
+ **Official:** https://github.com/nousresearch/hermes-agent
8
+ **Type:** The agent that grows with you
9
+ **License:** MIT
10
+
11
+ # Description
12
+
13
+ The self-improving AI agent built by Nous Research. It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions.
14
+
15
+ # Dependencies
16
+
17
+ - python
18
+ - clang
19
+ - rust
20
+ - make
21
+ - pkg-config
22
+ - libffi
23
+ - openssl
24
+ - nodejs-lts
25
+ - ripgrep
26
+ - ffmpeg
27
+
28
+ # Install
29
+
30
+ ```bash
31
+ karnel install ai --hermes-agent
32
+ ```
33
+
34
+ # Uninstall
35
+
36
+ ```bash
37
+ karnel uninstall ai --hermes-agent
38
+ ```
39
+
40
+ # Update
41
+
42
+ ```bash
43
+ karnel update ai --hermes-agent
44
+ ```
45
+
46
+ # Notes
47
+
48
+ - Installed using the official installer via: `curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash`
49
+ - Command: `hermes`
50
+ - Requires configuration for optimal performance
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+
5
+ LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
+ HERMES_HOME="$HOME/.hermes"
7
+ HERMES_DIR="$HERMES_HOME/hermes-agent"
8
+
9
+ _patch_psutil_for_termux() {
10
+ python3 -c "import psutil; print(psutil.__version__)" 2>/dev/null && return 0
11
+ local tmp="$PREFIX/tmp/psutil_patch"
12
+ mkdir -p "$tmp"
13
+ pip download psutil==7.2.2 --no-binary :all: --no-deps -d "$tmp" 2>/dev/null
14
+ tar xzf "$tmp/psutil-7.2.2.tar.gz" -C "$tmp"
15
+ sed -i 's/LINUX = sys.platform.startswith("linux")/LINUX = sys.platform.startswith(("linux", "android"))/' "$tmp/psutil-7.2.2/psutil/_common.py"
16
+ pip install "$tmp/psutil-7.2.2"
17
+ rm -rf "$tmp"
18
+ }
19
+
20
+ _prebuild_c_exts() {
21
+ for pkg in ruamel.yaml.clib uvloop tornado; do
22
+ pip install "$pkg" 2>/dev/null
23
+ done
24
+ }
25
+
26
+ _install_hermes_agent_impl() {
27
+ mkdir -p "$HERMES_HOME"
28
+
29
+ # 1. Clone/pull repo
30
+ if [ -d "$HERMES_DIR/.git" ]; then
31
+ cd "$HERMES_DIR" && git pull
32
+ else
33
+ git clone https://github.com/NousResearch/hermes-agent.git "$HERMES_DIR"
34
+ fi
35
+
36
+ cd "$HERMES_DIR"
37
+
38
+ # 2. Patch Python version constraint (3.14 compat)
39
+ sed -i 's/requires-python = ">=3\.11,<3\.14"/requires-python = ">=3.11,<3.15"/' pyproject.toml
40
+
41
+ # 3. Pre-build C extensions that OOM when built together
42
+ _patch_psutil_for_termux
43
+ _prebuild_c_exts
44
+
45
+ # 4. Install (no constraints file — it hangs on Termux network)
46
+ pip install --no-build-isolation .
47
+
48
+ # 5. Create wrapper (pip skipped it due to --no-build-isolation)
49
+ cat > "$PREFIX/bin/hermes" <<-WRAPPER
50
+ #!/data/data/com.termux/files/usr/bin/python3
51
+ from hermes_cli.main import main
52
+ main()
53
+ WRAPPER
54
+ chmod +x "$PREFIX/bin/hermes"
55
+ }
56
+
57
+ install_hermes_agent() {
58
+ if command -v hermes &>/dev/null; then
59
+ log_info "Hermes Agent is already installed"
60
+ return 2
61
+ fi
62
+
63
+ log_info "Installing Hermes Agent (gambiarra Termux)..."
64
+ mkdir -p "$(dirname "$LOG_FILE")"
65
+
66
+ loading "Installing Hermes Agent" _install_hermes_agent_impl
67
+
68
+ if command -v hermes &>/dev/null; then
69
+ log_success "Hermes Agent installed successfully"
70
+ return 0
71
+ else
72
+ log_error "Failed to install Hermes Agent"
73
+ return 1
74
+ fi
75
+ }
76
+
77
+ uninstall_hermes_agent() {
78
+ if ! command -v hermes &>/dev/null; then
79
+ log_info "Hermes Agent is not installed"
80
+ return 2
81
+ fi
82
+ log_info "Uninstalling Hermes Agent..."
83
+ mkdir -p "$(dirname "$LOG_FILE")"
84
+
85
+ loading "Removing Hermes Agent" _uninstall_hermes_agent_impl
86
+
87
+ log_success "Hermes Agent uninstalled successfully"
88
+ return 0
89
+ }
90
+
91
+ _uninstall_hermes_agent_impl() {
92
+ if rm -rf "$HERMES_HOME" && rm -f "$PREFIX/bin/hermes" &>>"$LOG_FILE"; then
93
+ return 0
94
+ else
95
+ log_error "Failed to uninstall Hermes Agent"
96
+ return 1
97
+ fi
98
+ }
99
+
100
+ update_hermes_agent() {
101
+ log_info "Updating Hermes Agent..."
102
+ mkdir -p "$(dirname "$LOG_FILE")"
103
+ loading "Updating Hermes Agent" _update_hermes_agent_impl
104
+ log_success "Hermes Agent updated successfully"
105
+ return 0
106
+ }
107
+
108
+ _update_hermes_agent_impl() {
109
+ if ! hermes update 2>/dev/null; then
110
+ # Fallback: re-pull and re-install
111
+ cd "$HERMES_DIR" && git pull
112
+ pip install --no-build-isolation .
113
+ fi
114
+ return 0
115
+ }
116
+
117
+ reinstall_hermes_agent() {
118
+ uninstall_hermes_agent
119
+ install_hermes_agent
120
+ }
@@ -0,0 +1,45 @@
1
+ # Kilo Code CLI
2
+
3
+ The open source coding agent for building with AI in VS Code, JetBrains, or the CLI
4
+
5
+ **Package:** kilocode-cli
6
+ **Author:** israel marques
7
+ **Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
8
+ **Official:** https://github.com/Kilo-Org/kilocode
9
+ **Type:** AI coding agent (Binary + glibc bootstrapper)
10
+ **License:** MIT
11
+
12
+ ## Description
13
+
14
+ Kilo Code is an AI coding agent that meets you everywhere you work: VS Code, JetBrains, and the CLI. It's open source with open pricing. You pick from 500+ models, switch between them mid-task, and pay the model provider's rate with zero markup. No API keys required to start.
15
+
16
+ ## Dependencies
17
+
18
+ - glibc-repo, glibc, clang, git, ripgrep, python, jq, nodejs-lts, curl, tar
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ karnel install ai --kilocode-cli
24
+ ```
25
+
26
+ Installs natively with a glibc bootstrapper.
27
+
28
+ ## Uninstall
29
+
30
+ ```bash
31
+ karnel uninstall ai --kilocode-cli
32
+ ```
33
+
34
+ ## Update
35
+
36
+ ```bash
37
+ karnel update ai --kilocode-cli
38
+ ```
39
+
40
+ ## Notes
41
+
42
+ - Requires `glibc-repo`, `glibc`, `clang`, and other dependencies (installed automatically)
43
+ - The native binary is stored in `~/.local/share/karnel-data/kilocode/`
44
+ - A small C bootstrapper (`kilocode_helper.c`) handles ELF loading via the glibc dynamic linker
45
+ - Data directory: `~/.local/share/karnel-data/kilocode/`
@@ -0,0 +1,21 @@
1
+ #!/data/data/com.termux/files/usr/bin/bash
2
+
3
+ KILOCODE_DATA_DIR="$HOME/.local/share/karnel-data/kilocode"
4
+
5
+ unset LD_PRELOAD
6
+ unset LD_LIBRARY_PATH
7
+
8
+ export GODEBUG="netdns=cgo"
9
+ export SSL_CERT_FILE="/data/data/com.termux/files/usr/etc/tls/cert.pem"
10
+
11
+ LOADER="/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1"
12
+ REAL_BIN="$KILOCODE_DATA_DIR/kilo"
13
+ LIB_PATH="/data/data/com.termux/files/usr/glibc/lib"
14
+
15
+ if [ ! -f "$REAL_BIN" ]; then
16
+ echo "Error: Kilo Code CLI binary not found at $REAL_BIN" >&2
17
+ echo "Please run: karnel install ai --kilocode-cli" >&2
18
+ exit 1
19
+ fi
20
+
21
+ exec "$LOADER" --library-path "$LIB_PATH" "$REAL_BIN" "$@"
@@ -0,0 +1,47 @@
1
+ #include <stdlib.h>
2
+ #include <unistd.h>
3
+ #include <string.h>
4
+ #include <libgen.h>
5
+ #include <limits.h>
6
+ #include <stdio.h>
7
+
8
+ int main(int argc, char** argv) {
9
+ unsetenv("LD_PRELOAD");
10
+ unsetenv("LD_LIBRARY_PATH");
11
+
12
+ setenv("GODEBUG", "netdns=cgo", 1);
13
+ setenv("SSL_CERT_FILE", "/data/data/com.termux/files/usr/etc/tls/cert.pem", 1);
14
+
15
+ char exec_path[PATH_MAX];
16
+ ssize_t len = readlink("/proc/self/exe", exec_path, sizeof(exec_path) - 1);
17
+ if (len == -1) {
18
+ return 1;
19
+ }
20
+ exec_path[len] = '\0';
21
+ char* dir = dirname(exec_path);
22
+
23
+ char* loader = "/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1";
24
+ char real_bin[] = "/data/data/com.termux/files/home/.local/share/karnel-data/kilocode/kilo";
25
+ char lib_path[] = "/data/data/com.termux/files/usr/glibc/lib";
26
+
27
+ char** new_argv = malloc((argc + 4) * sizeof(char*));
28
+ if (!new_argv) {
29
+ return 1;
30
+ }
31
+
32
+ new_argv[0] = loader;
33
+ new_argv[1] = "--library-path";
34
+ new_argv[2] = lib_path;
35
+ new_argv[3] = real_bin;
36
+
37
+ for (int i = 1; i < argc; i++) {
38
+ new_argv[i + 3] = argv[i];
39
+ }
40
+ new_argv[argc + 3] = NULL;
41
+
42
+ execv(loader, new_argv);
43
+
44
+ perror("execv");
45
+ free(new_argv);
46
+ return 1;
47
+ }
@@ -0,0 +1,179 @@
1
+ #!/data/data/com.termux/files/usr/bin/bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ LOG_FILE="$KARNEL_CACHE/install_ai.log"
7
+ KILOCODE_DATA_DIR="$HOME/.local/share/karnel-data/kilocode"
8
+
9
+ _get_latest_kilocode_version() {
10
+ curl -fsSL https://api.github.com/repos/Kilo-Org/kilocode/releases/latest |
11
+ grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
12
+ }
13
+
14
+ _install_kilocode_deps() {
15
+ loading "Installing glibc and dependencies" _install_kilocode_deps_impl
16
+ }
17
+
18
+ _install_kilocode_deps_impl() {
19
+ if [[ ! -f $PREFIX/etc/apt/sources.list.d/glibc.list ]]; then
20
+ if ! yes | pkg install glibc-repo &>>"$LOG_FILE"; then
21
+ log_error "Failed to install glibc-repo"
22
+ return 1
23
+ fi
24
+ fi
25
+
26
+ if [[ ! -f $PREFIX/glibc/lib/libc.so.6 ]]; then
27
+ if ! yes | pkg install glibc &>>"$LOG_FILE"; then
28
+ log_error "Failed to install glibc"
29
+ return 1
30
+ fi
31
+ fi
32
+
33
+ declare -A DEPS=(
34
+ ["git"]="git"
35
+ ["ripgrep"]="rg"
36
+ ["python"]="python"
37
+ ["clang"]="clang"
38
+ ["jq"]="jq"
39
+ ["nodejs-lts"]="node"
40
+ ["curl"]="curl"
41
+ ["tar"]="tar"
42
+ )
43
+
44
+ local pkg_name bin_name
45
+ for pkg_name in "${!DEPS[@]}"; do
46
+ bin_name="${DEPS[$pkg_name]}"
47
+ if ! command -v "$bin_name" &>/dev/null; then
48
+ if ! yes | pkg install "$pkg_name" &>>"$LOG_FILE"; then
49
+ log_error "Failed to install $pkg_name"
50
+ return 1
51
+ fi
52
+ fi
53
+ done
54
+
55
+ return 0
56
+ }
57
+
58
+ _download_kilocode_binary() {
59
+ loading "Downloading Kilo Code CLI" _download_kilocode_binary_impl
60
+ }
61
+
62
+ _download_kilocode_binary_impl() {
63
+ local latest_version
64
+ latest_version=$(_get_latest_kilocode_version)
65
+ if [ -z "$latest_version" ]; then
66
+ log_error "Failed to fetch latest Kilo Code CLI version"
67
+ return 1
68
+ fi
69
+
70
+ mkdir -p "$KILOCODE_DATA_DIR"
71
+
72
+ local tarball="kilo-linux-arm64.tar.gz"
73
+ local download_url="https://github.com/Kilo-Org/kilocode/releases/download/$latest_version/$tarball"
74
+
75
+ if ! curl -fsSL "$download_url" -o "$KILOCODE_DATA_DIR/$tarball" &>>"$LOG_FILE"; then
76
+ log_error "Failed to download Kilo Code CLI binary"
77
+ return 1
78
+ fi
79
+
80
+ if ! tar -zxf "$KILOCODE_DATA_DIR/$tarball" -C "$KILOCODE_DATA_DIR" &>>"$LOG_FILE"; then
81
+ log_error "Failed to extract Kilo Code CLI binary"
82
+ return 1
83
+ fi
84
+
85
+ rm -f "$KILOCODE_DATA_DIR/$tarball"
86
+
87
+ if [ ! -f "$KILOCODE_DATA_DIR/kilo" ]; then
88
+ log_error "Kilo Code CLI binary not found after extraction"
89
+ return 1
90
+ fi
91
+
92
+ chmod +x "$KILOCODE_DATA_DIR/kilo"
93
+ return 0
94
+ }
95
+
96
+ _compile_kilocode_helper() {
97
+ loading "Compiling helper" _compile_kilocode_helper_impl
98
+ }
99
+
100
+ _compile_kilocode_helper_impl() {
101
+ local HELPER_SRC="$KARNEL_PATH/tools/ai/kilocode-cli/helper/kilocode_helper.c"
102
+ if [ ! -f "$HELPER_SRC" ]; then
103
+ log_error "Helper source not found at $HELPER_SRC"
104
+ return 1
105
+ fi
106
+
107
+ if ! clang -O2 -o "$PREFIX/bin/kilocode" "$HELPER_SRC" &>>"$LOG_FILE"; then
108
+ log_error "Failed to compile kilocode helper"
109
+ return 1
110
+ fi
111
+
112
+ chmod +x "$PREFIX/bin/kilocode"
113
+
114
+ ln -sf "$PREFIX/bin/kilocode" "$PREFIX/bin/kilo"
115
+
116
+ return 0
117
+ }
118
+
119
+ _install_kilocode_native() {
120
+ _install_kilocode_deps || return 1
121
+ _download_kilocode_binary || return 1
122
+ _compile_kilocode_helper || return 1
123
+ log_success "Kilo Code CLI installed natively"
124
+ return 0
125
+ }
126
+
127
+ install_kilocode_cli() {
128
+ if command -v kilocode &>/dev/null; then
129
+ log_info "Kilo Code CLI is already installed"
130
+ return 2
131
+ fi
132
+
133
+ _install_kilocode_native
134
+ }
135
+
136
+ uninstall_kilocode_cli() {
137
+ mkdir -p "$(dirname "$LOG_FILE")"
138
+
139
+ if [ ! -f "$PREFIX/bin/kilocode" ]; then
140
+ log_warn "Kilo Code CLI is not installed"
141
+ return 1
142
+ fi
143
+
144
+ loading "Uninstalling Kilo Code CLI" _uninstall_kilocode_cli_impl
145
+ }
146
+
147
+ _uninstall_kilocode_cli_impl() {
148
+ if [ -f "$KILOCODE_DATA_DIR/kilo" ]; then
149
+ rm -f "$PREFIX/bin/kilocode" "$PREFIX/bin/kilo"
150
+ rm -rf "$KILOCODE_DATA_DIR"
151
+ log_success "Kilo Code CLI uninstalled"
152
+ return 0
153
+ fi
154
+
155
+ if rm -f "$PREFIX/bin/kilocode" "$PREFIX/bin/kilo" &>>"$LOG_FILE"; then
156
+ log_success "Kilo Code CLI uninstalled"
157
+ return 0
158
+ else
159
+ log_error "Failed to uninstall Kilo Code CLI"
160
+ return 1
161
+ fi
162
+ }
163
+
164
+ update_kilocode_cli() {
165
+ mkdir -p "$(dirname "$LOG_FILE")"
166
+
167
+ if [ -f "$KILOCODE_DATA_DIR/kilo" ]; then
168
+ _install_kilocode_native
169
+ return $?
170
+ fi
171
+
172
+ log_warn "Kilo Code CLI not found for update"
173
+ return 1
174
+ }
175
+
176
+ reinstall_kilocode_cli() {
177
+ uninstall_kilocode_cli
178
+ install_kilocode_cli
179
+ }
@@ -0,0 +1,53 @@
1
+ # Kimchi CLI
2
+
3
+ Terminal coding agent powered by Kimchi's multi-model orchestration by CAST AI.
4
+
5
+ **Package:** kimchi-code
6
+ **Author:** israel marques
7
+ **Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
8
+ **Official:** https://github.com/getkimchi/kimchi
9
+ **Type:** AI coding agent (Binary download)
10
+ **License:** MIT
11
+
12
+ ## Description
13
+
14
+ Kimchi is a standalone terminal coding agent — not an OpenCode plugin. It configures AI coding assistants to use CAST AI's open-source models. Terminal coding agent powered by Kimchi's multi-model orchestration.
15
+
16
+ ## Dependencies
17
+
18
+ - curl, tar
19
+ - proot-distro (for Termux/Android)
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ karnel install ai --kimchi-code
25
+ ```
26
+
27
+ ## Uninstall
28
+
29
+ ```bash
30
+ karnel uninstall ai --kimchi-code
31
+ ```
32
+
33
+ ## Update
34
+
35
+ ```bash
36
+ karnel update ai --kimchi-code
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ ```bash
42
+ kimchi # Launch interactive TUI
43
+ kimchi setup # First-time configuration wizard
44
+ ```
45
+
46
+ ## Notes
47
+
48
+ - Binary downloaded from GitHub releases: `getkimchi/kimchi`
49
+ - Command: `kimchi`
50
+ - Data directory: `~/.local/share/karnel-data/kimchi/`
51
+ - Runs inside proot-distro Ubuntu on Termux for glibc compatibility
52
+ - Switch model with `/model` or `Ctrl+P`
53
+ - Docs: https://docs.kimchi.dev