omni-catalyst 1.0.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 (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1137 -0
  3. package/core/bin/core +85 -0
  4. package/core/bin/omni +21 -0
  5. package/core/cli/commands/--version.sh +8 -0
  6. package/core/cli/commands/brain.sh +1549 -0
  7. package/core/cli/commands/doctor.sh +834 -0
  8. package/core/cli/commands/env.sh +226 -0
  9. package/core/cli/commands/init.sh +1266 -0
  10. package/core/cli/commands/install.sh +759 -0
  11. package/core/cli/commands/list.sh +397 -0
  12. package/core/cli/commands/open.sh +71 -0
  13. package/core/cli/commands/pg.sh +761 -0
  14. package/core/cli/commands/reinstall.sh +694 -0
  15. package/core/cli/commands/show.sh +90 -0
  16. package/core/cli/commands/uninstall.sh +700 -0
  17. package/core/cli/commands/update.sh +754 -0
  18. package/core/cli/commands/voice.sh +170 -0
  19. package/core/cli/core.sh +82 -0
  20. package/core/cli/omni.sh +634 -0
  21. package/core/modules/ai.sh +152 -0
  22. package/core/modules/auto.sh +90 -0
  23. package/core/modules/db.sh +94 -0
  24. package/core/modules/deploy.sh +50 -0
  25. package/core/modules/dev.sh +126 -0
  26. package/core/modules/editor.sh +101 -0
  27. package/core/modules/lang.sh +100 -0
  28. package/core/modules/npm.sh +122 -0
  29. package/core/modules/shell.sh +312 -0
  30. package/core/modules/ui.sh +115 -0
  31. package/core/tools/ai/all.sh +63 -0
  32. package/core/tools/ai/antigravity-cli/README.md +45 -0
  33. package/core/tools/ai/antigravity-cli/bin/agy +28 -0
  34. package/core/tools/ai/antigravity-cli/helper/agy_helper.c +39 -0
  35. package/core/tools/ai/antigravity-cli/install.sh +469 -0
  36. package/core/tools/ai/claude-code/README.md +45 -0
  37. package/core/tools/ai/claude-code/bin/claude +29 -0
  38. package/core/tools/ai/claude-code/helper/claude_helper.c +42 -0
  39. package/core/tools/ai/claude-code/install.sh +278 -0
  40. package/core/tools/ai/codegraph/README.md +43 -0
  41. package/core/tools/ai/codegraph/bin/codegraph +3 -0
  42. package/core/tools/ai/codegraph/install.sh +149 -0
  43. package/core/tools/ai/codex/README.md +44 -0
  44. package/core/tools/ai/codex/install.sh +104 -0
  45. package/core/tools/ai/command-code/README.md +62 -0
  46. package/core/tools/ai/command-code/install.sh +136 -0
  47. package/core/tools/ai/engram/README.md +44 -0
  48. package/core/tools/ai/engram/install.sh +127 -0
  49. package/core/tools/ai/freebuff/README.md +52 -0
  50. package/core/tools/ai/freebuff/bin/freebuff +28 -0
  51. package/core/tools/ai/freebuff/helper/freebuff_helper.c +47 -0
  52. package/core/tools/ai/freebuff/install.sh +301 -0
  53. package/core/tools/ai/gemini-cli/README.md +46 -0
  54. package/core/tools/ai/gemini-cli/install.sh +111 -0
  55. package/core/tools/ai/gentle-ai/README.md +42 -0
  56. package/core/tools/ai/gentle-ai/install.sh +253 -0
  57. package/core/tools/ai/gentle-ai/termux-patches.go +256 -0
  58. package/core/tools/ai/gga/README.md +49 -0
  59. package/core/tools/ai/gga/install.sh +134 -0
  60. package/core/tools/ai/hermes-agent/README.md +50 -0
  61. package/core/tools/ai/hermes-agent/install.sh +80 -0
  62. package/core/tools/ai/heygen/README.md +24 -0
  63. package/core/tools/ai/heygen/install.sh +126 -0
  64. package/core/tools/ai/kilocode-cli/README.md +45 -0
  65. package/core/tools/ai/kilocode-cli/bin/kilocode +21 -0
  66. package/core/tools/ai/kilocode-cli/helper/kilocode_helper.c +47 -0
  67. package/core/tools/ai/kilocode-cli/install.sh +179 -0
  68. package/core/tools/ai/kimchi-code/README.md +8 -0
  69. package/core/tools/ai/kimchi-code/install.sh +120 -0
  70. package/core/tools/ai/kimi-code/README.md +45 -0
  71. package/core/tools/ai/kimi-code/install.sh +111 -0
  72. package/core/tools/ai/kiro-cli/README.md +23 -0
  73. package/core/tools/ai/kiro-cli/install.sh +127 -0
  74. package/core/tools/ai/mimocode/README.md +43 -0
  75. package/core/tools/ai/mimocode/bin/mimo +28 -0
  76. package/core/tools/ai/mimocode/helper/mimocode_helper.c +47 -0
  77. package/core/tools/ai/mimocode/install.sh +287 -0
  78. package/core/tools/ai/minimax-cli/README.md +45 -0
  79. package/core/tools/ai/minimax-cli/install.sh +111 -0
  80. package/core/tools/ai/mistral-vibe/README.md +46 -0
  81. package/core/tools/ai/mistral-vibe/install.sh +119 -0
  82. package/core/tools/ai/odysseus/README.md +35 -0
  83. package/core/tools/ai/odysseus/install.sh +163 -0
  84. package/core/tools/ai/ollama/README.md +44 -0
  85. package/core/tools/ai/ollama/install.sh +78 -0
  86. package/core/tools/ai/openclaude/README.md +46 -0
  87. package/core/tools/ai/openclaude/install.sh +110 -0
  88. package/core/tools/ai/openclaw/README.md +47 -0
  89. package/core/tools/ai/openclaw/install.sh +112 -0
  90. package/core/tools/ai/opencode/README.md +51 -0
  91. package/core/tools/ai/opencode/bin/opencode +28 -0
  92. package/core/tools/ai/opencode/helper/opencode_helper.c +57 -0
  93. package/core/tools/ai/opencode/install.sh +290 -0
  94. package/core/tools/ai/pi/README.md +46 -0
  95. package/core/tools/ai/pi/install.sh +104 -0
  96. package/core/tools/ai/qwen-code/README.md +45 -0
  97. package/core/tools/ai/qwen-code/install.sh +111 -0
  98. package/core/tools/ai/seedance/README.md +22 -0
  99. package/core/tools/ai/seedance/install.sh +134 -0
  100. package/core/tools/ai/veo3/README.md +36 -0
  101. package/core/tools/ai/veo3/install.sh +151 -0
  102. package/core/tools/auto/all.sh +57 -0
  103. package/core/tools/auto/n8n/README.md +47 -0
  104. package/core/tools/auto/n8n/install.sh +102 -0
  105. package/core/tools/db/all.sh +60 -0
  106. package/core/tools/db/mariadb/README.md +43 -0
  107. package/core/tools/db/mariadb/install.sh +65 -0
  108. package/core/tools/db/mongodb/README.md +42 -0
  109. package/core/tools/db/mongodb/install.sh +73 -0
  110. package/core/tools/db/postgresql/README.md +45 -0
  111. package/core/tools/db/postgresql/install.sh +65 -0
  112. package/core/tools/db/sqlite/README.md +44 -0
  113. package/core/tools/db/sqlite/install.sh +65 -0
  114. package/core/tools/deploy/all.sh +39 -0
  115. package/core/tools/deploy/netlify/install.sh +41 -0
  116. package/core/tools/deploy/railway/install.sh +47 -0
  117. package/core/tools/deploy/vercel/install.sh +43 -0
  118. package/core/tools/dev/all.sh +75 -0
  119. package/core/tools/dev/bat/README.md +44 -0
  120. package/core/tools/dev/bat/install.sh +82 -0
  121. package/core/tools/dev/bc/README.md +44 -0
  122. package/core/tools/dev/bc/install.sh +82 -0
  123. package/core/tools/dev/cloudflared/README.md +43 -0
  124. package/core/tools/dev/cloudflared/install.sh +82 -0
  125. package/core/tools/dev/curl/README.md +43 -0
  126. package/core/tools/dev/curl/install.sh +82 -0
  127. package/core/tools/dev/fzf/README.md +44 -0
  128. package/core/tools/dev/fzf/install.sh +82 -0
  129. package/core/tools/dev/gh/README.md +43 -0
  130. package/core/tools/dev/gh/install.sh +82 -0
  131. package/core/tools/dev/html2text/README.md +44 -0
  132. package/core/tools/dev/html2text/install.sh +82 -0
  133. package/core/tools/dev/imagemagick/README.md +44 -0
  134. package/core/tools/dev/imagemagick/install.sh +82 -0
  135. package/core/tools/dev/jq/README.md +44 -0
  136. package/core/tools/dev/jq/install.sh +82 -0
  137. package/core/tools/dev/lsd/README.md +44 -0
  138. package/core/tools/dev/lsd/install.sh +82 -0
  139. package/core/tools/dev/make/README.md +44 -0
  140. package/core/tools/dev/make/install.sh +82 -0
  141. package/core/tools/dev/ncurses/README.md +42 -0
  142. package/core/tools/dev/ncurses/install.sh +82 -0
  143. package/core/tools/dev/proot/README.md +43 -0
  144. package/core/tools/dev/proot/install.sh +82 -0
  145. package/core/tools/dev/shfmt/README.md +44 -0
  146. package/core/tools/dev/shfmt/install.sh +82 -0
  147. package/core/tools/dev/tmate/README.md +44 -0
  148. package/core/tools/dev/tmate/install.sh +82 -0
  149. package/core/tools/dev/translate/README.md +44 -0
  150. package/core/tools/dev/translate/install.sh +82 -0
  151. package/core/tools/dev/tree/README.md +44 -0
  152. package/core/tools/dev/tree/install.sh +82 -0
  153. package/core/tools/dev/udocker/README.md +44 -0
  154. package/core/tools/dev/udocker/install.sh +82 -0
  155. package/core/tools/dev/wget/README.md +44 -0
  156. package/core/tools/dev/wget/install.sh +82 -0
  157. package/core/tools/editor/all.sh +58 -0
  158. package/core/tools/editor/neovim/README.md +43 -0
  159. package/core/tools/editor/neovim/install.sh +66 -0
  160. package/core/tools/editor/nvchad/README.md +45 -0
  161. package/core/tools/editor/nvchad/install.sh +110 -0
  162. package/core/tools/lang/all.sh +63 -0
  163. package/core/tools/lang/clang/README.md +43 -0
  164. package/core/tools/lang/clang/install.sh +79 -0
  165. package/core/tools/lang/golang/README.md +43 -0
  166. package/core/tools/lang/golang/install.sh +79 -0
  167. package/core/tools/lang/nodejs/README.md +43 -0
  168. package/core/tools/lang/nodejs/install.sh +79 -0
  169. package/core/tools/lang/perl/README.md +43 -0
  170. package/core/tools/lang/perl/install.sh +79 -0
  171. package/core/tools/lang/php/README.md +43 -0
  172. package/core/tools/lang/php/install.sh +79 -0
  173. package/core/tools/lang/python/README.md +43 -0
  174. package/core/tools/lang/python/install.sh +79 -0
  175. package/core/tools/lang/rust/README.md +43 -0
  176. package/core/tools/lang/rust/install.sh +79 -0
  177. package/core/tools/npm/all.sh +67 -0
  178. package/core/tools/npm/live-server/README.md +43 -0
  179. package/core/tools/npm/live-server/install.sh +95 -0
  180. package/core/tools/npm/localtunnel/README.md +43 -0
  181. package/core/tools/npm/localtunnel/install.sh +111 -0
  182. package/core/tools/npm/markserv/README.md +43 -0
  183. package/core/tools/npm/markserv/install.sh +94 -0
  184. package/core/tools/npm/ncu/README.md +43 -0
  185. package/core/tools/npm/ncu/install.sh +94 -0
  186. package/core/tools/npm/nestjs/README.md +43 -0
  187. package/core/tools/npm/nestjs/install.sh +94 -0
  188. package/core/tools/npm/ngrok/README.md +44 -0
  189. package/core/tools/npm/ngrok/install.sh +94 -0
  190. package/core/tools/npm/prettier/README.md +43 -0
  191. package/core/tools/npm/prettier/install.sh +94 -0
  192. package/core/tools/npm/psqlformat/README.md +43 -0
  193. package/core/tools/npm/psqlformat/install.sh +94 -0
  194. package/core/tools/npm/turbopack/README.md +8 -0
  195. package/core/tools/npm/turbopack/install.sh +41 -0
  196. package/core/tools/npm/typescript/README.md +43 -0
  197. package/core/tools/npm/typescript/install.sh +94 -0
  198. package/core/tools/npm/vercel/README.md +43 -0
  199. package/core/tools/npm/vercel/install.sh +94 -0
  200. package/core/tools/shell/all.sh +67 -0
  201. package/core/tools/shell/better-npm/README.md +43 -0
  202. package/core/tools/shell/better-npm/install.sh +85 -0
  203. package/core/tools/shell/fzf-tab/README.md +44 -0
  204. package/core/tools/shell/fzf-tab/install.sh +85 -0
  205. package/core/tools/shell/history-substring/README.md +43 -0
  206. package/core/tools/shell/history-substring/install.sh +85 -0
  207. package/core/tools/shell/powerlevel10k/README.md +43 -0
  208. package/core/tools/shell/powerlevel10k/install.sh +85 -0
  209. package/core/tools/shell/you-should-use/README.md +43 -0
  210. package/core/tools/shell/you-should-use/install.sh +85 -0
  211. package/core/tools/shell/zsh-autopair/README.md +44 -0
  212. package/core/tools/shell/zsh-autopair/install.sh +85 -0
  213. package/core/tools/shell/zsh-autosuggestions/README.md +43 -0
  214. package/core/tools/shell/zsh-autosuggestions/install.sh +85 -0
  215. package/core/tools/shell/zsh-completions/README.md +43 -0
  216. package/core/tools/shell/zsh-completions/install.sh +85 -0
  217. package/core/tools/shell/zsh-defer/README.md +43 -0
  218. package/core/tools/shell/zsh-defer/install.sh +85 -0
  219. package/core/tools/shell/zsh-syntax-highlighting/README.md +43 -0
  220. package/core/tools/shell/zsh-syntax-highlighting/install.sh +72 -0
  221. package/core/tools/ui/all.sh +61 -0
  222. package/core/tools/ui/banner/README.md +42 -0
  223. package/core/tools/ui/banner/install.sh +151 -0
  224. package/core/tools/ui/cursor/README.md +42 -0
  225. package/core/tools/ui/cursor/install.sh +58 -0
  226. package/core/tools/ui/extra-keys/README.md +43 -0
  227. package/core/tools/ui/extra-keys/install.sh +62 -0
  228. package/core/tools/ui/font/README.md +43 -0
  229. package/core/tools/ui/font/install.sh +63 -0
  230. package/core/utils/banner.sh +519 -0
  231. package/core/utils/bootstrap.sh +25 -0
  232. package/core/utils/colors.sh +31 -0
  233. package/core/utils/dialogrc +30 -0
  234. package/core/utils/env.sh +53 -0
  235. package/core/utils/log.sh +598 -0
  236. package/install.sh +272 -0
  237. package/package.json +43 -0
@@ -0,0 +1,39 @@
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* loader = "/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1";
16
+ char real_bin[] = "/data/data/com.termux/files/home/.local/share/omni-data/antigravity-cli/agy.va39";
17
+ char lib_path[] = "/data/data/com.termux/files/usr/glibc/lib";
18
+
19
+ char** new_argv = malloc((argc + 4) * sizeof(char*));
20
+ if (!new_argv) {
21
+ return 1;
22
+ }
23
+
24
+ new_argv[0] = loader;
25
+ new_argv[1] = "--library-path";
26
+ new_argv[2] = lib_path;
27
+ new_argv[3] = real_bin;
28
+
29
+ for (int i = 1; i < argc; i++) {
30
+ new_argv[i + 3] = argv[i];
31
+ }
32
+ new_argv[argc + 3] = NULL;
33
+
34
+ execv(loader, new_argv);
35
+
36
+ perror("execv");
37
+ free(new_argv);
38
+ return 1;
39
+ }
@@ -0,0 +1,469 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ LOG_FILE="$OMNI_CACHE/install_ai.log"
7
+ AGY_DATA_DIR="$HOME/.local/share/omni-data/antigravity-cli"
8
+ MANIFEST_URL="https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/linux_arm64.json"
9
+
10
+ _antigravity_get_latest_version() {
11
+ curl -fsSL "$MANIFEST_URL" | jq -r .version
12
+ }
13
+
14
+ _antigravity_get_download_url() {
15
+ curl -fsSL "$MANIFEST_URL" | jq -r .url
16
+ }
17
+
18
+ _antigravity_cli_dependencies() {
19
+ loading "Installing glibc and dependencies" _antigravity_cli_dependencies_impl
20
+ }
21
+
22
+ _antigravity_cli_dependencies_impl() {
23
+ if [[ ! -f $PREFIX/etc/apt/sources.list.d/glibc.list ]]; then
24
+ if ! pkg install glibc-repo -y &>>"$LOG_FILE"; then
25
+ log_error "Failed to install glibc-repo"
26
+ return 1
27
+ fi
28
+ fi
29
+
30
+ if [[ ! -f $PREFIX/glibc/lib/libc.so.6 ]]; then
31
+ if ! pkg install glibc -y &>>"$LOG_FILE"; then
32
+ log_error "Failed to install glibc"
33
+ return 1
34
+ fi
35
+ fi
36
+
37
+ declare -A DEPS=(
38
+ ["clang"]="clang"
39
+ ["python"]="python"
40
+ ["jq"]="jq"
41
+ ["curl"]="curl"
42
+ ["tar"]="tar"
43
+ )
44
+
45
+ local pkg_name bin_name
46
+ for pkg_name in "${!DEPS[@]}"; do
47
+ bin_name="${DEPS[$pkg_name]}"
48
+ if [[ -n "$bin_name" ]] && command -v "$bin_name" &>/dev/null; then
49
+ continue
50
+ fi
51
+ if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
52
+ log_error "Failed to install $pkg_name"
53
+ return 1
54
+ fi
55
+ done
56
+
57
+ return 0
58
+ }
59
+
60
+ _antigravity_download_binary() {
61
+ loading "Downloading Antigravity CLI binary" _antigravity_download_binary_impl
62
+ }
63
+
64
+ _antigravity_download_binary_impl() {
65
+ local latest_version
66
+ latest_version=$(_antigravity_get_latest_version)
67
+ if [ -z "$latest_version" ]; then
68
+ log_error "Failed to fetch latest Antigravity version"
69
+ return 1
70
+ fi
71
+
72
+ mkdir -p "$AGY_DATA_DIR"
73
+
74
+ local download_url
75
+ download_url=$(_antigravity_get_download_url)
76
+ local tarball="$AGY_DATA_DIR/agy.tar.gz"
77
+
78
+ if ! curl -fsSL -o "$tarball" "$download_url" &>>"$LOG_FILE"; then
79
+ log_error "Failed to download Antigravity CLI binary"
80
+ return 1
81
+ fi
82
+
83
+ if ! tar -xzf "$tarball" -C "$AGY_DATA_DIR" &>>"$LOG_FILE"; then
84
+ log_error "Failed to extract Antigravity CLI binary"
85
+ return 1
86
+ fi
87
+
88
+ rm -f "$tarball"
89
+
90
+ local upstream_bin=""
91
+ if [ -f "$AGY_DATA_DIR/antigravity" ]; then
92
+ upstream_bin="$AGY_DATA_DIR/antigravity"
93
+ elif [ -f "$AGY_DATA_DIR/agy" ]; then
94
+ upstream_bin="$AGY_DATA_DIR/agy"
95
+ else
96
+ log_error "Could not find binary in extracted archive"
97
+ return 1
98
+ fi
99
+
100
+ chmod +x "$upstream_bin"
101
+ return 0
102
+ }
103
+
104
+ _antigravity_apply_va39_patches() {
105
+ loading "Applying VA39 memory patches" _antigravity_apply_va39_patches_impl
106
+ }
107
+
108
+ _antigravity_apply_va39_patches_impl() {
109
+ local upstream_bin=""
110
+ if [ -f "$AGY_DATA_DIR/antigravity" ]; then
111
+ upstream_bin="$AGY_DATA_DIR/antigravity"
112
+ elif [ -f "$AGY_DATA_DIR/agy" ]; then
113
+ upstream_bin="$AGY_DATA_DIR/agy"
114
+ else
115
+ log_error "Binary not found for patching"
116
+ return 1
117
+ fi
118
+
119
+ python3 - "$upstream_bin" "${AGY_DATA_DIR}/agy.va39" <<'PY'
120
+ import sys, shutil, struct, pathlib
121
+ src = pathlib.Path(sys.argv[1])
122
+ dst = pathlib.Path(sys.argv[2])
123
+ shutil.copyfile(src, dst)
124
+ data = bytearray(dst.read_bytes())
125
+ def get(off): return struct.unpack_from("<I", data, off)[0]
126
+ def put(off, word): struct.pack_into("<I", data, off, word)
127
+
128
+ lo, hi = 0, len(data)
129
+ for off in range(lo, hi, 4):
130
+ w = get(off)
131
+ if (w & 0x7F800000) == 0x53000000:
132
+ immr, imms = (w >> 16) & 0x3F, (w >> 10) & 0x3F
133
+ if immr == 42 and imms == 44:
134
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (35 << 16) | (37 << 10))
135
+ elif immr == 22 and imms == 21:
136
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (29 << 16) | (28 << 10))
137
+ for off in range(lo, hi - 4, 4):
138
+ if get(off) == 0x92D3800A and get(off + 4) == 0xF2E0000A:
139
+ put(off, 0x9280000A); put(off + 4, 0xD35DFD4A)
140
+ for off in range(lo, hi, 4):
141
+ if get(off) == 0xF2E00029: put(off, 0xD3596129)
142
+ word_rewrites = {
143
+ 0xD2C20009: 0xD2C00409, 0xD2C2000A: 0xD2C0040A, 0xF2C20008: 0xF2DFF408,
144
+ 0xF2C20009: 0xF2DFF409, 0xD2C10009: 0xD2C00209, 0xD2C1000A: 0xD2C0020A,
145
+ 0xF2C38008: 0xF2DFF708, 0xF2C38009: 0xF2DFF709, 0x92560A6C: 0x925D0A6C,
146
+ 0x92560A6A: 0x925D0A6A, 0xD2C3000D: 0xD2C0060D, 0xD2C3000C: 0xD2C0060C,
147
+ 0xD2C08008: 0xD2C00108,
148
+ }
149
+ for off in range(lo, hi, 4):
150
+ w = get(off)
151
+ if w in word_rewrites: put(off, word_rewrites[w])
152
+ for off in range(0, len(data) - 12, 4):
153
+ if get(off) == 0xAA1F03E5 and get(off + 4) == 0xAA1F03E6 and get(off + 8) == 0xD28036E0 and (get(off + 12) & 0xFC000000) == 0x94000000:
154
+ put(off + 8, 0xD2800600)
155
+ dst.write_bytes(data)
156
+ PY
157
+
158
+ chmod +x "$AGY_DATA_DIR/agy.va39"
159
+ return 0
160
+ }
161
+
162
+ _antigravity_detect_ubuntu_root() {
163
+ local root
164
+ root="$(find /data/data/com.termux -maxdepth 10 -type d \
165
+ -name "rootfs" -path "*/containers/ubuntu/*" 2>/dev/null | head -1)"
166
+
167
+ if [ -z "$root" ]; then
168
+ root="$(find /data/data/com.termux -maxdepth 10 -type d \
169
+ -name "ubuntu" -path "*/installed-rootfs/*" 2>/dev/null | head -1)"
170
+ fi
171
+
172
+ echo "$root"
173
+ }
174
+
175
+ _antigravity_proot_ubuntu() {
176
+ proot-distro login \
177
+ --shared-tmp \
178
+ ubuntu \
179
+ -- "$@"
180
+ }
181
+
182
+ _antigravity_compile_helper() {
183
+ loading "Compiling helper" _antigravity_compile_helper_impl
184
+ }
185
+
186
+ _antigravity_compile_helper_impl() {
187
+ local HELPER_SRC="$OMNI_PATH/tools/ai/antigravity-cli/helper/agy_helper.c"
188
+ if [ ! -f "$HELPER_SRC" ]; then
189
+ log_error "Helper source not found at $HELPER_SRC"
190
+ return 1
191
+ fi
192
+
193
+ if ! clang -O2 -o "$PREFIX/bin/agy" "$HELPER_SRC" &>>"$LOG_FILE"; then
194
+ log_error "Failed to compile agy helper"
195
+ return 1
196
+ fi
197
+
198
+ chmod +x "$PREFIX/bin/agy"
199
+ return 0
200
+ }
201
+
202
+ _install_antigravity_proot() {
203
+ loading "Installing Antigravity CLI (proot-distro)" _install_antigravity_proot_impl
204
+ }
205
+
206
+ _install_antigravity_proot_impl() {
207
+ mkdir -p "$(dirname "$LOG_FILE")"
208
+
209
+ if ! command -v proot-distro &>/dev/null; then
210
+ pkg install proot-distro -y &>>"$LOG_FILE"
211
+ fi
212
+
213
+ if [ ! -d "$(_antigravity_detect_ubuntu_root)" ]; then
214
+ proot-distro install ubuntu &>>"$LOG_FILE"
215
+ fi
216
+
217
+ _antigravity_proot_ubuntu /bin/bash -c \
218
+ 'apt-get update && apt-get upgrade -y && apt-get install -y curl ca-certificates' \
219
+ &>>"$LOG_FILE"
220
+
221
+ _antigravity_proot_ubuntu /bin/bash -c '
222
+ export SHELL=/bin/bash
223
+ export TMPDIR=/tmp
224
+ export HOME=/root
225
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
226
+ ' &>>"$LOG_FILE"
227
+
228
+ local ubuntu_root
229
+ ubuntu_root="$(_antigravity_detect_ubuntu_root)"
230
+
231
+ if [ -z "$ubuntu_root" ]; then
232
+ log_error "Ubuntu rootfs not found"
233
+ return 1
234
+ fi
235
+
236
+ local upstream_bin=""
237
+ local candidates=(
238
+ "$ubuntu_root/root/.local/bin/agy"
239
+ "$ubuntu_root/root/.agy/bin/agy"
240
+ "$ubuntu_root/usr/local/bin/agy"
241
+ )
242
+ for p in "${candidates[@]}"; do
243
+ if [ -f "$p" ]; then
244
+ upstream_bin="$p"
245
+ break
246
+ fi
247
+ done
248
+
249
+ if [ -z "$upstream_bin" ]; then
250
+ log_error "Antigravity CLI binary not found after install"
251
+ return 1
252
+ fi
253
+
254
+ python3 - "$upstream_bin" "${upstream_bin}.va39" <<'PY'
255
+ import sys, shutil, struct, pathlib
256
+ src = pathlib.Path(sys.argv[1])
257
+ dst = pathlib.Path(sys.argv[2])
258
+ shutil.copyfile(src, dst)
259
+ data = bytearray(dst.read_bytes())
260
+ def get(off): return struct.unpack_from("<I", data, off)[0]
261
+ def put(off, word): struct.pack_into("<I", data, off, word)
262
+
263
+ lo, hi = 0, len(data)
264
+ for off in range(lo, hi, 4):
265
+ w = get(off)
266
+ if (w & 0x7F800000) == 0x53000000:
267
+ immr, imms = (w >> 16) & 0x3F, (w >> 10) & 0x3F
268
+ if immr == 42 and imms == 44:
269
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (35 << 16) | (37 << 10))
270
+ elif immr == 22 and imms == 21:
271
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (29 << 16) | (28 << 10))
272
+ for off in range(lo, hi - 4, 4):
273
+ if get(off) == 0x92D3800A and get(off + 4) == 0xF2E0000A:
274
+ put(off, 0x9280000A); put(off + 4, 0xD35DFD4A)
275
+ for off in range(lo, hi, 4):
276
+ if get(off) == 0xF2E00029: put(off, 0xD3596129)
277
+ word_rewrites = {
278
+ 0xD2C20009: 0xD2C00409, 0xD2C2000A: 0xD2C0040A, 0xF2C20008: 0xF2DFF408,
279
+ 0xF2C20009: 0xF2DFF409, 0xD2C10009: 0xD2C00209, 0xD2C1000A: 0xD2C0020A,
280
+ 0xF2C38008: 0xF2DFF708, 0xF2C38009: 0xF2DFF709, 0x92560A6C: 0x925D0A6C,
281
+ 0x92560A6A: 0x925D0A6A, 0xD2C3000D: 0xD2C0060D, 0xD2C3000C: 0xD2C0060C,
282
+ 0xD2C08008: 0xD2C00108,
283
+ }
284
+ for off in range(lo, hi, 4):
285
+ w = get(off)
286
+ if w in word_rewrites: put(off, word_rewrites[w])
287
+ for off in range(0, len(data) - 12, 4):
288
+ if get(off) == 0xAA1F03E5 and get(off + 4) == 0xAA1F03E6 and get(off + 8) == 0xD28036E0 and (get(off + 12) & 0xFC000000) == 0x94000000:
289
+ put(off + 8, 0xD2800600)
290
+ dst.write_bytes(data)
291
+ PY
292
+
293
+ chmod +x "${upstream_bin}.va39"
294
+
295
+ local wrapper_src="$OMNI_PATH/tools/ai/antigravity-cli/bin/agy"
296
+ if [ ! -f "$wrapper_src" ]; then
297
+ log_error "Wrapper template not found at $wrapper_src"
298
+ return 1
299
+ fi
300
+ sed "s|__UBUNTU_ROOTFS__|$ubuntu_root|g" "$wrapper_src" >"$PREFIX/bin/agy"
301
+ chmod +x "$PREFIX/bin/agy"
302
+
303
+ if ! grep -q '.local/bin' "$ubuntu_root/root/.bashrc" 2>/dev/null; then
304
+ printf '\n# antigravity-cli\nexport PATH=/root/.local/bin:$PATH\n' >>"$ubuntu_root/root/.bashrc"
305
+ fi
306
+
307
+ return 0
308
+ }
309
+
310
+ install_antigravity_cli() {
311
+ if command -v agy &>/dev/null; then
312
+ log_info "Antigravity CLI is already installed"
313
+ return 2
314
+ fi
315
+
316
+ log_info "Select installation method for Antigravity CLI:"
317
+
318
+ read_select "Installation method" SELECTED_METHOD \
319
+ "Native (recommended) - Compile with glibc support" \
320
+ "Proot-distro (alternative) - Ubuntu container"
321
+
322
+ case "$SELECTED_METHOD" in
323
+ *Native*)
324
+ _antigravity_cli_dependencies || return 1
325
+ _antigravity_download_binary || return 1
326
+ _antigravity_apply_va39_patches || return 1
327
+ _antigravity_compile_helper || return 1
328
+ log_success "Antigravity CLI installed"
329
+ return 0
330
+ ;;
331
+ *Proot-distro*)
332
+ _install_antigravity_proot
333
+ ;;
334
+ esac
335
+ }
336
+
337
+ uninstall_antigravity_cli() {
338
+ log_info "Uninstalling Antigravity CLI..."
339
+ mkdir -p "$(dirname "$LOG_FILE")"
340
+
341
+ if [ ! -f "$PREFIX/bin/agy" ]; then
342
+ log_warn "Antigravity CLI is not installed"
343
+ return 1
344
+ fi
345
+
346
+ if [ -f "$AGY_DATA_DIR/agy.va39" ]; then
347
+ rm -f "$PREFIX/bin/agy"
348
+ rm -rf "$AGY_DATA_DIR"
349
+ log_success "Antigravity CLI (native) uninstalled"
350
+ return 0
351
+ fi
352
+
353
+ _antigravity_proot_ubuntu /bin/bash -c \
354
+ 'rm -f /root/.local/bin/agy /root/.local/bin/agy.va39 && rm -rf /root/.agy' \
355
+ &>>"$LOG_FILE"
356
+
357
+ local ubuntu_bashrc
358
+ ubuntu_bashrc="$(_antigravity_detect_ubuntu_root)/root/.bashrc"
359
+
360
+ if [ -f "$ubuntu_bashrc" ]; then
361
+ sed -i '/# antigravity-cli/d; /export PATH=\/root\/.local\/bin/d' "$ubuntu_bashrc"
362
+ fi
363
+
364
+ if rm -f "$PREFIX/bin/agy" &>>"$LOG_FILE"; then
365
+ log_success "Antigravity CLI (proot-distro) uninstalled"
366
+ return 0
367
+ else
368
+ log_error "Failed to uninstall Antigravity CLI"
369
+ return 1
370
+ fi
371
+ }
372
+
373
+ update_antigravity_cli() {
374
+ log_info "Updating Antigravity CLI..."
375
+ mkdir -p "$(dirname "$LOG_FILE")"
376
+
377
+ if [ -f "$AGY_DATA_DIR/agy.va39" ]; then
378
+ _antigravity_download_binary || return 1
379
+ _antigravity_apply_va39_patches || return 1
380
+ log_success "Antigravity CLI (native) updated"
381
+ return 0
382
+ fi
383
+
384
+ _antigravity_proot_ubuntu /bin/bash -c \
385
+ 'rm -f /root/.local/bin/agy /root/.local/bin/agy.va39' \
386
+ &>>"$LOG_FILE"
387
+
388
+ _antigravity_proot_ubuntu /bin/bash -c '
389
+ export SHELL=/bin/bash
390
+ export TMPDIR=/tmp
391
+ export HOME=/root
392
+ curl -fsSL https://antigravity.google/cli/install.sh | bash
393
+ ' &>>"$LOG_FILE"
394
+
395
+ local ubuntu_root
396
+ ubuntu_root="$(_antigravity_detect_ubuntu_root)"
397
+
398
+ if [ -z "$ubuntu_root" ]; then
399
+ log_error "Ubuntu rootfs not found"
400
+ return 1
401
+ fi
402
+
403
+ local upstream_bin=""
404
+ local candidates=(
405
+ "$ubuntu_root/root/.local/bin/agy"
406
+ "$ubuntu_root/root/.agy/bin/agy"
407
+ "$ubuntu_root/usr/local/bin/agy"
408
+ )
409
+ for p in "${candidates[@]}"; do
410
+ if [ -f "$p" ]; then
411
+ upstream_bin="$p"
412
+ break
413
+ fi
414
+ done
415
+
416
+ if [ -z "$upstream_bin" ]; then
417
+ log_error "Antigravity CLI binary not found after update"
418
+ return 1
419
+ fi
420
+
421
+ log_info "Applying VA39 patches (proot)..."
422
+ python3 - "$upstream_bin" "${upstream_bin}.va39" <<'PY'
423
+ import sys, shutil, struct, pathlib
424
+ src = pathlib.Path(sys.argv[1])
425
+ dst = pathlib.Path(sys.argv[2])
426
+ shutil.copyfile(src, dst)
427
+ data = bytearray(dst.read_bytes())
428
+ def get(off): return struct.unpack_from("<I", data, off)[0]
429
+ def put(off, word): struct.pack_into("<I", data, off, word)
430
+
431
+ lo, hi = 0, len(data)
432
+ for off in range(lo, hi, 4):
433
+ w = get(off)
434
+ if (w & 0x7F800000) == 0x53000000:
435
+ immr, imms = (w >> 16) & 0x3F, (w >> 10) & 0x3F
436
+ if immr == 42 and imms == 44:
437
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (35 << 16) | (37 << 10))
438
+ elif immr == 22 and imms == 21:
439
+ put(off, (w & ~((0x3F << 16) | (0x3F << 10))) | (29 << 16) | (28 << 10))
440
+ for off in range(lo, hi - 4, 4):
441
+ if get(off) == 0x92D3800A and get(off + 4) == 0xF2E0000A:
442
+ put(off, 0x9280000A); put(off + 4, 0xD35DFD4A)
443
+ for off in range(lo, hi, 4):
444
+ if get(off) == 0xF2E00029: put(off, 0xD3596129)
445
+ word_rewrites = {
446
+ 0xD2C20009: 0xD2C00409, 0xD2C2000A: 0xD2C0040A, 0xF2C20008: 0xF2DFF408,
447
+ 0xF2C20009: 0xF2DFF409, 0xD2C10009: 0xD2C00209, 0xD2C1000A: 0xD2C0020A,
448
+ 0xF2C38008: 0xF2DFF708, 0xF2C38009: 0xF2DFF709, 0x92560A6C: 0x925D0A6C,
449
+ 0x92560A6A: 0x925D0A6A, 0xD2C3000D: 0xD2C0060D, 0xD2C3000C: 0xD2C0060C,
450
+ 0xD2C08008: 0xD2C00108,
451
+ }
452
+ for off in range(lo, hi, 4):
453
+ w = get(off)
454
+ if w in word_rewrites: put(off, word_rewrites[w])
455
+ for off in range(0, len(data) - 12, 4):
456
+ if get(off) == 0xAA1F03E5 and get(off + 4) == 0xAA1F03E6 and get(off + 8) == 0xD28036E0 and (get(off + 12) & 0xFC000000) == 0x94000000:
457
+ put(off + 8, 0xD2800600)
458
+ dst.write_bytes(data)
459
+ PY
460
+
461
+ chmod +x "${upstream_bin}.va39"
462
+ log_success "Antigravity CLI (proot-distro) updated"
463
+ return 0
464
+ }
465
+
466
+ reinstall_antigravity_cli() {
467
+ uninstall_antigravity_cli
468
+ install_antigravity_cli
469
+ }
@@ -0,0 +1,45 @@
1
+ # Claude Code
2
+
3
+ Anthropic's CLI tool with Claude AI
4
+
5
+ **Package:** claude-code
6
+ **Author:** israel676767
7
+ **Repository:** https://github.com/israel676767/omni
8
+ **Official:** https://github.com/anthropics/claude-code
9
+ **Type:** AI coding assistant (Binary + glibc bootstrapper)
10
+ **License:** MIT
11
+
12
+ ## Description
13
+
14
+ Claude Code is Anthropic's AI-powered coding assistant that runs directly in your terminal. It leverages Claude's advanced language models to help with code generation, debugging, refactoring, and answering technical questions. Omni Catalyst provides two installation methods: native with glibc support for best performance, or via proot-distro Ubuntu container.
15
+
16
+ ## Dependencies
17
+
18
+ - **Native mode:** glibc-repo, glibc, clang, curl, tar
19
+ - **Proot mode:** proot-distro, curl, ca-certificates
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ core install ai --claude-code
25
+ ```
26
+
27
+ ## Uninstall
28
+
29
+ ```bash
30
+ core uninstall ai --claude-code
31
+ ```
32
+
33
+ ## Update
34
+
35
+ ```bash
36
+ core update ai --claude-code
37
+ ```
38
+
39
+ ## Notes
40
+
41
+ - Native installation (recommended): runs directly with glibc support via a C bootstrapper
42
+ - Proot-distro (alternative): runs inside an Ubuntu container for compatibility
43
+ - The installer will prompt you to select which method to use
44
+ - Data directory: `~/.local/share/omni-data/claude/`
45
+
@@ -0,0 +1,29 @@
1
+ #!/data/data/com.termux/files/usr/bin/bash
2
+
3
+ UBUNTU_ROOTFS="__UBUNTU_ROOTFS__"
4
+
5
+ EXCLUDE_REGEX="^(PATH|LD_PRELOAD|LD_LIBRARY_PATH|PREFIX|HOME|PWD|OLDPWD|SHELL|IFS|_|SHLVL|PROMPT_COMMAND|TERMCAP|LS_COLORS|TERM)="
6
+
7
+ ENV_ARGS=()
8
+ while IFS= read -r line; do
9
+ if [[ -n "$line" && ! "$line" =~ $EXCLUDE_REGEX ]]; then
10
+ ENV_ARGS+=("--env" "$line")
11
+ fi
12
+ done < <(env)
13
+
14
+ ENV_ARGS+=(
15
+ "--env" "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
16
+ "--env" "TERM=$TERM"
17
+ "--env" "HOME=/root"
18
+ )
19
+
20
+ unset LD_PRELOAD
21
+ proot-distro login \
22
+ "${ENV_ARGS[@]}" \
23
+ --termux-home \
24
+ --shared-tmp \
25
+ --bind "$UBUNTU_ROOTFS/root/.local:/root/.local" \
26
+ --bind "$UBUNTU_ROOTFS/root/.claude:/root/.claude" \
27
+ --work-dir "$PWD" \
28
+ ubuntu \
29
+ -- /root/.local/bin/claude "$@"
@@ -0,0 +1,42 @@
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) return 1;
18
+ exec_path[len] = '\0';
19
+ char* dir = dirname(exec_path);
20
+
21
+ char* loader = "/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1";
22
+ char real_bin[] = "/data/data/com.termux/files/home/.local/share/omni-data/claude/claude";
23
+ char lib_path[] = "/data/data/com.termux/files/usr/glibc/lib";
24
+
25
+ char** new_argv = malloc((argc + 4) * sizeof(char*));
26
+ if (!new_argv) return 1;
27
+
28
+ new_argv[0] = loader;
29
+ new_argv[1] = "--library-path";
30
+ new_argv[2] = lib_path;
31
+ new_argv[3] = real_bin;
32
+
33
+ for (int i = 1; i < argc; i++)
34
+ new_argv[i + 3] = argv[i];
35
+ new_argv[argc + 3] = NULL;
36
+
37
+ execv(loader, new_argv);
38
+
39
+ perror("execv");
40
+ free(new_argv);
41
+ return 1;
42
+ }