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.
- package/LICENSE +21 -0
- package/README.md +1137 -0
- package/core/bin/core +85 -0
- package/core/bin/omni +21 -0
- package/core/cli/commands/--version.sh +8 -0
- package/core/cli/commands/brain.sh +1549 -0
- package/core/cli/commands/doctor.sh +834 -0
- package/core/cli/commands/env.sh +226 -0
- package/core/cli/commands/init.sh +1266 -0
- package/core/cli/commands/install.sh +759 -0
- package/core/cli/commands/list.sh +397 -0
- package/core/cli/commands/open.sh +71 -0
- package/core/cli/commands/pg.sh +761 -0
- package/core/cli/commands/reinstall.sh +694 -0
- package/core/cli/commands/show.sh +90 -0
- package/core/cli/commands/uninstall.sh +700 -0
- package/core/cli/commands/update.sh +754 -0
- package/core/cli/commands/voice.sh +170 -0
- package/core/cli/core.sh +82 -0
- package/core/cli/omni.sh +634 -0
- package/core/modules/ai.sh +152 -0
- package/core/modules/auto.sh +90 -0
- package/core/modules/db.sh +94 -0
- package/core/modules/deploy.sh +50 -0
- package/core/modules/dev.sh +126 -0
- package/core/modules/editor.sh +101 -0
- package/core/modules/lang.sh +100 -0
- package/core/modules/npm.sh +122 -0
- package/core/modules/shell.sh +312 -0
- package/core/modules/ui.sh +115 -0
- package/core/tools/ai/all.sh +63 -0
- package/core/tools/ai/antigravity-cli/README.md +45 -0
- package/core/tools/ai/antigravity-cli/bin/agy +28 -0
- package/core/tools/ai/antigravity-cli/helper/agy_helper.c +39 -0
- package/core/tools/ai/antigravity-cli/install.sh +469 -0
- package/core/tools/ai/claude-code/README.md +45 -0
- package/core/tools/ai/claude-code/bin/claude +29 -0
- package/core/tools/ai/claude-code/helper/claude_helper.c +42 -0
- package/core/tools/ai/claude-code/install.sh +278 -0
- package/core/tools/ai/codegraph/README.md +43 -0
- package/core/tools/ai/codegraph/bin/codegraph +3 -0
- package/core/tools/ai/codegraph/install.sh +149 -0
- package/core/tools/ai/codex/README.md +44 -0
- package/core/tools/ai/codex/install.sh +104 -0
- package/core/tools/ai/command-code/README.md +62 -0
- package/core/tools/ai/command-code/install.sh +136 -0
- package/core/tools/ai/engram/README.md +44 -0
- package/core/tools/ai/engram/install.sh +127 -0
- package/core/tools/ai/freebuff/README.md +52 -0
- package/core/tools/ai/freebuff/bin/freebuff +28 -0
- package/core/tools/ai/freebuff/helper/freebuff_helper.c +47 -0
- package/core/tools/ai/freebuff/install.sh +301 -0
- package/core/tools/ai/gemini-cli/README.md +46 -0
- package/core/tools/ai/gemini-cli/install.sh +111 -0
- package/core/tools/ai/gentle-ai/README.md +42 -0
- package/core/tools/ai/gentle-ai/install.sh +253 -0
- package/core/tools/ai/gentle-ai/termux-patches.go +256 -0
- package/core/tools/ai/gga/README.md +49 -0
- package/core/tools/ai/gga/install.sh +134 -0
- package/core/tools/ai/hermes-agent/README.md +50 -0
- package/core/tools/ai/hermes-agent/install.sh +80 -0
- package/core/tools/ai/heygen/README.md +24 -0
- package/core/tools/ai/heygen/install.sh +126 -0
- package/core/tools/ai/kilocode-cli/README.md +45 -0
- package/core/tools/ai/kilocode-cli/bin/kilocode +21 -0
- package/core/tools/ai/kilocode-cli/helper/kilocode_helper.c +47 -0
- package/core/tools/ai/kilocode-cli/install.sh +179 -0
- package/core/tools/ai/kimchi-code/README.md +8 -0
- package/core/tools/ai/kimchi-code/install.sh +120 -0
- package/core/tools/ai/kimi-code/README.md +45 -0
- package/core/tools/ai/kimi-code/install.sh +111 -0
- package/core/tools/ai/kiro-cli/README.md +23 -0
- package/core/tools/ai/kiro-cli/install.sh +127 -0
- package/core/tools/ai/mimocode/README.md +43 -0
- package/core/tools/ai/mimocode/bin/mimo +28 -0
- package/core/tools/ai/mimocode/helper/mimocode_helper.c +47 -0
- package/core/tools/ai/mimocode/install.sh +287 -0
- package/core/tools/ai/minimax-cli/README.md +45 -0
- package/core/tools/ai/minimax-cli/install.sh +111 -0
- package/core/tools/ai/mistral-vibe/README.md +46 -0
- package/core/tools/ai/mistral-vibe/install.sh +119 -0
- package/core/tools/ai/odysseus/README.md +35 -0
- package/core/tools/ai/odysseus/install.sh +163 -0
- package/core/tools/ai/ollama/README.md +44 -0
- package/core/tools/ai/ollama/install.sh +78 -0
- package/core/tools/ai/openclaude/README.md +46 -0
- package/core/tools/ai/openclaude/install.sh +110 -0
- package/core/tools/ai/openclaw/README.md +47 -0
- package/core/tools/ai/openclaw/install.sh +112 -0
- package/core/tools/ai/opencode/README.md +51 -0
- package/core/tools/ai/opencode/bin/opencode +28 -0
- package/core/tools/ai/opencode/helper/opencode_helper.c +57 -0
- package/core/tools/ai/opencode/install.sh +290 -0
- package/core/tools/ai/pi/README.md +46 -0
- package/core/tools/ai/pi/install.sh +104 -0
- package/core/tools/ai/qwen-code/README.md +45 -0
- package/core/tools/ai/qwen-code/install.sh +111 -0
- package/core/tools/ai/seedance/README.md +22 -0
- package/core/tools/ai/seedance/install.sh +134 -0
- package/core/tools/ai/veo3/README.md +36 -0
- package/core/tools/ai/veo3/install.sh +151 -0
- package/core/tools/auto/all.sh +57 -0
- package/core/tools/auto/n8n/README.md +47 -0
- package/core/tools/auto/n8n/install.sh +102 -0
- package/core/tools/db/all.sh +60 -0
- package/core/tools/db/mariadb/README.md +43 -0
- package/core/tools/db/mariadb/install.sh +65 -0
- package/core/tools/db/mongodb/README.md +42 -0
- package/core/tools/db/mongodb/install.sh +73 -0
- package/core/tools/db/postgresql/README.md +45 -0
- package/core/tools/db/postgresql/install.sh +65 -0
- package/core/tools/db/sqlite/README.md +44 -0
- package/core/tools/db/sqlite/install.sh +65 -0
- package/core/tools/deploy/all.sh +39 -0
- package/core/tools/deploy/netlify/install.sh +41 -0
- package/core/tools/deploy/railway/install.sh +47 -0
- package/core/tools/deploy/vercel/install.sh +43 -0
- package/core/tools/dev/all.sh +75 -0
- package/core/tools/dev/bat/README.md +44 -0
- package/core/tools/dev/bat/install.sh +82 -0
- package/core/tools/dev/bc/README.md +44 -0
- package/core/tools/dev/bc/install.sh +82 -0
- package/core/tools/dev/cloudflared/README.md +43 -0
- package/core/tools/dev/cloudflared/install.sh +82 -0
- package/core/tools/dev/curl/README.md +43 -0
- package/core/tools/dev/curl/install.sh +82 -0
- package/core/tools/dev/fzf/README.md +44 -0
- package/core/tools/dev/fzf/install.sh +82 -0
- package/core/tools/dev/gh/README.md +43 -0
- package/core/tools/dev/gh/install.sh +82 -0
- package/core/tools/dev/html2text/README.md +44 -0
- package/core/tools/dev/html2text/install.sh +82 -0
- package/core/tools/dev/imagemagick/README.md +44 -0
- package/core/tools/dev/imagemagick/install.sh +82 -0
- package/core/tools/dev/jq/README.md +44 -0
- package/core/tools/dev/jq/install.sh +82 -0
- package/core/tools/dev/lsd/README.md +44 -0
- package/core/tools/dev/lsd/install.sh +82 -0
- package/core/tools/dev/make/README.md +44 -0
- package/core/tools/dev/make/install.sh +82 -0
- package/core/tools/dev/ncurses/README.md +42 -0
- package/core/tools/dev/ncurses/install.sh +82 -0
- package/core/tools/dev/proot/README.md +43 -0
- package/core/tools/dev/proot/install.sh +82 -0
- package/core/tools/dev/shfmt/README.md +44 -0
- package/core/tools/dev/shfmt/install.sh +82 -0
- package/core/tools/dev/tmate/README.md +44 -0
- package/core/tools/dev/tmate/install.sh +82 -0
- package/core/tools/dev/translate/README.md +44 -0
- package/core/tools/dev/translate/install.sh +82 -0
- package/core/tools/dev/tree/README.md +44 -0
- package/core/tools/dev/tree/install.sh +82 -0
- package/core/tools/dev/udocker/README.md +44 -0
- package/core/tools/dev/udocker/install.sh +82 -0
- package/core/tools/dev/wget/README.md +44 -0
- package/core/tools/dev/wget/install.sh +82 -0
- package/core/tools/editor/all.sh +58 -0
- package/core/tools/editor/neovim/README.md +43 -0
- package/core/tools/editor/neovim/install.sh +66 -0
- package/core/tools/editor/nvchad/README.md +45 -0
- package/core/tools/editor/nvchad/install.sh +110 -0
- package/core/tools/lang/all.sh +63 -0
- package/core/tools/lang/clang/README.md +43 -0
- package/core/tools/lang/clang/install.sh +79 -0
- package/core/tools/lang/golang/README.md +43 -0
- package/core/tools/lang/golang/install.sh +79 -0
- package/core/tools/lang/nodejs/README.md +43 -0
- package/core/tools/lang/nodejs/install.sh +79 -0
- package/core/tools/lang/perl/README.md +43 -0
- package/core/tools/lang/perl/install.sh +79 -0
- package/core/tools/lang/php/README.md +43 -0
- package/core/tools/lang/php/install.sh +79 -0
- package/core/tools/lang/python/README.md +43 -0
- package/core/tools/lang/python/install.sh +79 -0
- package/core/tools/lang/rust/README.md +43 -0
- package/core/tools/lang/rust/install.sh +79 -0
- package/core/tools/npm/all.sh +67 -0
- package/core/tools/npm/live-server/README.md +43 -0
- package/core/tools/npm/live-server/install.sh +95 -0
- package/core/tools/npm/localtunnel/README.md +43 -0
- package/core/tools/npm/localtunnel/install.sh +111 -0
- package/core/tools/npm/markserv/README.md +43 -0
- package/core/tools/npm/markserv/install.sh +94 -0
- package/core/tools/npm/ncu/README.md +43 -0
- package/core/tools/npm/ncu/install.sh +94 -0
- package/core/tools/npm/nestjs/README.md +43 -0
- package/core/tools/npm/nestjs/install.sh +94 -0
- package/core/tools/npm/ngrok/README.md +44 -0
- package/core/tools/npm/ngrok/install.sh +94 -0
- package/core/tools/npm/prettier/README.md +43 -0
- package/core/tools/npm/prettier/install.sh +94 -0
- package/core/tools/npm/psqlformat/README.md +43 -0
- package/core/tools/npm/psqlformat/install.sh +94 -0
- package/core/tools/npm/turbopack/README.md +8 -0
- package/core/tools/npm/turbopack/install.sh +41 -0
- package/core/tools/npm/typescript/README.md +43 -0
- package/core/tools/npm/typescript/install.sh +94 -0
- package/core/tools/npm/vercel/README.md +43 -0
- package/core/tools/npm/vercel/install.sh +94 -0
- package/core/tools/shell/all.sh +67 -0
- package/core/tools/shell/better-npm/README.md +43 -0
- package/core/tools/shell/better-npm/install.sh +85 -0
- package/core/tools/shell/fzf-tab/README.md +44 -0
- package/core/tools/shell/fzf-tab/install.sh +85 -0
- package/core/tools/shell/history-substring/README.md +43 -0
- package/core/tools/shell/history-substring/install.sh +85 -0
- package/core/tools/shell/powerlevel10k/README.md +43 -0
- package/core/tools/shell/powerlevel10k/install.sh +85 -0
- package/core/tools/shell/you-should-use/README.md +43 -0
- package/core/tools/shell/you-should-use/install.sh +85 -0
- package/core/tools/shell/zsh-autopair/README.md +44 -0
- package/core/tools/shell/zsh-autopair/install.sh +85 -0
- package/core/tools/shell/zsh-autosuggestions/README.md +43 -0
- package/core/tools/shell/zsh-autosuggestions/install.sh +85 -0
- package/core/tools/shell/zsh-completions/README.md +43 -0
- package/core/tools/shell/zsh-completions/install.sh +85 -0
- package/core/tools/shell/zsh-defer/README.md +43 -0
- package/core/tools/shell/zsh-defer/install.sh +85 -0
- package/core/tools/shell/zsh-syntax-highlighting/README.md +43 -0
- package/core/tools/shell/zsh-syntax-highlighting/install.sh +72 -0
- package/core/tools/ui/all.sh +61 -0
- package/core/tools/ui/banner/README.md +42 -0
- package/core/tools/ui/banner/install.sh +151 -0
- package/core/tools/ui/cursor/README.md +42 -0
- package/core/tools/ui/cursor/install.sh +58 -0
- package/core/tools/ui/extra-keys/README.md +43 -0
- package/core/tools/ui/extra-keys/install.sh +62 -0
- package/core/tools/ui/font/README.md +43 -0
- package/core/tools/ui/font/install.sh +63 -0
- package/core/utils/banner.sh +519 -0
- package/core/utils/bootstrap.sh +25 -0
- package/core/utils/colors.sh +31 -0
- package/core/utils/dialogrc +30 -0
- package/core/utils/env.sh +53 -0
- package/core/utils/log.sh +598 -0
- package/install.sh +272 -0
- package/package.json +43 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
import "@/utils/colors"
|
|
5
|
+
|
|
6
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
7
|
+
CLAUDE_DATA_DIR="$HOME/.local/share/omni-data/claude"
|
|
8
|
+
|
|
9
|
+
_claude_detect_ubuntu_root() {
|
|
10
|
+
local root
|
|
11
|
+
root="$(find /data/data/com.termux -maxdepth 10 -type d \
|
|
12
|
+
-name "rootfs" -path "*/containers/ubuntu/*" 2>/dev/null | head -1)"
|
|
13
|
+
|
|
14
|
+
if [ -z "$root" ]; then
|
|
15
|
+
root="$(find /data/data/com.termux -maxdepth 10 -type d \
|
|
16
|
+
-name "ubuntu" -path "*/installed-rootfs/*" 2>/dev/null | head -1)"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
echo "$root"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_claude_proot_ubuntu() {
|
|
23
|
+
proot-distro login \
|
|
24
|
+
--shared-tmp \
|
|
25
|
+
ubuntu \
|
|
26
|
+
-- "$@"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_get_latest_claude_version() {
|
|
30
|
+
curl -fsSL https://api.github.com/repos/anthropics/claude-code/releases/latest |
|
|
31
|
+
grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_claude_install_deps_native() {
|
|
35
|
+
loading "Installing glibc and dependencies" _claude_install_deps_native_impl
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
_claude_install_deps_native_impl() {
|
|
39
|
+
if [[ ! -f $PREFIX/etc/apt/sources.list.d/glibc.list ]]; then
|
|
40
|
+
if ! pkg install glibc-repo -y &>>"$LOG_FILE"; then
|
|
41
|
+
log_error "Failed to install glibc-repo"
|
|
42
|
+
return 1
|
|
43
|
+
fi
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
if [[ ! -f $PREFIX/glibc/lib/libc.so.6 ]]; then
|
|
47
|
+
if ! pkg install glibc -y &>>"$LOG_FILE"; then
|
|
48
|
+
log_error "Failed to install glibc"
|
|
49
|
+
return 1
|
|
50
|
+
fi
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
declare -A DEPS=(
|
|
54
|
+
["clang"]="clang"
|
|
55
|
+
["curl"]="curl"
|
|
56
|
+
["tar"]="tar"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
local pkg_name bin_name
|
|
60
|
+
for pkg_name in "${!DEPS[@]}"; do
|
|
61
|
+
bin_name="${DEPS[$pkg_name]}"
|
|
62
|
+
if [[ -n "$bin_name" ]] && command -v "$bin_name" &>/dev/null; then
|
|
63
|
+
continue
|
|
64
|
+
fi
|
|
65
|
+
if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
|
|
66
|
+
log_error "Failed to install $pkg_name"
|
|
67
|
+
return 1
|
|
68
|
+
fi
|
|
69
|
+
done
|
|
70
|
+
|
|
71
|
+
return 0
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
_download_claude_binary() {
|
|
75
|
+
loading "Downloading Claude Code" _download_claude_binary_impl
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_download_claude_binary_impl() {
|
|
79
|
+
local latest_version
|
|
80
|
+
latest_version=$(_get_latest_claude_version)
|
|
81
|
+
if [ -z "$latest_version" ]; then
|
|
82
|
+
log_error "Failed to fetch latest Claude Code version"
|
|
83
|
+
return 1
|
|
84
|
+
fi
|
|
85
|
+
|
|
86
|
+
mkdir -p "$CLAUDE_DATA_DIR"
|
|
87
|
+
|
|
88
|
+
local tarball="claude-linux-arm64.tar.gz"
|
|
89
|
+
local download_url="https://github.com/anthropics/claude-code/releases/download/$latest_version/$tarball"
|
|
90
|
+
|
|
91
|
+
if ! curl -fsSL "$download_url" -o "$CLAUDE_DATA_DIR/$tarball" &>>"$LOG_FILE"; then
|
|
92
|
+
log_error "Failed to download Claude Code binary"
|
|
93
|
+
return 1
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
if ! tar -zxf "$CLAUDE_DATA_DIR/$tarball" -C "$CLAUDE_DATA_DIR" &>>"$LOG_FILE"; then
|
|
97
|
+
log_error "Failed to extract Claude Code binary"
|
|
98
|
+
return 1
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
rm -f "$CLAUDE_DATA_DIR/$tarball"
|
|
102
|
+
|
|
103
|
+
if [ ! -f "$CLAUDE_DATA_DIR/claude" ]; then
|
|
104
|
+
log_error "Claude Code binary not found after extraction"
|
|
105
|
+
return 1
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
chmod +x "$CLAUDE_DATA_DIR/claude"
|
|
109
|
+
return 0
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
_compile_claude_helper() {
|
|
113
|
+
loading "Compiling helper" _compile_claude_helper_impl
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
_compile_claude_helper_impl() {
|
|
117
|
+
local HELPER_SRC="$OMNI_PATH/tools/ai/claude-code/helper/claude_helper.c"
|
|
118
|
+
if [ ! -f "$HELPER_SRC" ]; then
|
|
119
|
+
log_error "Helper source not found at $HELPER_SRC"
|
|
120
|
+
return 1
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
if ! clang -O2 -o "$PREFIX/bin/claude" "$HELPER_SRC" &>>"$LOG_FILE"; then
|
|
124
|
+
log_error "Failed to compile claude helper"
|
|
125
|
+
return 1
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
chmod +x "$PREFIX/bin/claude"
|
|
129
|
+
return 0
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
_install_claude_native() {
|
|
133
|
+
_claude_install_deps_native || return 1
|
|
134
|
+
_download_claude_binary || return 1
|
|
135
|
+
_compile_claude_helper || return 1
|
|
136
|
+
log_success "Claude Code installed natively"
|
|
137
|
+
return 0
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
_install_claude_proot() {
|
|
141
|
+
loading "Installing Claude Code (proot-distro)" _install_claude_proot_impl
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_install_claude_proot_impl() {
|
|
145
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
146
|
+
|
|
147
|
+
if ! command -v proot-distro &>/dev/null; then
|
|
148
|
+
pkg install proot-distro -y &>>"$LOG_FILE"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
if [ ! -d "$(_claude_detect_ubuntu_root)" ]; then
|
|
152
|
+
proot-distro install ubuntu &>>"$LOG_FILE"
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
_claude_proot_ubuntu /bin/bash -c \
|
|
156
|
+
'apt-get update && apt-get upgrade -y && apt-get install -y curl ca-certificates' \
|
|
157
|
+
&>>"$LOG_FILE"
|
|
158
|
+
|
|
159
|
+
_claude_proot_ubuntu /bin/bash -c '
|
|
160
|
+
export SHELL=/bin/bash
|
|
161
|
+
export TMPDIR=/tmp
|
|
162
|
+
export HOME=/root
|
|
163
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
164
|
+
' &>>"$LOG_FILE"
|
|
165
|
+
|
|
166
|
+
local ubuntu_root
|
|
167
|
+
ubuntu_root="$(_claude_detect_ubuntu_root)"
|
|
168
|
+
|
|
169
|
+
if [ -z "$ubuntu_root" ]; then
|
|
170
|
+
log_error "Ubuntu rootfs not found"
|
|
171
|
+
return 1
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
if ! _claude_proot_ubuntu test -x /root/.local/bin/claude &>>"$LOG_FILE"; then
|
|
175
|
+
log_error "Claude Code binary not found after install"
|
|
176
|
+
return 1
|
|
177
|
+
fi
|
|
178
|
+
|
|
179
|
+
local wrapper_src="$OMNI_PATH/tools/ai/claude-code/bin/claude"
|
|
180
|
+
if [ ! -f "$wrapper_src" ]; then
|
|
181
|
+
log_error "Wrapper template not found at $wrapper_src"
|
|
182
|
+
return 1
|
|
183
|
+
fi
|
|
184
|
+
sed "s|__UBUNTU_ROOTFS__|$ubuntu_root|g" "$wrapper_src" >"$PREFIX/bin/claude"
|
|
185
|
+
chmod +x "$PREFIX/bin/claude"
|
|
186
|
+
|
|
187
|
+
if ! grep -q '.local/bin' "$ubuntu_root/root/.bashrc" 2>/dev/null; then
|
|
188
|
+
printf '\n# claude-code\nexport PATH=/root/.local/bin:$PATH\n' >>"$ubuntu_root/root/.bashrc"
|
|
189
|
+
fi
|
|
190
|
+
|
|
191
|
+
return 0
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
install_claude_code() {
|
|
195
|
+
if command -v claude &>/dev/null; then
|
|
196
|
+
log_info "Claude Code is already installed"
|
|
197
|
+
return 2
|
|
198
|
+
fi
|
|
199
|
+
|
|
200
|
+
log_info "Select installation method for Claude Code:"
|
|
201
|
+
|
|
202
|
+
read_select "Installation method" SELECTED_METHOD \
|
|
203
|
+
"Native (recommended) - Run with glibc support" \
|
|
204
|
+
"Proot-distro (alternative) - Ubuntu container"
|
|
205
|
+
|
|
206
|
+
case "$SELECTED_METHOD" in
|
|
207
|
+
*Native*)
|
|
208
|
+
_install_claude_native
|
|
209
|
+
;;
|
|
210
|
+
*Proot-distro*)
|
|
211
|
+
_install_claude_proot
|
|
212
|
+
;;
|
|
213
|
+
esac
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
uninstall_claude_code() {
|
|
217
|
+
log_info "Uninstalling Claude Code..."
|
|
218
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
219
|
+
|
|
220
|
+
if [ ! -f "$PREFIX/bin/claude" ]; then
|
|
221
|
+
log_warn "Claude Code is not installed"
|
|
222
|
+
return 1
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
if [ -f "$CLAUDE_DATA_DIR/claude" ]; then
|
|
226
|
+
rm -f "$PREFIX/bin/claude"
|
|
227
|
+
rm -rf "$CLAUDE_DATA_DIR"
|
|
228
|
+
log_success "Claude Code (native) uninstalled"
|
|
229
|
+
return 0
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
_claude_proot_ubuntu /bin/bash -c \
|
|
233
|
+
'rm -f /root/.local/bin/claude && rm -rf /root/.claude && rm -rf /root/.local/share/claude' \
|
|
234
|
+
&>>"$LOG_FILE"
|
|
235
|
+
|
|
236
|
+
local ubuntu_bashrc
|
|
237
|
+
ubuntu_bashrc="$(_claude_detect_ubuntu_root)/root/.bashrc"
|
|
238
|
+
|
|
239
|
+
if [ -f "$ubuntu_bashrc" ]; then
|
|
240
|
+
sed -i '/# claude-code/d; /export PATH=\/root\/.local\/bin/d' "$ubuntu_bashrc"
|
|
241
|
+
fi
|
|
242
|
+
|
|
243
|
+
if rm -f "$PREFIX/bin/claude" &>>"$LOG_FILE"; then
|
|
244
|
+
log_success "Claude Code (proot-distro) uninstalled"
|
|
245
|
+
return 0
|
|
246
|
+
else
|
|
247
|
+
log_error "Failed to uninstall Claude Code"
|
|
248
|
+
return 1
|
|
249
|
+
fi
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
update_claude_code() {
|
|
253
|
+
log_info "Updating Claude Code..."
|
|
254
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
255
|
+
|
|
256
|
+
if [ -f "$CLAUDE_DATA_DIR/claude" ]; then
|
|
257
|
+
_install_claude_native
|
|
258
|
+
return $?
|
|
259
|
+
fi
|
|
260
|
+
|
|
261
|
+
_claude_proot_ubuntu /bin/bash -c '
|
|
262
|
+
export HOME=/root
|
|
263
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
264
|
+
' &>>"$LOG_FILE"
|
|
265
|
+
|
|
266
|
+
if ! _claude_proot_ubuntu test -x /root/.local/bin/claude &>>"$LOG_FILE"; then
|
|
267
|
+
log_error "Claude Code binary not found after update"
|
|
268
|
+
return 1
|
|
269
|
+
fi
|
|
270
|
+
|
|
271
|
+
log_success "Claude Code (proot-distro) updated"
|
|
272
|
+
return 0
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
reinstall_claude_code() {
|
|
276
|
+
uninstall_claude_code
|
|
277
|
+
install_claude_code
|
|
278
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# CodeGraph
|
|
2
|
+
|
|
3
|
+
Analyzes your codebase structure and dependencies to improve navigation
|
|
4
|
+
|
|
5
|
+
**Package:** codegraph
|
|
6
|
+
**Author:** israel676767
|
|
7
|
+
**Repository:** https://github.com/israel676767/omni
|
|
8
|
+
**Official:** https://github.com/colbymchenry/codegraph
|
|
9
|
+
**Type:** Code analysis tool (Binary)
|
|
10
|
+
**License:** MIT
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
CodeGraph analyzes your codebase structure and dependencies to improve navigation. It generates interactive graphs showing relationships between files, functions, classes, and modules, making it easier to navigate and refactor large projects.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- nodejs-lts, ripgrep, sqlite, git, python, clang, make, curl
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
core install ai --codegraph
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
core uninstall ai --codegraph
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Update
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
core update ai --codegraph
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- Downloads the latest ARM64 binary from GitHub releases
|
|
41
|
+
- Wrapper script installed to `$PREFIX/bin/codegraph`
|
|
42
|
+
- Data stored in `$OMNI_DATA/codegraph-linux-arm64/`
|
|
43
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
import "@/utils/log"
|
|
3
|
+
|
|
4
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
5
|
+
|
|
6
|
+
_codegraph_dependencies() {
|
|
7
|
+
loading "Installing dependencies" _codegraph_dependencies_impl
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
_codegraph_dependencies_impl() {
|
|
11
|
+
declare -A DEPS=(
|
|
12
|
+
["nodejs-lts"]="node"
|
|
13
|
+
["ripgrep"]="rg"
|
|
14
|
+
["sqlite"]="sqlite"
|
|
15
|
+
["git"]="git"
|
|
16
|
+
["python"]="python"
|
|
17
|
+
["clang"]="clang"
|
|
18
|
+
["make"]="make"
|
|
19
|
+
["curl"]="curl"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
local pkg_name bin_name
|
|
23
|
+
for pkg_name in "${!DEPS[@]}"; do
|
|
24
|
+
bin_name="${DEPS[$pkg_name]}"
|
|
25
|
+
if ! command -v "$bin_name" &>/dev/null; then
|
|
26
|
+
if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
|
|
27
|
+
log_error "Failed to install $pkg_name"
|
|
28
|
+
return 1
|
|
29
|
+
fi
|
|
30
|
+
fi
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
return 0
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_download_codegraph() {
|
|
37
|
+
loading "Downloading CodeGraph" _download_codegraph_impl
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_download_codegraph_impl() {
|
|
41
|
+
LATEST_VERSION=$(curl -sI https://github.com/colbymchenry/codegraph/releases/latest | grep -i location | sed -E 's#.*/tag/([^[:space:]]+).*#\1#')
|
|
42
|
+
|
|
43
|
+
if [ -z "$LATEST_VERSION" ]; then
|
|
44
|
+
log_error "Failed to fetch latest CodeGraph version"
|
|
45
|
+
return 1
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
if ! curl -L https://github.com/colbymchenry/codegraph/releases/download/${LATEST_VERSION}/codegraph-linux-arm64.tar.gz -o $PREFIX/tmp/codegraph-linux-arm64.tar.gz &>>"$LOG_FILE"; then
|
|
49
|
+
log_error "Failed to download CodeGraph"
|
|
50
|
+
return 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
if ! tar -xzf $PREFIX/tmp/codegraph-linux-arm64.tar.gz -C "$OMNI_DATA" &>>"$LOG_FILE"; then
|
|
54
|
+
log_error "Failed to extract CodeGraph"
|
|
55
|
+
return 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
rm -f $PREFIX/tmp/codegraph-linux-arm64.tar.gz
|
|
59
|
+
|
|
60
|
+
return 0
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
_write_codegraph_wrapper() {
|
|
64
|
+
loading "Creating CodeGraph wrapper" _write_codegraph_wrapper_impl
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
_write_codegraph_wrapper_impl() {
|
|
68
|
+
local wrapper_src="$OMNI_PATH/tools/ai/codegraph/bin/codegraph"
|
|
69
|
+
if [ ! -f "$wrapper_src" ]; then
|
|
70
|
+
log_error "Wrapper template not found at $wrapper_src"
|
|
71
|
+
return 1
|
|
72
|
+
fi
|
|
73
|
+
cp "$wrapper_src" "$PREFIX/bin/codegraph"
|
|
74
|
+
chmod +x "$PREFIX/bin/codegraph"
|
|
75
|
+
|
|
76
|
+
return 0
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
install_codegraph() {
|
|
80
|
+
if command -v codegraph &>/dev/null; then
|
|
81
|
+
log_info "CodeGraph is already installed"
|
|
82
|
+
return 2
|
|
83
|
+
fi
|
|
84
|
+
log_info "Installing CodeGraph..."
|
|
85
|
+
|
|
86
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
87
|
+
|
|
88
|
+
_codegraph_dependencies || return 1
|
|
89
|
+
_download_codegraph || return 1
|
|
90
|
+
_write_codegraph_wrapper || return 1
|
|
91
|
+
|
|
92
|
+
log_success "CodeGraph installed"
|
|
93
|
+
return 0
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
uninstall_codegraph() {
|
|
97
|
+
if ! command -v codegraph &>/dev/null; then
|
|
98
|
+
log_info "CodeGraph is not installed"
|
|
99
|
+
return 2
|
|
100
|
+
fi
|
|
101
|
+
log_info "Uninstalling CodeGraph..."
|
|
102
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
103
|
+
|
|
104
|
+
loading "Removing CodeGraph" _uninstall_codegraph_impl
|
|
105
|
+
|
|
106
|
+
log_success "CodeGraph uninstalled"
|
|
107
|
+
return 0
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_uninstall_codegraph_impl() {
|
|
111
|
+
if rm -rf "$OMNI_DATA/codegraph-linux-arm64" && rm -f "$PREFIX/bin/codegraph" &>>"$LOG_FILE"; then
|
|
112
|
+
return 0
|
|
113
|
+
else
|
|
114
|
+
log_error "Failed to uninstall CodeGraph"
|
|
115
|
+
return 1
|
|
116
|
+
fi
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
update_codegraph() {
|
|
120
|
+
log_info "Updating CodeGraph..."
|
|
121
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
122
|
+
|
|
123
|
+
loading "Removing old CodeGraph" _update_codegraph_remove_impl
|
|
124
|
+
_codegraph_dependencies || return 1
|
|
125
|
+
_download_codegraph || return 1
|
|
126
|
+
_write_codegraph_wrapper || return 1
|
|
127
|
+
|
|
128
|
+
log_success "CodeGraph updated"
|
|
129
|
+
return 0
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
_update_codegraph_remove_impl() {
|
|
133
|
+
if ! rm -rf "$OMNI_DATA/codegraph-linux-arm64" &>>"$LOG_FILE"; then
|
|
134
|
+
log_error "Failed to remove old CodeGraph installation"
|
|
135
|
+
return 1
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
if ! rm -f "$PREFIX/bin/codegraph" &>>"$LOG_FILE"; then
|
|
139
|
+
log_error "Failed to remove old CodeGraph wrapper"
|
|
140
|
+
return 1
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
return 0
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
reinstall_codegraph() {
|
|
147
|
+
uninstall_codegraph
|
|
148
|
+
install_codegraph
|
|
149
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Codex CLI
|
|
2
|
+
|
|
3
|
+
Codex CLI is a coding agent from OpenAI that runs locally on your computer
|
|
4
|
+
|
|
5
|
+
**Package:** codex
|
|
6
|
+
**Author:** israel676767
|
|
7
|
+
**Repository:** https://github.com/israel676767/omni
|
|
8
|
+
**Official:** https://github.com/openai/codex
|
|
9
|
+
**Type:** AI coding assistant (npm global package)
|
|
10
|
+
**License:** MIT
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Codex CLI is a coding agent from OpenAI that runs locally on your computer. It provides intelligent code suggestions and completions directly in your terminal.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Node.js LTS (nodejs-lts)
|
|
19
|
+
- npm
|
|
20
|
+
- git, ripgrep
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
core install ai --codex
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
core uninstall ai --codex
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
core update ai --codex
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Installed as a global npm package: `@mmmbuto/codex-cli-termux`
|
|
43
|
+
- Command: `codex`
|
|
44
|
+
- Requires Node.js LTS (installed automatically if missing)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
6
|
+
|
|
7
|
+
_codex_dependencies() {
|
|
8
|
+
loading "Installing dependencies" _codex_dependencies_impl
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
_codex_dependencies_impl() {
|
|
12
|
+
declare -A DEPS=(
|
|
13
|
+
["nodejs-lts"]="node"
|
|
14
|
+
["git"]="git"
|
|
15
|
+
["ripgrep"]="rg"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
local pkg_name bin_name
|
|
19
|
+
for pkg_name in "${!DEPS[@]}"; do
|
|
20
|
+
bin_name="${DEPS[$pkg_name]}"
|
|
21
|
+
if ! command -v "$bin_name" &>/dev/null; then
|
|
22
|
+
if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
|
|
23
|
+
log_error "Failed to install $pkg_name"
|
|
24
|
+
return 1
|
|
25
|
+
fi
|
|
26
|
+
fi
|
|
27
|
+
done
|
|
28
|
+
|
|
29
|
+
return 0
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
_install_codex_npm() {
|
|
33
|
+
loading "Installing Codex CLI" _install_codex_npm_impl
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_install_codex_npm_impl() {
|
|
37
|
+
if ! npm i -g @mmmbuto/codex-cli-termux@latest &>>"$LOG_FILE"; then
|
|
38
|
+
log_error "Failed to install Codex CLI"
|
|
39
|
+
return 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
return 0
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
install_codex() {
|
|
46
|
+
if command -v codex &>/dev/null; then
|
|
47
|
+
log_info "Codex CLI is already installed"
|
|
48
|
+
return 2
|
|
49
|
+
fi
|
|
50
|
+
log_info "Installing Codex CLI..."
|
|
51
|
+
|
|
52
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
53
|
+
|
|
54
|
+
_codex_dependencies || return 1
|
|
55
|
+
_install_codex_npm || return 1
|
|
56
|
+
|
|
57
|
+
log_success "Codex CLI installed"
|
|
58
|
+
return 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
uninstall_codex() {
|
|
62
|
+
if ! command -v codex &>/dev/null; then
|
|
63
|
+
log_info "Codex CLI is not installed"
|
|
64
|
+
return 2
|
|
65
|
+
fi
|
|
66
|
+
log_info "Uninstalling Codex CLI..."
|
|
67
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
68
|
+
|
|
69
|
+
loading "Removing Codex CLI" _uninstall_codex_impl
|
|
70
|
+
|
|
71
|
+
log_success "Codex CLI uninstalled"
|
|
72
|
+
return 0
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
_uninstall_codex_impl() {
|
|
76
|
+
if ! npm uninstall -g @mmmbuto/codex-cli-termux &>>"$LOG_FILE"; then
|
|
77
|
+
log_error "Failed to uninstall Codex CLI"
|
|
78
|
+
return 1
|
|
79
|
+
fi
|
|
80
|
+
return 0
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
update_codex() {
|
|
84
|
+
log_info "Updating Codex CLI..."
|
|
85
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
86
|
+
|
|
87
|
+
loading "Updating Codex CLI" _update_codex_impl
|
|
88
|
+
|
|
89
|
+
log_success "Codex CLI updated"
|
|
90
|
+
return 0
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_update_codex_impl() {
|
|
94
|
+
if ! npm update -g @mmmbuto/codex-cli-termux &>>"$LOG_FILE"; then
|
|
95
|
+
log_error "Failed to update Codex CLI"
|
|
96
|
+
return 1
|
|
97
|
+
fi
|
|
98
|
+
return 0
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
reinstall_codex() {
|
|
102
|
+
uninstall_codex
|
|
103
|
+
install_codex
|
|
104
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Command Code
|
|
2
|
+
|
|
3
|
+
The coding agent that learns your coding taste.
|
|
4
|
+
|
|
5
|
+
**Package:** command-code
|
|
6
|
+
**Author:** israel676767
|
|
7
|
+
**Repository:** https://github.com/israel676767/omni
|
|
8
|
+
**Official:** https://github.com/CommandCodeAI/command-code
|
|
9
|
+
**Type:** AI coding assistant (npm local package with wrapper)
|
|
10
|
+
**License:** MIT
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
The first frontier coding agent that both builds software and continuously learns your coding taste. Ships full-stack projects, features, fixes bugs, writes tests, and refactors, all while learning how you write code.
|
|
15
|
+
|
|
16
|
+
## Why Local Install?
|
|
17
|
+
|
|
18
|
+
On Termux, the global `npm install -g command-code` creates a binary named `cmd` which conflicts with the existing Termux `cmd` binary. Omni Catalyst solves this by:
|
|
19
|
+
|
|
20
|
+
1. Installing `command-code` locally in `~/.local/share/omni-data/command-code/`
|
|
21
|
+
2. Creating a wrapper script at `$PREFIX/bin/command-code`
|
|
22
|
+
3. Adding an alias `cmdc` via symlink
|
|
23
|
+
|
|
24
|
+
## Dependencies
|
|
25
|
+
|
|
26
|
+
- Node.js LTS (nodejs-lts)
|
|
27
|
+
- npm
|
|
28
|
+
- git
|
|
29
|
+
- ripgrep
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
core install ai --command-code
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Uninstall
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
core uninstall ai --command-code
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Update
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
core update ai --command-code
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Commands
|
|
50
|
+
|
|
51
|
+
| Command | Description |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `command-code` | Run Command Code |
|
|
54
|
+
| `cmdc` | Alias for command-code |
|
|
55
|
+
|
|
56
|
+
## Notes
|
|
57
|
+
|
|
58
|
+
- Installed as a local npm package (avoids `cmd` binary conflict)
|
|
59
|
+
- Wrapper script created at `$PREFIX/bin/command-code`
|
|
60
|
+
- Alias `cmdc` created via symlink
|
|
61
|
+
- Data directory: `~/.local/share/omni-data/command-code/`
|
|
62
|
+
- Requires Node.js LTS (installed automatically if missing)
|