karnel-termux 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +454 -0
- package/install.sh +272 -0
- package/karnel/bin/karnel +77 -0
- package/karnel/cli/commands/brain.sh +1553 -0
- package/karnel/cli/commands/cleanup.sh +66 -0
- package/karnel/cli/commands/doctor.sh +1528 -0
- package/karnel/cli/commands/env.sh +233 -0
- package/karnel/cli/commands/help.sh +8 -0
- package/karnel/cli/commands/ia.sh +502 -0
- package/karnel/cli/commands/init.sh +1274 -0
- package/karnel/cli/commands/install.sh +718 -0
- package/karnel/cli/commands/list.sh +399 -0
- package/karnel/cli/commands/open.sh +106 -0
- package/karnel/cli/commands/pg.sh +719 -0
- package/karnel/cli/commands/reinstall.sh +663 -0
- package/karnel/cli/commands/show.sh +90 -0
- package/karnel/cli/commands/start.sh +54 -0
- package/karnel/cli/commands/status.sh +96 -0
- package/karnel/cli/commands/uninstall.sh +668 -0
- package/karnel/cli/commands/update.sh +723 -0
- package/karnel/cli/commands/upgrade.sh +40 -0
- package/karnel/cli/commands/version.sh +3 -0
- package/karnel/cli/commands/voice.sh +230 -0
- package/karnel/cli/karnel.sh +706 -0
- package/karnel/modules/ai.sh +135 -0
- package/karnel/modules/auto.sh +114 -0
- package/karnel/modules/db.sh +132 -0
- package/karnel/modules/deploy.sh +74 -0
- package/karnel/modules/dev.sh +148 -0
- package/karnel/modules/editor.sh +115 -0
- package/karnel/modules/lang.sh +124 -0
- package/karnel/modules/npm.sh +146 -0
- package/karnel/modules/shell.sh +338 -0
- package/karnel/modules/ui.sh +139 -0
- package/karnel/modules/voice.sh +118 -0
- package/karnel/tools/ai/all.sh +209 -0
- package/karnel/tools/ai/antigravity-cli/README.md +45 -0
- package/karnel/tools/ai/antigravity-cli/bin/agy +28 -0
- package/karnel/tools/ai/antigravity-cli/helper/agy_helper.c +39 -0
- package/karnel/tools/ai/antigravity-cli/install.sh +469 -0
- package/karnel/tools/ai/claude-code/README.md +45 -0
- package/karnel/tools/ai/claude-code/bin/claude +29 -0
- package/karnel/tools/ai/claude-code/helper/claude_helper.c +42 -0
- package/karnel/tools/ai/claude-code/install.sh +278 -0
- package/karnel/tools/ai/cline/install.sh +160 -0
- package/karnel/tools/ai/codegraph/README.md +43 -0
- package/karnel/tools/ai/codegraph/bin/codegraph +5 -0
- package/karnel/tools/ai/codegraph/install.sh +160 -0
- package/karnel/tools/ai/codex/README.md +44 -0
- package/karnel/tools/ai/codex/install.sh +104 -0
- package/karnel/tools/ai/command-code/README.md +62 -0
- package/karnel/tools/ai/command-code/install.sh +136 -0
- package/karnel/tools/ai/crush/README.md +17 -0
- package/karnel/tools/ai/crush/install.sh +89 -0
- package/karnel/tools/ai/ctx7/README.md +26 -0
- package/karnel/tools/ai/ctx7/install.sh +61 -0
- package/karnel/tools/ai/engram/README.md +44 -0
- package/karnel/tools/ai/engram/install.sh +127 -0
- package/karnel/tools/ai/freebuff/README.md +52 -0
- package/karnel/tools/ai/freebuff/bin/freebuff +28 -0
- package/karnel/tools/ai/freebuff/helper/freebuff_helper.c +47 -0
- package/karnel/tools/ai/freebuff/install.sh +303 -0
- package/karnel/tools/ai/gemini-cli/README.md +46 -0
- package/karnel/tools/ai/gemini-cli/install.sh +111 -0
- package/karnel/tools/ai/gentle-ai/README.md +42 -0
- package/karnel/tools/ai/gentle-ai/install.sh +253 -0
- package/karnel/tools/ai/gentle-ai/termux-patches.go +256 -0
- package/karnel/tools/ai/gga/README.md +49 -0
- package/karnel/tools/ai/gga/install.sh +134 -0
- package/karnel/tools/ai/hermes-agent/README.md +50 -0
- package/karnel/tools/ai/hermes-agent/install.sh +120 -0
- package/karnel/tools/ai/kilocode-cli/README.md +45 -0
- package/karnel/tools/ai/kilocode-cli/bin/kilocode +21 -0
- package/karnel/tools/ai/kilocode-cli/helper/kilocode_helper.c +47 -0
- package/karnel/tools/ai/kilocode-cli/install.sh +179 -0
- package/karnel/tools/ai/kimchi-code/README.md +53 -0
- package/karnel/tools/ai/kimchi-code/install.sh +221 -0
- package/karnel/tools/ai/kimi-code/README.md +45 -0
- package/karnel/tools/ai/kimi-code/install.sh +111 -0
- package/karnel/tools/ai/kiro/README.md +17 -0
- package/karnel/tools/ai/kiro/install.sh +134 -0
- package/karnel/tools/ai/mimocode/README.md +43 -0
- package/karnel/tools/ai/mimocode/bin/mimo +28 -0
- package/karnel/tools/ai/mimocode/helper/mimocode_helper.c +47 -0
- package/karnel/tools/ai/mimocode/install.sh +287 -0
- package/karnel/tools/ai/minimax-cli/README.md +45 -0
- package/karnel/tools/ai/minimax-cli/install.sh +111 -0
- package/karnel/tools/ai/mistral-vibe/README.md +46 -0
- package/karnel/tools/ai/mistral-vibe/install.sh +119 -0
- package/karnel/tools/ai/odysseus/README.md +35 -0
- package/karnel/tools/ai/odysseus/install.sh +198 -0
- package/karnel/tools/ai/ollama/README.md +44 -0
- package/karnel/tools/ai/ollama/install.sh +78 -0
- package/karnel/tools/ai/omni-route/README.md +111 -0
- package/karnel/tools/ai/omni-route/install.sh +165 -0
- package/karnel/tools/ai/openclaude/README.md +46 -0
- package/karnel/tools/ai/openclaude/install.sh +110 -0
- package/karnel/tools/ai/openclaw/README.md +47 -0
- package/karnel/tools/ai/openclaw/install.sh +112 -0
- package/karnel/tools/ai/opencode/README.md +51 -0
- package/karnel/tools/ai/opencode/bin/opencode +28 -0
- package/karnel/tools/ai/opencode/helper/opencode_helper.c +57 -0
- package/karnel/tools/ai/opencode/install.sh +290 -0
- package/karnel/tools/ai/openspec/README.md +34 -0
- package/karnel/tools/ai/openspec/install.sh +61 -0
- package/karnel/tools/ai/pi/README.md +46 -0
- package/karnel/tools/ai/pi/install.sh +104 -0
- package/karnel/tools/ai/qwen-code/README.md +45 -0
- package/karnel/tools/ai/qwen-code/install.sh +111 -0
- package/karnel/tools/auto/all.sh +57 -0
- package/karnel/tools/auto/n8n/README.md +47 -0
- package/karnel/tools/auto/n8n/install.sh +102 -0
- package/karnel/tools/db/all.sh +61 -0
- package/karnel/tools/db/mariadb/README.md +43 -0
- package/karnel/tools/db/mariadb/install.sh +65 -0
- package/karnel/tools/db/mongodb/README.md +42 -0
- package/karnel/tools/db/mongodb/install.sh +73 -0
- package/karnel/tools/db/postgresql/README.md +45 -0
- package/karnel/tools/db/postgresql/install.sh +65 -0
- package/karnel/tools/db/redis/README.md +46 -0
- package/karnel/tools/db/redis/install.sh +64 -0
- package/karnel/tools/db/sqlite/README.md +44 -0
- package/karnel/tools/db/sqlite/install.sh +65 -0
- package/karnel/tools/deploy/all.sh +43 -0
- package/karnel/tools/deploy/netlify/install.sh +41 -0
- package/karnel/tools/deploy/railway/install.sh +109 -0
- package/karnel/tools/deploy/vercel/install.sh +43 -0
- package/karnel/tools/dev/all.sh +77 -0
- package/karnel/tools/dev/bat/README.md +44 -0
- package/karnel/tools/dev/bat/install.sh +82 -0
- package/karnel/tools/dev/bc/README.md +44 -0
- package/karnel/tools/dev/bc/install.sh +82 -0
- package/karnel/tools/dev/cloudflared/README.md +43 -0
- package/karnel/tools/dev/cloudflared/install.sh +82 -0
- package/karnel/tools/dev/curl/README.md +43 -0
- package/karnel/tools/dev/curl/install.sh +82 -0
- package/karnel/tools/dev/fzf/README.md +44 -0
- package/karnel/tools/dev/fzf/install.sh +82 -0
- package/karnel/tools/dev/gh/README.md +43 -0
- package/karnel/tools/dev/gh/install.sh +82 -0
- package/karnel/tools/dev/html2text/README.md +44 -0
- package/karnel/tools/dev/html2text/install.sh +82 -0
- package/karnel/tools/dev/imagemagick/README.md +44 -0
- package/karnel/tools/dev/imagemagick/install.sh +82 -0
- package/karnel/tools/dev/jq/README.md +44 -0
- package/karnel/tools/dev/jq/install.sh +82 -0
- package/karnel/tools/dev/lsd/README.md +44 -0
- package/karnel/tools/dev/lsd/install.sh +82 -0
- package/karnel/tools/dev/make/README.md +44 -0
- package/karnel/tools/dev/make/install.sh +82 -0
- package/karnel/tools/dev/ncurses/README.md +42 -0
- package/karnel/tools/dev/ncurses/install.sh +82 -0
- package/karnel/tools/dev/openssh/README.md +43 -0
- package/karnel/tools/dev/openssh/install.sh +75 -0
- package/karnel/tools/dev/proot/README.md +43 -0
- package/karnel/tools/dev/proot/install.sh +82 -0
- package/karnel/tools/dev/shfmt/README.md +44 -0
- package/karnel/tools/dev/shfmt/install.sh +82 -0
- package/karnel/tools/dev/tmate/README.md +44 -0
- package/karnel/tools/dev/tmate/install.sh +82 -0
- package/karnel/tools/dev/tmux/README.md +43 -0
- package/karnel/tools/dev/tmux/install.sh +75 -0
- package/karnel/tools/dev/translate/README.md +44 -0
- package/karnel/tools/dev/translate/install.sh +82 -0
- package/karnel/tools/dev/tree/README.md +44 -0
- package/karnel/tools/dev/tree/install.sh +82 -0
- package/karnel/tools/dev/udocker/README.md +44 -0
- package/karnel/tools/dev/udocker/install.sh +82 -0
- package/karnel/tools/dev/wget/README.md +44 -0
- package/karnel/tools/dev/wget/install.sh +82 -0
- package/karnel/tools/editor/all.sh +59 -0
- package/karnel/tools/editor/code-server/README.md +42 -0
- package/karnel/tools/editor/code-server/install.sh +74 -0
- package/karnel/tools/editor/neovim/README.md +43 -0
- package/karnel/tools/editor/neovim/install.sh +64 -0
- package/karnel/tools/editor/nvchad/README.md +45 -0
- package/karnel/tools/editor/nvchad/install.sh +105 -0
- package/karnel/tools/lang/all.sh +63 -0
- package/karnel/tools/lang/clang/README.md +43 -0
- package/karnel/tools/lang/clang/install.sh +79 -0
- package/karnel/tools/lang/golang/README.md +43 -0
- package/karnel/tools/lang/golang/install.sh +79 -0
- package/karnel/tools/lang/nodejs/README.md +43 -0
- package/karnel/tools/lang/nodejs/install.sh +79 -0
- package/karnel/tools/lang/perl/README.md +43 -0
- package/karnel/tools/lang/perl/install.sh +79 -0
- package/karnel/tools/lang/php/README.md +43 -0
- package/karnel/tools/lang/php/install.sh +79 -0
- package/karnel/tools/lang/python/README.md +43 -0
- package/karnel/tools/lang/python/install.sh +79 -0
- package/karnel/tools/lang/rust/README.md +43 -0
- package/karnel/tools/lang/rust/install.sh +79 -0
- package/karnel/tools/npm/all.sh +90 -0
- package/karnel/tools/npm/live-server/README.md +43 -0
- package/karnel/tools/npm/live-server/install.sh +96 -0
- package/karnel/tools/npm/localtunnel/README.md +43 -0
- package/karnel/tools/npm/localtunnel/install.sh +112 -0
- package/karnel/tools/npm/markserv/README.md +43 -0
- package/karnel/tools/npm/markserv/install.sh +95 -0
- package/karnel/tools/npm/ncu/README.md +43 -0
- package/karnel/tools/npm/ncu/install.sh +95 -0
- package/karnel/tools/npm/nestjs/README.md +43 -0
- package/karnel/tools/npm/nestjs/install.sh +95 -0
- package/karnel/tools/npm/ngrok/README.md +44 -0
- package/karnel/tools/npm/ngrok/install.sh +95 -0
- package/karnel/tools/npm/prettier/README.md +43 -0
- package/karnel/tools/npm/prettier/install.sh +95 -0
- package/karnel/tools/npm/psqlformat/README.md +43 -0
- package/karnel/tools/npm/psqlformat/install.sh +95 -0
- package/karnel/tools/npm/turbopack/README.md +8 -0
- package/karnel/tools/npm/turbopack/install.sh +42 -0
- package/karnel/tools/npm/typescript/README.md +43 -0
- package/karnel/tools/npm/typescript/install.sh +95 -0
- package/karnel/tools/npm/vercel/README.md +43 -0
- package/karnel/tools/npm/vercel/install.sh +95 -0
- package/karnel/tools/shell/all.sh +67 -0
- package/karnel/tools/shell/better-npm/README.md +43 -0
- package/karnel/tools/shell/better-npm/install.sh +85 -0
- package/karnel/tools/shell/fzf-tab/README.md +44 -0
- package/karnel/tools/shell/fzf-tab/install.sh +85 -0
- package/karnel/tools/shell/history-substring/README.md +43 -0
- package/karnel/tools/shell/history-substring/install.sh +85 -0
- package/karnel/tools/shell/powerlevel10k/README.md +43 -0
- package/karnel/tools/shell/powerlevel10k/install.sh +85 -0
- package/karnel/tools/shell/you-should-use/README.md +43 -0
- package/karnel/tools/shell/you-should-use/install.sh +85 -0
- package/karnel/tools/shell/zsh-autopair/README.md +44 -0
- package/karnel/tools/shell/zsh-autopair/install.sh +85 -0
- package/karnel/tools/shell/zsh-autosuggestions/README.md +43 -0
- package/karnel/tools/shell/zsh-autosuggestions/install.sh +85 -0
- package/karnel/tools/shell/zsh-completions/README.md +43 -0
- package/karnel/tools/shell/zsh-completions/install.sh +85 -0
- package/karnel/tools/shell/zsh-defer/README.md +43 -0
- package/karnel/tools/shell/zsh-defer/install.sh +85 -0
- package/karnel/tools/shell/zsh-syntax-highlighting/README.md +43 -0
- package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +72 -0
- package/karnel/tools/ui/all.sh +61 -0
- package/karnel/tools/ui/banner/README.md +42 -0
- package/karnel/tools/ui/banner/install.sh +160 -0
- package/karnel/tools/ui/cursor/README.md +42 -0
- package/karnel/tools/ui/cursor/install.sh +58 -0
- package/karnel/tools/ui/extra-keys/README.md +43 -0
- package/karnel/tools/ui/extra-keys/install.sh +62 -0
- package/karnel/tools/ui/font/README.md +43 -0
- package/karnel/tools/ui/font/install.sh +63 -0
- package/karnel/tools/voice/all.sh +27 -0
- package/karnel/tools/voice/install.sh +10 -0
- package/karnel/tools/voice/uninstall.sh +8 -0
- package/karnel/utils/banner.sh +492 -0
- package/karnel/utils/bootstrap.sh +25 -0
- package/karnel/utils/colors.sh +33 -0
- package/karnel/utils/dialogrc +30 -0
- package/karnel/utils/env.sh +53 -0
- package/karnel/utils/log.sh +567 -0
- package/karnel/utils/version.sh +205 -0
- package/package.json +42 -0
- package/scripts/npm-install.js +60 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
import "@/utils/colors"
|
|
5
|
+
|
|
6
|
+
list_main() {
|
|
7
|
+
|
|
8
|
+
if [[ $# -eq 0 ]]; then
|
|
9
|
+
echo
|
|
10
|
+
box "Karnel List"
|
|
11
|
+
echo
|
|
12
|
+
log_info "Usage: karnel list <target>"
|
|
13
|
+
echo
|
|
14
|
+
log_info "Available targets:"
|
|
15
|
+
echo
|
|
16
|
+
list_item "lang - List language packages"
|
|
17
|
+
list_item "db - List database packages"
|
|
18
|
+
list_item "ai - List AI tools"
|
|
19
|
+
list_item "editor - List code editor components"
|
|
20
|
+
list_item "dev - List development tools"
|
|
21
|
+
list_item "npm - List Node.js global modules"
|
|
22
|
+
list_item "shell - List ZSH plugins"
|
|
23
|
+
list_item "ui - List Termux UI components"
|
|
24
|
+
list_item "auto - List automation tools"
|
|
25
|
+
list_item "deploy - List deploy CLIs"
|
|
26
|
+
echo
|
|
27
|
+
return
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
for arg in "$@"; do
|
|
31
|
+
case "$arg" in
|
|
32
|
+
lang)
|
|
33
|
+
_list_lang
|
|
34
|
+
;;
|
|
35
|
+
db)
|
|
36
|
+
_list_db
|
|
37
|
+
;;
|
|
38
|
+
ai)
|
|
39
|
+
_list_ai
|
|
40
|
+
;;
|
|
41
|
+
editor)
|
|
42
|
+
_list_editor
|
|
43
|
+
;;
|
|
44
|
+
dev)
|
|
45
|
+
_list_dev
|
|
46
|
+
;;
|
|
47
|
+
npm)
|
|
48
|
+
_list_npm
|
|
49
|
+
;;
|
|
50
|
+
shell)
|
|
51
|
+
_list_shell
|
|
52
|
+
;;
|
|
53
|
+
ui)
|
|
54
|
+
_list_ui
|
|
55
|
+
;;
|
|
56
|
+
auto)
|
|
57
|
+
_list_auto
|
|
58
|
+
;;
|
|
59
|
+
deploy)
|
|
60
|
+
_list_deploy
|
|
61
|
+
;;
|
|
62
|
+
*)
|
|
63
|
+
log_warn "Unknown list target: $arg"
|
|
64
|
+
echo "Run 'karnel list' to see available targets"
|
|
65
|
+
;;
|
|
66
|
+
esac
|
|
67
|
+
done
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# ===== LIST DEPLOY =====
|
|
71
|
+
_list_deploy() {
|
|
72
|
+
echo
|
|
73
|
+
box "Deploy CLIs"
|
|
74
|
+
echo
|
|
75
|
+
printf " ${D_GREEN}%-18s${NC} %s\n" "vercel" "Frontend & serverless deployment"
|
|
76
|
+
printf " ${D_GREEN}%-18s${NC} %s\n" "railway" "Full-stack with databases"
|
|
77
|
+
printf " ${D_GREEN}%-18s${NC} %s\n" "netlify" "Static sites & edge functions"
|
|
78
|
+
echo
|
|
79
|
+
list_item "Usage: ${D_CYAN}karnel install deploy${NC} to install all"
|
|
80
|
+
list_item "Usage: ${D_CYAN}karnel install deploy --vercel${NC} for specific"
|
|
81
|
+
list_item "After install: ${D_CYAN}vercel deploy --prod${NC} or ${D_CYAN}railway up${NC}"
|
|
82
|
+
echo
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
# ===== LIST LANGUAGE =====
|
|
86
|
+
_list_lang() {
|
|
87
|
+
echo
|
|
88
|
+
box "Language Packages"
|
|
89
|
+
echo
|
|
90
|
+
log_info "Available packages and install commands:"
|
|
91
|
+
echo
|
|
92
|
+
|
|
93
|
+
table_start "Package" "Install Flag" "Status"
|
|
94
|
+
table_row "Node.js LTS" "--nodejs" "$(_check_pkg "nodejs-lts")"
|
|
95
|
+
table_row "Python" "--python" "$(_check_pkg "python")"
|
|
96
|
+
table_row "Perl" "--perl" "$(_check_pkg "perl")"
|
|
97
|
+
table_row "PHP" "--php" "$(_check_pkg "php")"
|
|
98
|
+
table_row "Rust" "--rust" "$(_check_pkg "rust")"
|
|
99
|
+
table_row "C/C++ (clang)" "--clang" "$(_check_pkg "clang")"
|
|
100
|
+
table_row "Go (golang)" "--golang" "$(_check_pkg "golang")"
|
|
101
|
+
table_end
|
|
102
|
+
|
|
103
|
+
echo
|
|
104
|
+
log_info "Install specific: ${D_CYAN}karnel install lang --nodejs --python${NC}"
|
|
105
|
+
log_info "Install all: ${D_CYAN}karnel install lang${NC}"
|
|
106
|
+
echo
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
# ===== LIST DB =====
|
|
110
|
+
_list_db() {
|
|
111
|
+
echo
|
|
112
|
+
box "Database Packages"
|
|
113
|
+
echo
|
|
114
|
+
log_info "Available packages and install commands:"
|
|
115
|
+
echo
|
|
116
|
+
|
|
117
|
+
table_start "Database" "Install Flag" "Status"
|
|
118
|
+
table_row "PostgreSQL" "--postgresql" "$(_check_pkg "postgresql")"
|
|
119
|
+
table_row "MariaDB" "--mariadb" "$(_check_pkg "mariadb")"
|
|
120
|
+
table_row "SQLite" "--sqlite" "$(_check_pkg "sqlite")"
|
|
121
|
+
table_row "MongoDB" "--mongodb" "$(_check_pkg "mongodb")"
|
|
122
|
+
table_end
|
|
123
|
+
|
|
124
|
+
echo
|
|
125
|
+
log_info "Install specific: ${D_CYAN}karnel install db --postgresql --sqlite${NC}"
|
|
126
|
+
log_info "Install all: ${D_CYAN}karnel install db${NC}"
|
|
127
|
+
echo
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
# ===== LIST AI =====
|
|
131
|
+
_list_ai() {
|
|
132
|
+
echo
|
|
133
|
+
box "AI Tools"
|
|
134
|
+
echo
|
|
135
|
+
log_info "Available AI tools and install commands:"
|
|
136
|
+
echo
|
|
137
|
+
|
|
138
|
+
table_start "Tool" "Install Flag" "Command" "Status"
|
|
139
|
+
table_row "Qwen Code" "--qwen-code" "qwen" "$(_check_cmd "qwen")"
|
|
140
|
+
table_row "Gemini CLI" "--gemini-cli" "gemini" "$(_check_cmd "gemini")"
|
|
141
|
+
table_row "Claude Code" "--claude-code" "claude" "$(_check_cmd "claude")"
|
|
142
|
+
table_row "Mistral Vibe" "--mistral-vibe" "vibe" "$(_check_cmd "vibe")"
|
|
143
|
+
table_row "OpenClaude" "--openclaude" "openclaude" "$(_check_cmd "openclaude")"
|
|
144
|
+
table_row "OpenClaw" "--openclaw" "openclaw" "$(_check_cmd "openclaw")"
|
|
145
|
+
table_row "Ollama" "--ollama" "ollama" "$(_check_pkg "ollama")"
|
|
146
|
+
table_row "Codex CLI" "--codex" "codex" "$(_check_cmd "codex")"
|
|
147
|
+
table_row "OpenCode" "--opencode" "opencode" "$(_check_cmd "opencode")"
|
|
148
|
+
table_row "MiMoCode" "--mimocode" "mimo" "$(_check_cmd "mimo")"
|
|
149
|
+
table_row "Engram" "--engram" "engram" "$(_check_cmd "engram")"
|
|
150
|
+
table_row "CodeGraph" "--codegraph" "codegraph" "$(_check_cmd "codegraph")"
|
|
151
|
+
table_row "Pi Coding Agent" "--pi" "pi" "$(_check_cmd "pi")"
|
|
152
|
+
table_row "Antigravity CLI" "--antigravity-cli" "agy" "$(_check_cmd "agy")"
|
|
153
|
+
table_row "Minimax CLI" "--minimax-cli" "mmx" "$(_check_cmd "mmx")"
|
|
154
|
+
table_row "Gentle AI" "--gentle-ai" "gentle-ai" "$(_check_cmd "gentle-ai")"
|
|
155
|
+
table_row "GGA" "--gga" "gga" "$(_check_cmd "gga")"
|
|
156
|
+
table_row "Hermes Agent" "--hermes-agent" "hermes" "$(_check_cmd "hermes")"
|
|
157
|
+
table_row "Kimi Code" "--kimi-code" "kimi" "$(_check_cmd "kimi")"
|
|
158
|
+
table_row "Command Code" "--command-code" "command-code" "$(_check_cmd "command-code")"
|
|
159
|
+
table_row "Freebuff" "--freebuff" "freebuff" "$(_check_cmd "freebuff")"
|
|
160
|
+
table_row "Kilo Code CLI" "--kilocode-cli" "kilocode" "$(_check_cmd "kilocode")"
|
|
161
|
+
table_row "Kiro CLI" "--kiro" "kiro" "$(_check_cmd "kiro")"
|
|
162
|
+
table_row "Crush CLI" "--crush" "crush" "$(_check_cmd "crush")"
|
|
163
|
+
table_row "Cline CLI" "--cline" "cline" "$(_check_cmd "cline")"
|
|
164
|
+
table_row "Odysseus" "--odysseus" "odysseus" "$(_check_cmd "odysseus")"
|
|
165
|
+
table_row "Kimchi CLI" "--kimchi-code" "kimchi" "$(_check_cmd "kimchi")"
|
|
166
|
+
table_row "omniRoute" "--omni-route" "omni-route" "$(_check_cmd "omni-route")"
|
|
167
|
+
table_row "Context7 Docs" "--ctx7" "ctx7" "$(_check_cmd "ctx7")"
|
|
168
|
+
table_row "OpenSpec SDD" "--openspec" "openspec" "$(_check_cmd "openspec")"
|
|
169
|
+
table_end
|
|
170
|
+
|
|
171
|
+
echo
|
|
172
|
+
log_info "Install specific: ${D_CYAN}karnel install ai --opencode --engram${NC}"
|
|
173
|
+
log_info "Install all: ${D_CYAN}karnel install ai${NC}"
|
|
174
|
+
echo
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
# ===== LIST EDITOR =====
|
|
178
|
+
_list_editor() {
|
|
179
|
+
echo
|
|
180
|
+
box "Code Editor"
|
|
181
|
+
echo
|
|
182
|
+
log_info "Available components and install commands:"
|
|
183
|
+
echo
|
|
184
|
+
|
|
185
|
+
table_start "Component" "Install Flag" "Status"
|
|
186
|
+
table_row "code-server" "--code-server" "$(_check_cmd "code-server")"
|
|
187
|
+
table_end
|
|
188
|
+
|
|
189
|
+
echo
|
|
190
|
+
log_info "Install: ${D_CYAN}karnel install editor --code-server${NC}"
|
|
191
|
+
log_info "Start: ${D_CYAN}karnel start editor${NC}"
|
|
192
|
+
echo
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
# ===== LIST TOOLS =====
|
|
196
|
+
_list_dev() {
|
|
197
|
+
echo
|
|
198
|
+
box "Development Tools"
|
|
199
|
+
echo
|
|
200
|
+
log_info "Available tools and install commands:"
|
|
201
|
+
echo
|
|
202
|
+
|
|
203
|
+
table_start "Tool" "Install Flag" "Status"
|
|
204
|
+
table_row "GitHub CLI" "--gh" "$(_check_pkg "gh")"
|
|
205
|
+
table_row "Wget" "--wget" "$(_check_pkg "wget")"
|
|
206
|
+
table_row "Curl" "--curl" "$(_check_pkg "curl")"
|
|
207
|
+
table_row "LSD" "--lsd" "$(_check_pkg "lsd")"
|
|
208
|
+
table_row "Bat" "--bat" "$(_check_pkg "bat")"
|
|
209
|
+
table_row "Proot" "--proot" "$(_check_pkg "proot")"
|
|
210
|
+
table_row "Ncurses Utils" "--ncurses" "$(_check_pkg "ncurses-utils")"
|
|
211
|
+
table_row "Tmate" "--tmate" "$(_check_pkg "tmate")"
|
|
212
|
+
table_row "Cloudflared" "--cloudflared" "$(_check_pkg "cloudflared")"
|
|
213
|
+
table_row "Translate Shell" "--translate" "$(_check_pkg "translate-shell")"
|
|
214
|
+
table_row "html2text" "--html2text" "$(_check_pkg "html2text")"
|
|
215
|
+
table_row "jq" "--jq" "$(_check_pkg "jq")"
|
|
216
|
+
table_row "bc" "--bc" "$(_check_pkg "bc")"
|
|
217
|
+
table_row "Tree" "--tree" "$(_check_pkg "tree")"
|
|
218
|
+
table_row "Fzf" "--fzf" "$(_check_pkg "fzf")"
|
|
219
|
+
table_row "ImageMagick" "--imagemagick" "$(_check_pkg "imagemagick")"
|
|
220
|
+
table_row "Shfmt" "--shfmt" "$(_check_pkg "shfmt")"
|
|
221
|
+
table_row "Make" "--make" "$(_check_pkg "make")"
|
|
222
|
+
table_row "Udocker" "--udocker" "$(_check_pkg "udocker")"
|
|
223
|
+
table_end
|
|
224
|
+
|
|
225
|
+
echo
|
|
226
|
+
log_info "Install specific: ${D_CYAN}karnel install dev --gh --fzf --jq${NC}"
|
|
227
|
+
log_info "Install all: ${D_CYAN}karnel install dev${NC}"
|
|
228
|
+
echo
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
# ===== LIST NODE =====
|
|
232
|
+
_list_npm() {
|
|
233
|
+
echo
|
|
234
|
+
box "Node.js Global Modules"
|
|
235
|
+
echo
|
|
236
|
+
log_info "Available modules and install commands:"
|
|
237
|
+
echo
|
|
238
|
+
|
|
239
|
+
table_start "Module" "Install Flag" "Command" "Status"
|
|
240
|
+
table_row "TypeScript" "--typescript" "tsc" "$(_check_cmd "tsc")"
|
|
241
|
+
table_row "NestJS CLI" "--nestjs" "nest" "$(_check_cmd "nest")"
|
|
242
|
+
table_row "Prettier" "--prettier" "prettier" "$(_check_cmd "prettier")"
|
|
243
|
+
table_row "Live Server" "--live-server" "live-server" "$(_check_cmd "live-server")"
|
|
244
|
+
table_row "Localtunnel" "--localtunnel" "lt" "$(_check_cmd "lt")"
|
|
245
|
+
table_row "Vercel CLI" "--vercel" "vercel" "$(_check_cmd "vercel")"
|
|
246
|
+
table_row "Markserv" "--markserv" "markserv" "$(_check_cmd "markserv")"
|
|
247
|
+
table_row "PSQL Format" "--psqlformat" "psqlformat" "$(_check_cmd "psqlformat")"
|
|
248
|
+
table_row "NPM Check Updates" "--ncu" "ncu" "$(_check_cmd "ncu")"
|
|
249
|
+
table_row "Ngrok" "--ngrok" "ngrok" "$(_check_cmd "ngrok")"
|
|
250
|
+
table_row "Turbopack" "--turbopack" "turbo" "$(_check_cmd "turbo")"
|
|
251
|
+
table_end
|
|
252
|
+
|
|
253
|
+
echo
|
|
254
|
+
log_info "Install specific: ${D_CYAN}karnel install npm --typescript --prettier${NC}"
|
|
255
|
+
log_info "Install all: ${D_CYAN}karnel install npm${NC}"
|
|
256
|
+
echo
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
# ===== LIST SHELL =====
|
|
260
|
+
_list_shell() {
|
|
261
|
+
echo
|
|
262
|
+
box "ZSH Shell Plugins"
|
|
263
|
+
echo
|
|
264
|
+
log_info "Available plugins and install commands:"
|
|
265
|
+
echo
|
|
266
|
+
|
|
267
|
+
table_start "Plugin" "Install Flag" "Status"
|
|
268
|
+
table_row "powerlevel10k" "--powerlevel10k" "$(_check_plugin "powerlevel10k")"
|
|
269
|
+
table_row "zsh-defer" "--zsh-defer" "$(_check_plugin "zsh-defer")"
|
|
270
|
+
table_row "zsh-autosuggestions" "--zsh-autosuggestions" "$(_check_plugin "zsh-autosuggestions")"
|
|
271
|
+
table_row "zsh-syntax-highlighting" "--zsh-syntax-highlighting" "$(_check_plugin "zsh-syntax-highlighting")"
|
|
272
|
+
table_row "zsh-history-substring-search" "--history-substring" "$(_check_plugin "zsh-history-substring-search")"
|
|
273
|
+
table_row "zsh-completions" "--zsh-completions" "$(_check_plugin "zsh-completions")"
|
|
274
|
+
table_row "fzf-tab" "--fzf-tab" "$(_check_plugin "fzf-tab")"
|
|
275
|
+
table_row "zsh-you-should-use" "--you-should-use" "$(_check_plugin "zsh-you-should-use")"
|
|
276
|
+
table_row "zsh-autopair" "--zsh-autopair" "$(_check_plugin "zsh-autopair")"
|
|
277
|
+
table_row "zsh-better-npm-completion" "--better-npm" "$(_check_plugin "zsh-better-npm-completion")"
|
|
278
|
+
table_end
|
|
279
|
+
|
|
280
|
+
echo
|
|
281
|
+
log_info "Install specific: ${D_CYAN}karnel install shell --powerlevel10k --fzf-tab${NC}"
|
|
282
|
+
log_info "Install all: ${D_CYAN}karnel install shell${NC}"
|
|
283
|
+
echo
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
# ===== LIST UI =====
|
|
287
|
+
_list_ui() {
|
|
288
|
+
echo
|
|
289
|
+
box "Termux UI Components"
|
|
290
|
+
echo
|
|
291
|
+
log_info "Available components and install commands:"
|
|
292
|
+
echo
|
|
293
|
+
|
|
294
|
+
table_start "Component" "Install Flag" "Status"
|
|
295
|
+
table_row "Meslo Nerd Font" "--font" "$(_check_file "$HOME/.termux/font.ttf")"
|
|
296
|
+
table_row "Extra Keys" "--extra-keys" "$(_check_extra_keys)"
|
|
297
|
+
table_row "Cursor Color" "--cursor" "$(_check_file "$HOME/.termux/colors.properties")"
|
|
298
|
+
table_row "Startup Banner" "--banner" "$(_grep_config "$HOME/.zshrc" "# ===== Karnel Banner =====" "$HOME/.bashrc")"
|
|
299
|
+
table_end
|
|
300
|
+
|
|
301
|
+
echo
|
|
302
|
+
log_info "Install specific: ${D_CYAN}karnel install ui --font --extra-keys${NC}"
|
|
303
|
+
log_info "Install all: ${D_CYAN}karnel install ui${NC}"
|
|
304
|
+
echo
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
# ===== LIST AUTOMATION =====
|
|
308
|
+
_list_auto() {
|
|
309
|
+
echo
|
|
310
|
+
box "Automation Tools"
|
|
311
|
+
echo
|
|
312
|
+
log_info "Available tools and install commands:"
|
|
313
|
+
echo
|
|
314
|
+
|
|
315
|
+
table_start "Tool" "Install Flag" "Command" "Status"
|
|
316
|
+
table_row "n8n" "--n8n" "n8n" "$(_check_cmd "n8n")"
|
|
317
|
+
table_end
|
|
318
|
+
|
|
319
|
+
echo
|
|
320
|
+
log_info "Install specific: ${D_CYAN}karnel install auto --n8n${NC}"
|
|
321
|
+
log_info "Install all: ${D_CYAN}karnel install auto${NC}"
|
|
322
|
+
echo
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
# ===== HELPER FUNCTIONS =====
|
|
326
|
+
|
|
327
|
+
# Check if command exists
|
|
328
|
+
_check_cmd() {
|
|
329
|
+
local cmd="$1"
|
|
330
|
+
if command -v "$cmd" &>/dev/null; then
|
|
331
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
332
|
+
else
|
|
333
|
+
echo -e "${D_RED}not installed${NC}"
|
|
334
|
+
fi
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
# Check if package is installed via pkg
|
|
338
|
+
_check_pkg() {
|
|
339
|
+
local pkg="$1"
|
|
340
|
+
if dpkg -s "$pkg" 2>/dev/null | grep -q "Status: install ok installed"; then
|
|
341
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
342
|
+
else
|
|
343
|
+
echo -e "${D_RED}not installed${NC}"
|
|
344
|
+
fi
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
# Check if directory exists
|
|
348
|
+
_check_dir() {
|
|
349
|
+
local dir="$1"
|
|
350
|
+
if [[ -d "$dir" ]]; then
|
|
351
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
352
|
+
else
|
|
353
|
+
echo -e "${D_RED}not installed${NC}"
|
|
354
|
+
fi
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
# Check if file exists
|
|
358
|
+
_check_file() {
|
|
359
|
+
local file="$1"
|
|
360
|
+
if [[ -f "$file" ]]; then
|
|
361
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
362
|
+
else
|
|
363
|
+
echo -e "${D_RED}not installed${NC}"
|
|
364
|
+
fi
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
# Check if extra-keys are configured by karnel
|
|
368
|
+
_check_extra_keys() {
|
|
369
|
+
if grep -qF "terminal-cursor-blink-rate=500" "$HOME/.termux/termux.properties" 2>/dev/null; then
|
|
370
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
371
|
+
else
|
|
372
|
+
echo -e "${D_RED}not installed${NC}"
|
|
373
|
+
fi
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
# Check if ZSH plugin exists
|
|
377
|
+
_check_plugin() {
|
|
378
|
+
local plugin="$1"
|
|
379
|
+
if [[ -d "$HOME/.zsh-plugins/$plugin" ]]; then
|
|
380
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
381
|
+
else
|
|
382
|
+
echo -e "${D_RED}not installed${NC}"
|
|
383
|
+
fi
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
# Check if pattern exists in config file (with fallback)
|
|
387
|
+
_grep_config() {
|
|
388
|
+
local primary="$1"
|
|
389
|
+
local pattern="$2"
|
|
390
|
+
local fallback="$3"
|
|
391
|
+
|
|
392
|
+
if [[ -f "$primary" ]] && grep -qF "$pattern" "$primary" 2>/dev/null; then
|
|
393
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
394
|
+
elif [[ -n "$fallback" && -f "$fallback" ]] && grep -qF "$pattern" "$fallback" 2>/dev/null; then
|
|
395
|
+
echo -e "${D_GREEN}installed${NC}"
|
|
396
|
+
else
|
|
397
|
+
echo -e "${D_RED}not installed${NC}"
|
|
398
|
+
fi
|
|
399
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
import "@/utils/colors"
|
|
5
|
+
|
|
6
|
+
OPEN_BASE_URL="https://kerneltermux.vercel.app"
|
|
7
|
+
|
|
8
|
+
open_main() {
|
|
9
|
+
if [[ $# -eq 0 ]]; then
|
|
10
|
+
open_help
|
|
11
|
+
return
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
local target="$1"
|
|
15
|
+
local url=""
|
|
16
|
+
|
|
17
|
+
case "$target" in
|
|
18
|
+
karnel | help)
|
|
19
|
+
url="$OPEN_BASE_URL/karnel"
|
|
20
|
+
;;
|
|
21
|
+
lang)
|
|
22
|
+
url="$OPEN_BASE_URL/karnel/lang"
|
|
23
|
+
;;
|
|
24
|
+
db)
|
|
25
|
+
url="$OPEN_BASE_URL/karnel/db"
|
|
26
|
+
;;
|
|
27
|
+
ai)
|
|
28
|
+
url="$OPEN_BASE_URL/karnel/ai"
|
|
29
|
+
;;
|
|
30
|
+
editor)
|
|
31
|
+
url="$OPEN_BASE_URL/karnel/editor"
|
|
32
|
+
;;
|
|
33
|
+
dev)
|
|
34
|
+
url="$OPEN_BASE_URL/karnel/dev"
|
|
35
|
+
;;
|
|
36
|
+
npm)
|
|
37
|
+
url="$OPEN_BASE_URL/karnel/npm"
|
|
38
|
+
;;
|
|
39
|
+
shell)
|
|
40
|
+
url="$OPEN_BASE_URL/karnel/shell"
|
|
41
|
+
;;
|
|
42
|
+
ui)
|
|
43
|
+
url="$OPEN_BASE_URL/karnel/ui"
|
|
44
|
+
;;
|
|
45
|
+
auto)
|
|
46
|
+
url="$OPEN_BASE_URL/karnel/auto"
|
|
47
|
+
;;
|
|
48
|
+
deploy)
|
|
49
|
+
url="$OPEN_BASE_URL/karnel/deploy"
|
|
50
|
+
;;
|
|
51
|
+
cleanup)
|
|
52
|
+
url="$OPEN_BASE_URL/karnel/cleanup"
|
|
53
|
+
;;
|
|
54
|
+
--help | -h)
|
|
55
|
+
open_help
|
|
56
|
+
return
|
|
57
|
+
;;
|
|
58
|
+
*)
|
|
59
|
+
log_error "Unknown target: $target"
|
|
60
|
+
echo
|
|
61
|
+
open_help
|
|
62
|
+
return 1
|
|
63
|
+
;;
|
|
64
|
+
esac
|
|
65
|
+
|
|
66
|
+
if command -v termux-open-url &>/dev/null; then
|
|
67
|
+
termux-open-url "$url"
|
|
68
|
+
log_success "Opening: ${D_CYAN}$url${NC}"
|
|
69
|
+
elif command -v termux-open &>/dev/null; then
|
|
70
|
+
termux-open "$url"
|
|
71
|
+
log_success "Opening: ${D_CYAN}$url${NC}"
|
|
72
|
+
else
|
|
73
|
+
log_error "termux-open-url not found. Are you running in Termux?"
|
|
74
|
+
echo "Documentation at: $url"
|
|
75
|
+
return 1
|
|
76
|
+
fi
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
open_help() {
|
|
80
|
+
echo
|
|
81
|
+
box "Karnel Open"
|
|
82
|
+
echo
|
|
83
|
+
log_info "Usage: karnel open <target>"
|
|
84
|
+
echo
|
|
85
|
+
log_info "Open documentation in browser"
|
|
86
|
+
echo
|
|
87
|
+
separator_section "Targets"
|
|
88
|
+
echo
|
|
89
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "karnel" "Karnel overview"
|
|
90
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "lang" "Language modules"
|
|
91
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "db" "Database modules"
|
|
92
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "ai" "AI tools"
|
|
93
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "editor" "Code editor"
|
|
94
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "dev" "Dev tools"
|
|
95
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "npm" "Node.js tools"
|
|
96
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "shell" "ZSH shell"
|
|
97
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "ui" "Termux UI"
|
|
98
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "auto" "Automation tools"
|
|
99
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "deploy" "Deploy CLIs"
|
|
100
|
+
printf " ${D_GREEN}%-14s${NC} ${D_DIM}%s${NC}\n" "cleanup" "Cache cleanup"
|
|
101
|
+
echo
|
|
102
|
+
separator_section "Website"
|
|
103
|
+
echo
|
|
104
|
+
list_item "${D_CYAN}$OPEN_BASE_URL${NC}"
|
|
105
|
+
echo
|
|
106
|
+
}
|