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,43 @@
|
|
|
1
|
+
# MariaDB
|
|
2
|
+
|
|
3
|
+
Community-developed fork of MySQL relational database
|
|
4
|
+
|
|
5
|
+
**Package:** mariadb
|
|
6
|
+
**Author:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
8
|
+
**Official:** https://mariadb.org
|
|
9
|
+
**Type:** Database (pkg)
|
|
10
|
+
**License:** GPL-2.0
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system. It offers enhanced performance, storage engines, and features compared to MySQL while maintaining full compatibility.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Installed via pkg
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
karnel install db --mariadb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
karnel uninstall db --mariadb
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Update
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
karnel update db --mariadb
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- Full MySQL compatible
|
|
41
|
+
- Command: `mysql`, `mariadb`
|
|
42
|
+
- Data directory: `$PREFIX/var/lib/mysql/`
|
|
43
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
6
|
+
|
|
7
|
+
_install_mariadb_impl() {
|
|
8
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
9
|
+
if pkg install mariadb -y &>>"$LOG_FILE"; then
|
|
10
|
+
log_success "MariaDB installed"
|
|
11
|
+
return 0
|
|
12
|
+
else
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
install_mariadb() {
|
|
18
|
+
if command -v mariadbd &>/dev/null; then
|
|
19
|
+
log_info "MariaDB is already installed"
|
|
20
|
+
return 2
|
|
21
|
+
fi
|
|
22
|
+
log_info "Installing MariaDB..."
|
|
23
|
+
loading "Installing MariaDB" _install_mariadb_impl
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_uninstall_mariadb_impl() {
|
|
27
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
28
|
+
if pkg uninstall mariadb -y &>>"$LOG_FILE"; then
|
|
29
|
+
log_success "MariaDB uninstalled"
|
|
30
|
+
return 0
|
|
31
|
+
else
|
|
32
|
+
log_error "Failed to uninstall MariaDB"
|
|
33
|
+
return 1
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
uninstall_mariadb() {
|
|
38
|
+
if ! command -v mariadbd &>/dev/null; then
|
|
39
|
+
log_info "MariaDB is not installed"
|
|
40
|
+
return 2
|
|
41
|
+
fi
|
|
42
|
+
log_info "Uninstalling MariaDB..."
|
|
43
|
+
loading "Uninstalling MariaDB" _uninstall_mariadb_impl
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_update_mariadb_impl() {
|
|
47
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
48
|
+
if pkg upgrade mariadb -y &>>"$LOG_FILE"; then
|
|
49
|
+
log_success "MariaDB updated"
|
|
50
|
+
return 0
|
|
51
|
+
else
|
|
52
|
+
log_error "Failed to update MariaDB"
|
|
53
|
+
return 1
|
|
54
|
+
fi
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
update_mariadb() {
|
|
58
|
+
log_info "Updating MariaDB..."
|
|
59
|
+
loading "Updating MariaDB" _update_mariadb_impl
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
reinstall_mariadb() {
|
|
63
|
+
uninstall_mariadb
|
|
64
|
+
install_mariadb
|
|
65
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# MongoDB
|
|
2
|
+
|
|
3
|
+
NoSQL document database for modern applications
|
|
4
|
+
|
|
5
|
+
**Package:** mongodb
|
|
6
|
+
**Author:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
8
|
+
**Official:** https://www.mongodb.com
|
|
9
|
+
**Type:** Database (pkg)
|
|
10
|
+
**License:** Server Side Public License (SSPL)
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
MongoDB is a source-available, cross-platform, document-oriented database program. Classified as a NoSQL database product, MongoDB uses JSON-like documents with optional schemas, making it ideal for modern application development.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Installed via pkg
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
karnel install db --mongodb
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
karnel uninstall db --mongodb
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Update
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
karnel update db --mongodb
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- Command: `mongod`, `mongosh`
|
|
41
|
+
- Data directory: `$PREFIX/var/lib/mongodb/`
|
|
42
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
6
|
+
|
|
7
|
+
_install_mongodb_impl() {
|
|
8
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
9
|
+
|
|
10
|
+
if [[ ! -f $PREFIX/etc/apt/sources.list.d/tur.list ]]; then
|
|
11
|
+
if ! pkg install tur-repo -y &>>"$LOG_FILE"; then
|
|
12
|
+
log_error "Failed to install tur-repo"
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
if pkg install mongodb -y &>>"$LOG_FILE"; then
|
|
18
|
+
log_success "MongoDB installed"
|
|
19
|
+
return 0
|
|
20
|
+
else
|
|
21
|
+
return 1
|
|
22
|
+
fi
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
install_mongodb() {
|
|
26
|
+
if command -v mongod &>/dev/null; then
|
|
27
|
+
log_info "MongoDB is already installed"
|
|
28
|
+
return 2
|
|
29
|
+
fi
|
|
30
|
+
log_info "Installing MongoDB..."
|
|
31
|
+
loading "Installing MongoDB" _install_mongodb_impl
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_uninstall_mongodb_impl() {
|
|
35
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
36
|
+
if pkg uninstall mongodb -y &>>"$LOG_FILE"; then
|
|
37
|
+
log_success "MongoDB uninstalled"
|
|
38
|
+
return 0
|
|
39
|
+
else
|
|
40
|
+
log_error "Failed to uninstall MongoDB"
|
|
41
|
+
return 1
|
|
42
|
+
fi
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
uninstall_mongodb() {
|
|
46
|
+
if ! command -v mongod &>/dev/null; then
|
|
47
|
+
log_info "MongoDB is not installed"
|
|
48
|
+
return 2
|
|
49
|
+
fi
|
|
50
|
+
log_info "Uninstalling MongoDB..."
|
|
51
|
+
loading "Uninstalling MongoDB" _uninstall_mongodb_impl
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_update_mongodb_impl() {
|
|
55
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
56
|
+
if pkg upgrade mongodb -y &>>"$LOG_FILE"; then
|
|
57
|
+
log_success "MongoDB updated"
|
|
58
|
+
return 0
|
|
59
|
+
else
|
|
60
|
+
log_error "Failed to update MongoDB"
|
|
61
|
+
return 1
|
|
62
|
+
fi
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
update_mongodb() {
|
|
66
|
+
log_info "Updating MongoDB..."
|
|
67
|
+
loading "Updating MongoDB" _update_mongodb_impl
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
reinstall_mongodb() {
|
|
71
|
+
uninstall_mongodb
|
|
72
|
+
install_mongodb
|
|
73
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# PostgreSQL
|
|
2
|
+
|
|
3
|
+
Advanced open-source relational database
|
|
4
|
+
|
|
5
|
+
**Package:** postgresql
|
|
6
|
+
**Author:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
8
|
+
**Official:** https://www.postgresql.org
|
|
9
|
+
**Type:** Database (pkg)
|
|
10
|
+
**License:** PostgreSQL License
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
PostgreSQL is a powerful, open-source object-relational database system with over 30 years of active development. It has a strong reputation for reliability, feature robustness, and performance. Karnel Termux includes a dedicated manager (`karnel pg`) for starting, stopping, and managing PostgreSQL instances.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Installed via pkg
|
|
19
|
+
- Data directory managed by `karnel pg`
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
karnel install db --postgresql
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Uninstall
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
karnel uninstall db --postgresql
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Update
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
karnel update db --postgresql
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Notes
|
|
40
|
+
|
|
41
|
+
- Managed via `karnel pg` commands (start, stop, restart, status, init, create, drop, list, shell)
|
|
42
|
+
- Logs: `~/.cache/karnel/postgresql.log`
|
|
43
|
+
- Automatic data directory detection
|
|
44
|
+
- Support for existing installations
|
|
45
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
6
|
+
|
|
7
|
+
_install_postgresql_impl() {
|
|
8
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
9
|
+
if pkg install postgresql -y &>>"$LOG_FILE"; then
|
|
10
|
+
log_success "PostgreSQL installed"
|
|
11
|
+
return 0
|
|
12
|
+
else
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
install_postgresql() {
|
|
18
|
+
if command -v postgres &>/dev/null; then
|
|
19
|
+
log_info "PostgreSQL is already installed"
|
|
20
|
+
return 2
|
|
21
|
+
fi
|
|
22
|
+
log_info "Installing PostgreSQL..."
|
|
23
|
+
loading "Installing PostgreSQL" _install_postgresql_impl
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_uninstall_postgresql_impl() {
|
|
27
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
28
|
+
if pkg uninstall postgresql -y &>>"$LOG_FILE"; then
|
|
29
|
+
log_success "PostgreSQL uninstalled"
|
|
30
|
+
return 0
|
|
31
|
+
else
|
|
32
|
+
log_error "Failed to uninstall PostgreSQL"
|
|
33
|
+
return 1
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
uninstall_postgresql() {
|
|
38
|
+
if ! command -v postgres &>/dev/null; then
|
|
39
|
+
log_info "PostgreSQL is not installed"
|
|
40
|
+
return 2
|
|
41
|
+
fi
|
|
42
|
+
log_info "Uninstalling PostgreSQL..."
|
|
43
|
+
loading "Uninstalling PostgreSQL" _uninstall_postgresql_impl
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_update_postgresql_impl() {
|
|
47
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
48
|
+
if pkg upgrade postgresql -y &>>"$LOG_FILE"; then
|
|
49
|
+
log_success "PostgreSQL updated"
|
|
50
|
+
return 0
|
|
51
|
+
else
|
|
52
|
+
log_error "Failed to update PostgreSQL"
|
|
53
|
+
return 1
|
|
54
|
+
fi
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
update_postgresql() {
|
|
58
|
+
log_info "Updating PostgreSQL..."
|
|
59
|
+
loading "Updating PostgreSQL" _update_postgresql_impl
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
reinstall_postgresql() {
|
|
63
|
+
uninstall_postgresql
|
|
64
|
+
install_postgresql
|
|
65
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Redis
|
|
2
|
+
|
|
3
|
+
In-memory data structure store used as database, cache, and message broker
|
|
4
|
+
|
|
5
|
+
**Package:** redis
|
|
6
|
+
**Author:** israel
|
|
7
|
+
**Repository:** https://github.com/israelOfficial/karnel-termux
|
|
8
|
+
**Official:** https://redis.io
|
|
9
|
+
**Type:** Database (pkg)
|
|
10
|
+
**License:** BSD-3-Clause
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Redis is an open-source (BSD-licensed), in-memory data structure store, used as a database, cache, and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Installed via pkg
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
karnel install db --redis
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
karnel uninstall db --redis
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Update
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
karnel update db --redis
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- No special configuration required for basic usage
|
|
41
|
+
- Server binary: `redis-server` — client binary: `redis-cli`
|
|
42
|
+
- Default port: 6379
|
|
43
|
+
- Start the server with: `redis-server --daemonize yes`
|
|
44
|
+
- Connect with: `redis-cli`
|
|
45
|
+
- Test connectivity: `redis-cli PING` (should reply `PONG`)
|
|
46
|
+
- Data persists to disk even when server is stopped
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/data/data/com.termux/files/usr/bin/bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
import "@/utils/version"
|
|
5
|
+
|
|
6
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
7
|
+
|
|
8
|
+
_install_redis_impl() {
|
|
9
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
10
|
+
if yes | pkg install redis &>>"$LOG_FILE"; then
|
|
11
|
+
log_success "Redis installed"
|
|
12
|
+
return 0
|
|
13
|
+
else
|
|
14
|
+
return 1
|
|
15
|
+
fi
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
install_redis() {
|
|
19
|
+
if command -v redis-cli &>/dev/null; then
|
|
20
|
+
log_info "Redis is already installed"
|
|
21
|
+
return 2
|
|
22
|
+
fi
|
|
23
|
+
log_info "Installing Redis..."
|
|
24
|
+
loading "Installing Redis" _install_redis_impl
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_uninstall_redis_impl() {
|
|
28
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
29
|
+
if pkg uninstall redis -y &>>"$LOG_FILE"; then
|
|
30
|
+
log_success "Redis uninstalled"
|
|
31
|
+
return 0
|
|
32
|
+
else
|
|
33
|
+
log_error "Failed to uninstall Redis"
|
|
34
|
+
return 1
|
|
35
|
+
fi
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
uninstall_redis() {
|
|
39
|
+
if ! command -v redis-cli &>/dev/null; then
|
|
40
|
+
log_info "Redis is not installed"
|
|
41
|
+
return 2
|
|
42
|
+
fi
|
|
43
|
+
log_info "Uninstalling Redis..."
|
|
44
|
+
loading "Uninstalling Redis" _uninstall_redis_impl
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_update_redis_impl() {
|
|
48
|
+
loading "Updating Redis" _do_redis_update
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_do_redis_update() {
|
|
52
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
53
|
+
pkg upgrade redis -y &>>"$LOG_FILE"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
update_redis() {
|
|
57
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
58
|
+
_check_update_needed "Redis" "$(_get_installed_pkg_version redis "Redis")" "$(_get_remote_pkg_version redis)" _update_redis_impl
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
reinstall_redis() {
|
|
62
|
+
uninstall_redis
|
|
63
|
+
install_redis
|
|
64
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SQLite
|
|
2
|
+
|
|
3
|
+
Self-contained, serverless, zero-configuration SQL database engine
|
|
4
|
+
|
|
5
|
+
**Package:** sqlite
|
|
6
|
+
**Author:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
8
|
+
**Official:** https://www.sqlite.org
|
|
9
|
+
**Type:** Database (pkg)
|
|
10
|
+
**License:** Public Domain
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured SQL database engine. It is the most used database engine in the world, embedded in virtually every mobile phone and most computers.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Installed via pkg
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
karnel install db --sqlite
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Uninstall
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
karnel uninstall db --sqlite
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Update
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
karnel update db --sqlite
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Notes
|
|
39
|
+
|
|
40
|
+
- Zero configuration required
|
|
41
|
+
- No server process needed
|
|
42
|
+
- Database is a single file on disk
|
|
43
|
+
- Command: `sqlite3`
|
|
44
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
6
|
+
|
|
7
|
+
_install_sqlite_impl() {
|
|
8
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
9
|
+
if pkg install sqlite -y &>>"$LOG_FILE"; then
|
|
10
|
+
log_success "SQLite installed"
|
|
11
|
+
return 0
|
|
12
|
+
else
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
install_sqlite() {
|
|
18
|
+
if command -v sqlite3 &>/dev/null; then
|
|
19
|
+
log_info "SQLite is already installed"
|
|
20
|
+
return 2
|
|
21
|
+
fi
|
|
22
|
+
log_info "Installing SQLite..."
|
|
23
|
+
loading "Installing SQLite" _install_sqlite_impl
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_uninstall_sqlite_impl() {
|
|
27
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
28
|
+
if pkg uninstall sqlite -y &>>"$LOG_FILE"; then
|
|
29
|
+
log_success "SQLite uninstalled"
|
|
30
|
+
return 0
|
|
31
|
+
else
|
|
32
|
+
log_error "Failed to uninstall SQLite"
|
|
33
|
+
return 1
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
uninstall_sqlite() {
|
|
38
|
+
if ! command -v sqlite3 &>/dev/null; then
|
|
39
|
+
log_info "SQLite is not installed"
|
|
40
|
+
return 2
|
|
41
|
+
fi
|
|
42
|
+
log_info "Uninstalling SQLite..."
|
|
43
|
+
loading "Uninstalling SQLite" _uninstall_sqlite_impl
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_update_sqlite_impl() {
|
|
47
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
48
|
+
if pkg upgrade sqlite -y &>>"$LOG_FILE"; then
|
|
49
|
+
log_success "SQLite updated"
|
|
50
|
+
return 0
|
|
51
|
+
else
|
|
52
|
+
log_error "Failed to update SQLite"
|
|
53
|
+
return 1
|
|
54
|
+
fi
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
update_sqlite() {
|
|
58
|
+
log_info "Updating SQLite..."
|
|
59
|
+
loading "Updating SQLite" _update_sqlite_impl
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
reinstall_sqlite() {
|
|
63
|
+
uninstall_sqlite
|
|
64
|
+
install_sqlite
|
|
65
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_deploy.log"
|
|
6
|
+
|
|
7
|
+
DEPLOY_TOOLS=("vercel" "railway" "netlify")
|
|
8
|
+
|
|
9
|
+
for _tool in "${DEPLOY_TOOLS[@]}"; do
|
|
10
|
+
source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
|
|
11
|
+
done
|
|
12
|
+
unset _tool
|
|
13
|
+
|
|
14
|
+
_batch_deploy() {
|
|
15
|
+
local action="$1"
|
|
16
|
+
local action_past="$2"
|
|
17
|
+
local count_var="${3:-DEPLOY_COUNT}"
|
|
18
|
+
local count=0
|
|
19
|
+
local failed=0
|
|
20
|
+
local total=${#DEPLOY_TOOLS[@]}
|
|
21
|
+
local current=0
|
|
22
|
+
|
|
23
|
+
progress_start "$total" "${action_past}ing deploy tools..."
|
|
24
|
+
|
|
25
|
+
for tool in "${DEPLOY_TOOLS[@]}"; do
|
|
26
|
+
local func_name="${action}_${tool//-/_}"
|
|
27
|
+
if declare -f "$func_name" &>/dev/null; then
|
|
28
|
+
loading "${action_past^}ing $tool" "$func_name"
|
|
29
|
+
case $? in 0) ((count++));; 1) ((failed++));; esac
|
|
30
|
+
fi
|
|
31
|
+
((current++))
|
|
32
|
+
progress_update "$current" "$total"
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
progress_done "$total"
|
|
36
|
+
eval "$count_var=$count"
|
|
37
|
+
return $failed
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
install_all_deploy_tools() { _batch_deploy "install" "install"; }
|
|
41
|
+
uninstall_all_deploy_tools() { _batch_deploy "uninstall" "uninstall"; }
|
|
42
|
+
update_all_deploy_tools() { _batch_deploy "update" "update"; }
|
|
43
|
+
reinstall_all_deploy_tools() { _batch_deploy "reinstall" "reinstall"; }
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
install_netlify() {
|
|
6
|
+
if command -v netlify &>/dev/null; then
|
|
7
|
+
log_info "Netlify CLI is already installed"
|
|
8
|
+
return 2
|
|
9
|
+
fi
|
|
10
|
+
log_info "Installing Netlify CLI..."
|
|
11
|
+
npm install -g netlify-cli &>/dev/null || {
|
|
12
|
+
log_error "Failed to install Netlify CLI"
|
|
13
|
+
return 1
|
|
14
|
+
}
|
|
15
|
+
command -v termux-fix-shebang &>/dev/null && termux-fix-shebang "$(command -v netlify)" &>/dev/null
|
|
16
|
+
log_success "Netlify CLI installed"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
uninstall_netlify() {
|
|
20
|
+
log_info "Uninstalling Netlify CLI..."
|
|
21
|
+
npm uninstall -g netlify-cli &>/dev/null || {
|
|
22
|
+
log_error "Failed to uninstall Netlify CLI"
|
|
23
|
+
return 1
|
|
24
|
+
}
|
|
25
|
+
log_success "Netlify CLI uninstalled"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
update_netlify() {
|
|
29
|
+
log_info "Updating Netlify CLI..."
|
|
30
|
+
npm update -g netlify-cli &>/dev/null || {
|
|
31
|
+
log_error "Failed to update Netlify CLI"
|
|
32
|
+
return 1
|
|
33
|
+
}
|
|
34
|
+
command -v termux-fix-shebang &>/dev/null && termux-fix-shebang "$(command -v netlify)" &>/dev/null
|
|
35
|
+
log_success "Netlify CLI updated"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
reinstall_netlify() {
|
|
39
|
+
uninstall_netlify
|
|
40
|
+
install_netlify
|
|
41
|
+
}
|