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,57 @@
|
|
|
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
|
+
// 1. Clear conflicting Android Bionic preloads and search paths
|
|
10
|
+
unsetenv("LD_PRELOAD");
|
|
11
|
+
unsetenv("LD_LIBRARY_PATH");
|
|
12
|
+
|
|
13
|
+
// 2. Set dynamic Go resolver and SSL configurations for Termux environment
|
|
14
|
+
setenv("GODEBUG", "netdns=cgo", 1);
|
|
15
|
+
setenv("SSL_CERT_FILE", "/data/data/com.termux/files/usr/etc/tls/cert.pem", 1);
|
|
16
|
+
|
|
17
|
+
// 3. Resolve current executable directory
|
|
18
|
+
char exec_path[PATH_MAX];
|
|
19
|
+
ssize_t len = readlink("/proc/self/exe", exec_path, sizeof(exec_path) - 1);
|
|
20
|
+
if (len == -1) {
|
|
21
|
+
return 1;
|
|
22
|
+
}
|
|
23
|
+
exec_path[len] = '\0';
|
|
24
|
+
char* dir = dirname(exec_path);
|
|
25
|
+
|
|
26
|
+
// 4. Construct paths for the glibc loader and the real binary
|
|
27
|
+
// In our deb structure, opencode.real is in /usr/share/opencode/
|
|
28
|
+
// This bootstrapper is usually in /usr/bin/
|
|
29
|
+
char* loader = "/data/data/com.termux/files/usr/glibc/lib/ld-linux-aarch64.so.1";
|
|
30
|
+
char real_bin[] = "/data/data/com.termux/files/home/.local/share/omni-data/opencode/opencode";
|
|
31
|
+
char lib_path[] = "/data/data/com.termux/files/usr/glibc/lib";
|
|
32
|
+
|
|
33
|
+
// 5. Construct argument array for execv
|
|
34
|
+
// Format: [loader, --library-path, lib_path, real_bin, ...original_args]
|
|
35
|
+
char** new_argv = malloc((argc + 4) * sizeof(char*));
|
|
36
|
+
if (!new_argv) {
|
|
37
|
+
return 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
new_argv[0] = loader;
|
|
41
|
+
new_argv[1] = "--library-path";
|
|
42
|
+
new_argv[2] = lib_path;
|
|
43
|
+
new_argv[3] = real_bin;
|
|
44
|
+
|
|
45
|
+
for (int i = 1; i < argc; i++) {
|
|
46
|
+
new_argv[i + 3] = argv[i];
|
|
47
|
+
}
|
|
48
|
+
new_argv[argc + 3] = NULL;
|
|
49
|
+
|
|
50
|
+
// 6. Execute the glibc loader to run the real binary
|
|
51
|
+
execv(loader, new_argv);
|
|
52
|
+
|
|
53
|
+
// If execv returns, an error occurred
|
|
54
|
+
perror("execv");
|
|
55
|
+
free(new_argv);
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
import "@/utils/colors"
|
|
5
|
+
|
|
6
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
7
|
+
OPENCODE_DATA_DIR="$HOME/.local/share/omni-data/opencode"
|
|
8
|
+
|
|
9
|
+
_opencode_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
|
+
_opencode_proot_ubuntu() {
|
|
23
|
+
proot-distro login \
|
|
24
|
+
--shared-tmp \
|
|
25
|
+
ubuntu \
|
|
26
|
+
-- "$@"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_get_latest_opencode_version() {
|
|
30
|
+
curl -fsSL https://api.github.com/repos/anomalyco/opencode/releases/latest |
|
|
31
|
+
grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_opencode_install_deps_native() {
|
|
35
|
+
loading "Installing glibc and dependencies" _opencode_install_deps_native_impl
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
_opencode_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
|
+
["git"]="git"
|
|
55
|
+
["ripgrep"]="rg"
|
|
56
|
+
["python"]="python"
|
|
57
|
+
["clang"]="clang"
|
|
58
|
+
["jq"]="jq"
|
|
59
|
+
["nodejs-lts"]="node"
|
|
60
|
+
["curl"]="curl"
|
|
61
|
+
["tar"]="tar"
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
local pkg_name bin_name
|
|
65
|
+
for pkg_name in "${!DEPS[@]}"; do
|
|
66
|
+
bin_name="${DEPS[$pkg_name]}"
|
|
67
|
+
if ! command -v "$bin_name" &>/dev/null; then
|
|
68
|
+
if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
|
|
69
|
+
log_error "Failed to install $pkg_name"
|
|
70
|
+
return 1
|
|
71
|
+
fi
|
|
72
|
+
fi
|
|
73
|
+
done
|
|
74
|
+
|
|
75
|
+
return 0
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_download_opencode_binary() {
|
|
79
|
+
loading "Downloading OpenCode" _download_opencode_binary_impl
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
_download_opencode_binary_impl() {
|
|
83
|
+
local latest_version
|
|
84
|
+
latest_version=$(_get_latest_opencode_version)
|
|
85
|
+
if [ -z "$latest_version" ]; then
|
|
86
|
+
log_error "Failed to fetch latest OpenCode version"
|
|
87
|
+
return 1
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
mkdir -p "$OPENCODE_DATA_DIR"
|
|
91
|
+
|
|
92
|
+
local tarball="opencode-linux-arm64.tar.gz"
|
|
93
|
+
local download_url="https://github.com/anomalyco/opencode/releases/download/$latest_version/$tarball"
|
|
94
|
+
|
|
95
|
+
if ! curl -fsSL "$download_url" -o "$OPENCODE_DATA_DIR/$tarball" &>>"$LOG_FILE"; then
|
|
96
|
+
log_error "Failed to download OpenCode binary"
|
|
97
|
+
return 1
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
if ! tar -zxf "$OPENCODE_DATA_DIR/$tarball" -C "$OPENCODE_DATA_DIR" &>>"$LOG_FILE"; then
|
|
101
|
+
log_error "Failed to extract OpenCode binary"
|
|
102
|
+
return 1
|
|
103
|
+
fi
|
|
104
|
+
|
|
105
|
+
rm -f "$OPENCODE_DATA_DIR/$tarball"
|
|
106
|
+
|
|
107
|
+
if [ ! -f "$OPENCODE_DATA_DIR/opencode" ]; then
|
|
108
|
+
log_error "OpenCode binary not found after extraction"
|
|
109
|
+
return 1
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
chmod +x "$OPENCODE_DATA_DIR/opencode"
|
|
113
|
+
return 0
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
_compile_opencode_helper() {
|
|
117
|
+
loading "Compiling helper" _compile_opencode_helper_impl
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
_compile_opencode_helper_impl() {
|
|
121
|
+
local HELPER_SRC="$OMNI_PATH/tools/ai/opencode/helper/opencode_helper.c"
|
|
122
|
+
if [ ! -f "$HELPER_SRC" ]; then
|
|
123
|
+
log_error "Helper source not found at $HELPER_SRC"
|
|
124
|
+
return 1
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
if ! clang -O2 -o "$PREFIX/bin/opencode" "$HELPER_SRC" &>>"$LOG_FILE"; then
|
|
128
|
+
log_error "Failed to compile opencode helper"
|
|
129
|
+
return 1
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
chmod +x "$PREFIX/bin/opencode"
|
|
133
|
+
return 0
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
_install_opencode_native() {
|
|
137
|
+
_opencode_install_deps_native || return 1
|
|
138
|
+
_download_opencode_binary || return 1
|
|
139
|
+
_compile_opencode_helper || return 1
|
|
140
|
+
log_success "OpenCode installed natively"
|
|
141
|
+
return 0
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_install_opencode_proot() {
|
|
145
|
+
loading "Installing OpenCode (proot-distro)" _install_opencode_proot_impl
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
_install_opencode_proot_impl() {
|
|
149
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
150
|
+
|
|
151
|
+
if ! command -v proot-distro &>/dev/null; then
|
|
152
|
+
pkg install proot-distro -y &>>"$LOG_FILE"
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
if [ ! -d "$(_opencode_detect_ubuntu_root)" ]; then
|
|
156
|
+
proot-distro install ubuntu:24.04 &>>"$LOG_FILE"
|
|
157
|
+
fi
|
|
158
|
+
|
|
159
|
+
_opencode_proot_ubuntu /bin/bash -c \
|
|
160
|
+
'apt-get update && apt-get upgrade -y && apt-get install -y curl ca-certificates' \
|
|
161
|
+
&>>"$LOG_FILE"
|
|
162
|
+
|
|
163
|
+
_opencode_proot_ubuntu /bin/bash -c '
|
|
164
|
+
export SHELL=/bin/bash
|
|
165
|
+
export TMPDIR=/tmp
|
|
166
|
+
export HOME=/root
|
|
167
|
+
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
|
|
168
|
+
' &>>"$LOG_FILE"
|
|
169
|
+
|
|
170
|
+
local ubuntu_root
|
|
171
|
+
ubuntu_root="$(_opencode_detect_ubuntu_root)"
|
|
172
|
+
|
|
173
|
+
if [ -z "$ubuntu_root" ]; then
|
|
174
|
+
log_error "Ubuntu rootfs not found"
|
|
175
|
+
return 1
|
|
176
|
+
fi
|
|
177
|
+
|
|
178
|
+
local opencode_bin="$ubuntu_root/root/.opencode/bin/opencode"
|
|
179
|
+
|
|
180
|
+
if [ ! -f "$opencode_bin" ]; then
|
|
181
|
+
log_error "OpenCode binary not found after install"
|
|
182
|
+
return 1
|
|
183
|
+
fi
|
|
184
|
+
|
|
185
|
+
local wrapper_src="$OMNI_PATH/tools/ai/opencode/bin/opencode"
|
|
186
|
+
if [ ! -f "$wrapper_src" ]; then
|
|
187
|
+
log_error "Wrapper template not found at $wrapper_src"
|
|
188
|
+
return 1
|
|
189
|
+
fi
|
|
190
|
+
sed "s|__UBUNTU_ROOTFS__|$ubuntu_root|g" "$wrapper_src" >"$PREFIX/bin/opencode"
|
|
191
|
+
chmod +x "$PREFIX/bin/opencode"
|
|
192
|
+
|
|
193
|
+
if ! grep -q '.opencode/bin' "$ubuntu_root/root/.bashrc" 2>/dev/null; then
|
|
194
|
+
printf '\n# opencode\nexport PATH=/root/.opencode/bin:$PATH\n' >>"$ubuntu_root/root/.bashrc"
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
return 0
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
install_opencode() {
|
|
201
|
+
if command -v opencode &>/dev/null; then
|
|
202
|
+
log_info "OpenCode is already installed"
|
|
203
|
+
return 2
|
|
204
|
+
fi
|
|
205
|
+
|
|
206
|
+
log_info "Select installation method for OpenCode:"
|
|
207
|
+
|
|
208
|
+
read_select "Installation method" SELECTED_METHOD \
|
|
209
|
+
"Native (recommended) - Compile with glibc support" \
|
|
210
|
+
"Proot-distro (alternative) - Ubuntu container"
|
|
211
|
+
|
|
212
|
+
case "$SELECTED_METHOD" in
|
|
213
|
+
*Native*)
|
|
214
|
+
_install_opencode_native
|
|
215
|
+
;;
|
|
216
|
+
*Proot-distro*)
|
|
217
|
+
_install_opencode_proot
|
|
218
|
+
;;
|
|
219
|
+
esac
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
uninstall_opencode() {
|
|
223
|
+
log_info "Uninstalling OpenCode..."
|
|
224
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
225
|
+
|
|
226
|
+
if [ ! -f "$PREFIX/bin/opencode" ]; then
|
|
227
|
+
log_warn "OpenCode is not installed"
|
|
228
|
+
return 1
|
|
229
|
+
fi
|
|
230
|
+
|
|
231
|
+
if [ -f "$OPENCODE_DATA_DIR/opencode" ]; then
|
|
232
|
+
rm -f "$PREFIX/bin/opencode"
|
|
233
|
+
rm -rf "$OPENCODE_DATA_DIR"
|
|
234
|
+
log_success "OpenCode (native) uninstalled"
|
|
235
|
+
return 0
|
|
236
|
+
fi
|
|
237
|
+
|
|
238
|
+
_opencode_proot_ubuntu /bin/bash -c 'rm -rf /root/.opencode' &>>"$LOG_FILE"
|
|
239
|
+
|
|
240
|
+
local ubuntu_bashrc
|
|
241
|
+
ubuntu_bashrc="$(_opencode_detect_ubuntu_root)/root/.bashrc"
|
|
242
|
+
|
|
243
|
+
if [ -f "$ubuntu_bashrc" ]; then
|
|
244
|
+
sed -i '/# opencode/d; /export PATH=\/root\/.opencode\/bin/d' "$ubuntu_bashrc"
|
|
245
|
+
fi
|
|
246
|
+
|
|
247
|
+
if rm -f "$PREFIX/bin/opencode" &>>"$LOG_FILE"; then
|
|
248
|
+
log_success "OpenCode (proot-distro) uninstalled"
|
|
249
|
+
return 0
|
|
250
|
+
else
|
|
251
|
+
log_error "Failed to uninstall OpenCode"
|
|
252
|
+
return 1
|
|
253
|
+
fi
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
update_opencode() {
|
|
257
|
+
log_info "Updating OpenCode..."
|
|
258
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
259
|
+
|
|
260
|
+
if [ -f "$OPENCODE_DATA_DIR/opencode" ]; then
|
|
261
|
+
_install_opencode_native
|
|
262
|
+
return $?
|
|
263
|
+
fi
|
|
264
|
+
|
|
265
|
+
_opencode_proot_ubuntu /bin/bash -c 'rm -rf /root/.opencode' &>>"$LOG_FILE"
|
|
266
|
+
|
|
267
|
+
_opencode_proot_ubuntu /bin/bash -c '
|
|
268
|
+
export SHELL=/bin/bash
|
|
269
|
+
export TMPDIR=/tmp
|
|
270
|
+
export HOME=/root
|
|
271
|
+
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
|
|
272
|
+
' &>>"$LOG_FILE"
|
|
273
|
+
|
|
274
|
+
local ubuntu_root
|
|
275
|
+
ubuntu_root="$(_opencode_detect_ubuntu_root)"
|
|
276
|
+
local opencode_bin="$ubuntu_root/root/.opencode/bin/opencode"
|
|
277
|
+
|
|
278
|
+
if [ ! -f "$opencode_bin" ]; then
|
|
279
|
+
log_error "OpenCode binary not found after update"
|
|
280
|
+
return 1
|
|
281
|
+
fi
|
|
282
|
+
|
|
283
|
+
log_success "OpenCode (proot-distro) updated"
|
|
284
|
+
return 0
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
reinstall_opencode() {
|
|
288
|
+
uninstall_opencode
|
|
289
|
+
install_opencode
|
|
290
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Pi Coding Agent
|
|
2
|
+
|
|
3
|
+
Minimal terminal coding harness — adapt Pi to your workflows
|
|
4
|
+
|
|
5
|
+
**Package:** @earendil-works/pi-coding-agent
|
|
6
|
+
**Author:** israel676767
|
|
7
|
+
**Repository:** https://github.com/israel676767/omni
|
|
8
|
+
**Official:** https://github.com/earendil-works/pi
|
|
9
|
+
**Type:** AI coding agent (npm global package)
|
|
10
|
+
**License:** MIT
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Pi is a minimal terminal coding harness. Adapt Pi to your workflows, not the other way around.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Node.js LTS (nodejs-lts)
|
|
19
|
+
- npm
|
|
20
|
+
- ripgrep, git, fd
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
core install ai --pi
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
core uninstall ai --pi
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
core update ai --pi
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Installed as a global npm package: `@earendil-works/pi-coding-agent`
|
|
43
|
+
- Command: `pi`
|
|
44
|
+
- Uses `--ignore-scripts` flag for Android compatibility
|
|
45
|
+
- Requires Node.js LTS (installed automatically if missing)
|
|
46
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
import "@/utils/log"
|
|
3
|
+
|
|
4
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
5
|
+
|
|
6
|
+
_pi_dependencies() {
|
|
7
|
+
loading "Installing dependencies" _pi_dependencies_impl
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
_pi_dependencies_impl() {
|
|
11
|
+
declare -A DEPS=(
|
|
12
|
+
["nodejs-lts"]="node"
|
|
13
|
+
["ripgrep"]="rg"
|
|
14
|
+
["git"]="git"
|
|
15
|
+
["fd"]="fd"
|
|
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_pi_npm() {
|
|
33
|
+
loading "Installing Pi Coding Agent" _install_pi_npm_impl
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_install_pi_npm_impl() {
|
|
37
|
+
if ! npm install -g --ignore-scripts @earendil-works/pi-coding-agent &>>"$LOG_FILE"; then
|
|
38
|
+
log_error "Failed to install Pi"
|
|
39
|
+
return 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
return 0
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
install_pi() {
|
|
46
|
+
if command -v pi &>/dev/null; then
|
|
47
|
+
log_info "Pi Coding Agent is already installed"
|
|
48
|
+
return 2
|
|
49
|
+
fi
|
|
50
|
+
log_info "Installing Pi Coding Agent..."
|
|
51
|
+
|
|
52
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
53
|
+
|
|
54
|
+
_pi_dependencies || return 1
|
|
55
|
+
_install_pi_npm || return 1
|
|
56
|
+
|
|
57
|
+
log_success "Pi Coding Agent installed"
|
|
58
|
+
return 0
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
uninstall_pi() {
|
|
62
|
+
if ! command -v pi &>/dev/null; then
|
|
63
|
+
log_info "Pi Coding Agent is not installed"
|
|
64
|
+
return 2
|
|
65
|
+
fi
|
|
66
|
+
log_info "Uninstalling Pi Coding Agent..."
|
|
67
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
68
|
+
|
|
69
|
+
loading "Removing Pi Coding Agent" _uninstall_pi_impl
|
|
70
|
+
|
|
71
|
+
log_success "Pi uninstalled"
|
|
72
|
+
return 0
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
_uninstall_pi_impl() {
|
|
76
|
+
if ! npm uninstall -g @earendil-works/pi-coding-agent &>>"$LOG_FILE"; then
|
|
77
|
+
log_error "Failed to uninstall Pi"
|
|
78
|
+
return 1
|
|
79
|
+
fi
|
|
80
|
+
return 0
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
update_pi() {
|
|
84
|
+
log_info "Updating Pi Coding Agent..."
|
|
85
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
86
|
+
|
|
87
|
+
loading "Updating Pi Coding Agent" _update_pi_impl
|
|
88
|
+
|
|
89
|
+
log_success "Pi updated"
|
|
90
|
+
return 0
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_update_pi_impl() {
|
|
94
|
+
if ! npm install -g --ignore-scripts @earendil-works/pi-coding-agent &>>"$LOG_FILE"; then
|
|
95
|
+
log_error "Failed to update Pi"
|
|
96
|
+
return 1
|
|
97
|
+
fi
|
|
98
|
+
return 0
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
reinstall_pi() {
|
|
102
|
+
uninstall_pi
|
|
103
|
+
install_pi
|
|
104
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Qwen Code
|
|
2
|
+
|
|
3
|
+
Alibaba's AI coding assistant
|
|
4
|
+
|
|
5
|
+
**Package:** @qwen-code/qwen-code
|
|
6
|
+
**Author:** israel676767
|
|
7
|
+
**Repository:** https://github.com/israel676767/omni
|
|
8
|
+
**Official:** https://github.com/QwenLM/qwen-code
|
|
9
|
+
**Type:** AI coding assistant (npm global package)
|
|
10
|
+
**License:** MIT
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Qwen Code CLI is an AI-powered coding assistant developed by Alibaba Cloud. It provides intelligent code generation, code completion, and programming assistance based on the Qwen language model. Installed globally via npm for easy access from any directory.
|
|
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 --qwen-code
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
core uninstall ai --qwen-code
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
core update ai --qwen-code
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Installed as a global npm package: `@qwen-code/qwen-code`
|
|
43
|
+
- Command: `qwen`
|
|
44
|
+
- Requires Node.js LTS (installed automatically if missing)
|
|
45
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$OMNI_CACHE/install_ai.log"
|
|
6
|
+
|
|
7
|
+
_qwen_code_dependencies() {
|
|
8
|
+
loading "Installing dependencies" _qwen_code_dependencies_impl
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
_qwen_code_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_qwen_code_npm() {
|
|
33
|
+
loading "Installing Qwen Code" _install_qwen_code_npm_impl
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_install_qwen_code_npm_impl() {
|
|
37
|
+
export GYP_DEFINES="android_ndk_path=''"
|
|
38
|
+
export ANDROID_API_LEVEL=24
|
|
39
|
+
|
|
40
|
+
if ! npm install -g @qwen-code/qwen-code &>>"$LOG_FILE"; then
|
|
41
|
+
log_error "Failed to install Qwen Code"
|
|
42
|
+
return 1
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
return 0
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
install_qwen_code() {
|
|
49
|
+
if command -v qwen &>/dev/null; then
|
|
50
|
+
log_info "Qwen Code is already installed"
|
|
51
|
+
return 2
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
log_info "Installing Qwen Code..."
|
|
55
|
+
|
|
56
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
57
|
+
|
|
58
|
+
_qwen_code_dependencies || return 1
|
|
59
|
+
_install_qwen_code_npm || return 1
|
|
60
|
+
|
|
61
|
+
log_success "Qwen Code installed successfully"
|
|
62
|
+
return 0
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
uninstall_qwen_code() {
|
|
66
|
+
if ! command -v qwen &>/dev/null; then
|
|
67
|
+
log_info "Qwen Code is not installed"
|
|
68
|
+
return 2
|
|
69
|
+
fi
|
|
70
|
+
log_info "Uninstalling Qwen Code..."
|
|
71
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
72
|
+
|
|
73
|
+
loading "Removing Qwen Code" _uninstall_qwen_code_impl
|
|
74
|
+
|
|
75
|
+
log_success "Qwen Code uninstalled"
|
|
76
|
+
return 0
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
_uninstall_qwen_code_impl() {
|
|
80
|
+
if ! npm uninstall -g @qwen-code/qwen-code &>>"$LOG_FILE"; then
|
|
81
|
+
log_error "Failed to uninstall Qwen Code"
|
|
82
|
+
return 1
|
|
83
|
+
fi
|
|
84
|
+
return 0
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
update_qwen_code() {
|
|
88
|
+
log_info "Updating Qwen Code..."
|
|
89
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
90
|
+
|
|
91
|
+
loading "Updating Qwen Code" _update_qwen_code_impl
|
|
92
|
+
|
|
93
|
+
log_success "Qwen Code updated successfully"
|
|
94
|
+
return 0
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
_update_qwen_code_impl() {
|
|
98
|
+
export GYP_DEFINES="android_ndk_path=''"
|
|
99
|
+
export ANDROID_API_LEVEL=24
|
|
100
|
+
|
|
101
|
+
if ! npm update -g @qwen-code/qwen-code &>>"$LOG_FILE"; then
|
|
102
|
+
log_error "Failed to update Qwen Code"
|
|
103
|
+
return 1
|
|
104
|
+
fi
|
|
105
|
+
return 0
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
reinstall_qwen_code() {
|
|
109
|
+
uninstall_qwen_code
|
|
110
|
+
install_qwen_code
|
|
111
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Seedance CLI
|
|
2
|
+
|
|
3
|
+
AI video generation from your terminal using Seedance models via AceDataCloud API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
omni install ai --seedance
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
seedance generate --prompt "A cinematic shot of mountains at sunrise"
|
|
15
|
+
seedance --json # Machine-readable output
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Command:** `seedance`
|
|
19
|
+
|
|
20
|
+
**Links:**
|
|
21
|
+
- PyPI: https://pypi.org/project/seedance-cli/
|
|
22
|
+
- API Token: https://platform.acedata.cloud/
|