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,34 @@
|
|
|
1
|
+
# openspec
|
|
2
|
+
|
|
3
|
+
Spec-Driven Development framework for AI workflow orchestration.
|
|
4
|
+
|
|
5
|
+
## What is it?
|
|
6
|
+
|
|
7
|
+
[openspec](https://github.com/fission-ai/openspec) bridges human intent and AI output with structured technical specifications. It stores specs in an `/openspec/` directory to guide AI agents toward accurate, maintainable code.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
karnel install ai --openspec
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Initialize openspec in current project
|
|
19
|
+
openspec init
|
|
20
|
+
|
|
21
|
+
# Create a proposal
|
|
22
|
+
openspec proposal create "Feature Name"
|
|
23
|
+
|
|
24
|
+
# Generate spec from proposal
|
|
25
|
+
openspec spec generate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Requirements
|
|
29
|
+
|
|
30
|
+
- Node.js (install with `karnel install lang --nodejs`)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
*Adapted for Karnel-Termux by israel marques*
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# openspec - Spec-Driven Development framework for AI workflow orchestration
|
|
4
|
+
# Bridges human intent and AI output with structured technical specs
|
|
5
|
+
# Stores specs in /openspec/ directory to guide AI agents
|
|
6
|
+
# Official: npm install -g @fission-ai/openspec@latest
|
|
7
|
+
|
|
8
|
+
install_openspec() {
|
|
9
|
+
if command -v openspec &>/dev/null; then
|
|
10
|
+
log_info "openspec is already installed"
|
|
11
|
+
return 2
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
log_info "Installing openspec (Spec-Driven Development framework)..."
|
|
15
|
+
npm install -g @fission-ai/openspec@latest 2>/dev/null
|
|
16
|
+
local rc=$?
|
|
17
|
+
|
|
18
|
+
local _t
|
|
19
|
+
_t=$(readlink -f "$PREFIX/bin/openspec" 2>/dev/null)
|
|
20
|
+
[ -f "$_t" ] && sed -i '1s|^#!/usr/bin/env node|#!/data/data/com.termux/files/usr/bin/env node|' "$_t"
|
|
21
|
+
|
|
22
|
+
if [[ $rc -eq 0 ]] && command -v openspec &>/dev/null; then
|
|
23
|
+
log_success "openspec installed successfully"
|
|
24
|
+
log_info "Run: openspec init to create /openspec/ directory"
|
|
25
|
+
return 0
|
|
26
|
+
else
|
|
27
|
+
log_error "openspec installation failed"
|
|
28
|
+
return 1
|
|
29
|
+
fi
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
uninstall_openspec() {
|
|
33
|
+
if ! command -v openspec &>/dev/null; then
|
|
34
|
+
log_info "openspec is not installed"
|
|
35
|
+
return 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
log_info "Uninstalling openspec..."
|
|
39
|
+
npm uninstall -g @fission-ai/openspec 2>/dev/null
|
|
40
|
+
return $?
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
update_openspec() {
|
|
44
|
+
if ! command -v openspec &>/dev/null; then
|
|
45
|
+
log_warn "openspec is not installed"
|
|
46
|
+
return 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
log_info "Updating openspec..."
|
|
50
|
+
npm update -g @fission-ai/openspec 2>/dev/null
|
|
51
|
+
local _t
|
|
52
|
+
_t=$(readlink -f "$PREFIX/bin/openspec" 2>/dev/null)
|
|
53
|
+
[ -f "$_t" ] && sed -i '1s|^#!/usr/bin/env node|#!/data/data/com.termux/files/usr/bin/env node|' "$_t"
|
|
54
|
+
return $?
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
reinstall_openspec() {
|
|
58
|
+
uninstall_openspec 2>/dev/null
|
|
59
|
+
install_openspec
|
|
60
|
+
return $?
|
|
61
|
+
}
|
|
@@ -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:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
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
|
+
karnel install ai --pi
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
karnel uninstall ai --pi
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
karnel 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="$KARNEL_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:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
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
|
+
karnel install ai --qwen-code
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
karnel uninstall ai --qwen-code
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
karnel 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="$KARNEL_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,57 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_auto.log"
|
|
6
|
+
|
|
7
|
+
AUTOMATION_TOOLS=(
|
|
8
|
+
"n8n"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
for _tool in "${AUTOMATION_TOOLS[@]}"; do
|
|
12
|
+
source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
|
|
13
|
+
done
|
|
14
|
+
unset _tool
|
|
15
|
+
|
|
16
|
+
_batch_auto() {
|
|
17
|
+
local action="$1"
|
|
18
|
+
local action_past="$2"
|
|
19
|
+
local count_var="$3"
|
|
20
|
+
local count=0
|
|
21
|
+
local failed=0
|
|
22
|
+
local total=${#AUTOMATION_TOOLS[@]}
|
|
23
|
+
local current=0
|
|
24
|
+
local func_name
|
|
25
|
+
|
|
26
|
+
progress_start "$total" "${action_past}ing automation tools..."
|
|
27
|
+
|
|
28
|
+
for tool in "${AUTOMATION_TOOLS[@]}"; do
|
|
29
|
+
func_name="${action}_${tool//-/_}"
|
|
30
|
+
if declare -f "$func_name" &>/dev/null; then
|
|
31
|
+
loading "${action_past^}ing ${tool}" "$func_name"
|
|
32
|
+
case $? in 0) ((count++));; 1) ((failed++));; esac
|
|
33
|
+
fi
|
|
34
|
+
((current++))
|
|
35
|
+
progress_update "$current" "$total"
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
progress_done "$total"
|
|
39
|
+
eval "$count_var=$count"
|
|
40
|
+
return $failed
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
install_all_auto_tools() {
|
|
44
|
+
_batch_auto "install" "install" "installed_count"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
uninstall_all_auto_tools() {
|
|
48
|
+
_batch_auto "uninstall" "uninstall" "uninstalled_count"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
update_all_auto_tools() {
|
|
52
|
+
_batch_auto "update" "update" "updated_count"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
reinstall_all_auto_tools() {
|
|
56
|
+
_batch_auto "reinstall" "reinstall" "reinstalled_count"
|
|
57
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# n8n
|
|
2
|
+
|
|
3
|
+
Workflow automation tool for connecting services
|
|
4
|
+
|
|
5
|
+
**Package:** n8n
|
|
6
|
+
**Author:** israel marques
|
|
7
|
+
**Repository:** https://github.com/israelmarques1024-dotcom/karnel-termux
|
|
8
|
+
**Official:** https://n8n.io
|
|
9
|
+
**Type:** Automation tool (npm global package)
|
|
10
|
+
**License:** Sustainable Use License (fair-code)
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
n8n is a powerful workflow automation tool that connects various services and APIs through a visual editor. It supports 400+ integrations including HTTP requests, databases, AI services, and more, allowing you to create complex automations without code.
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
- Node.js LTS (nodejs-lts)
|
|
19
|
+
- npm
|
|
20
|
+
- python, sqlite, build-essential, binutils, make, clang
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
karnel install auto --n8n
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Uninstall
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
karnel uninstall auto --n8n
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Update
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
karnel update auto --n8n
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Installed as a global npm package: `n8n`
|
|
43
|
+
- Command: `n8n`
|
|
44
|
+
- Web UI at http://localhost:5678
|
|
45
|
+
- 400+ integrations available
|
|
46
|
+
- Supports custom JavaScript code nodes
|
|
47
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_auto.log"
|
|
6
|
+
|
|
7
|
+
_n8n_dependencies() {
|
|
8
|
+
declare -A DEPS=(
|
|
9
|
+
["nodejs-lts"]="node"
|
|
10
|
+
["python"]="python"
|
|
11
|
+
["sqlite"]="sqlite"
|
|
12
|
+
["build-essential"]=""
|
|
13
|
+
["binutils"]=""
|
|
14
|
+
["make"]="make"
|
|
15
|
+
["clang"]="clang"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
local pkg_name bin_name
|
|
19
|
+
for pkg_name in "${!DEPS[@]}"; do
|
|
20
|
+
bin_name="${DEPS[$pkg_name]}"
|
|
21
|
+
if [[ -n "$bin_name" ]] && command -v "$bin_name" &>/dev/null; then
|
|
22
|
+
continue
|
|
23
|
+
fi
|
|
24
|
+
if ! pkg install "$pkg_name" -y &>>"$LOG_FILE"; then
|
|
25
|
+
log_error "Failed to install $pkg_name"
|
|
26
|
+
return 1
|
|
27
|
+
fi
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
log_success "n8n dependencies installed"
|
|
31
|
+
return 0
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
_install_n8n_impl() {
|
|
35
|
+
_n8n_dependencies
|
|
36
|
+
|
|
37
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
38
|
+
export GYP_DEFINES="android_ndk_path=''"
|
|
39
|
+
export ANDROID_API_LEVEL=24
|
|
40
|
+
|
|
41
|
+
if npm install -g n8n &>>"$LOG_FILE"; then
|
|
42
|
+
log_success "n8n installed"
|
|
43
|
+
return 0
|
|
44
|
+
else
|
|
45
|
+
log_error "Failed to install n8n"
|
|
46
|
+
return 1
|
|
47
|
+
fi
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
install_n8n() {
|
|
51
|
+
if command -v n8n &>/dev/null; then
|
|
52
|
+
log_info "n8n is already installed"
|
|
53
|
+
return 0
|
|
54
|
+
fi
|
|
55
|
+
log_info "Installing n8n..."
|
|
56
|
+
loading "Installing n8n" _install_n8n_impl
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
_uninstall_n8n_impl() {
|
|
60
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
61
|
+
|
|
62
|
+
if npm uninstall -g n8n &>>"$LOG_FILE"; then
|
|
63
|
+
log_success "n8n uninstalled"
|
|
64
|
+
return 0
|
|
65
|
+
else
|
|
66
|
+
log_error "Failed to uninstall n8n"
|
|
67
|
+
return 1
|
|
68
|
+
fi
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
uninstall_n8n() {
|
|
72
|
+
if ! command -v n8n &>/dev/null; then
|
|
73
|
+
log_info "n8n is not installed"
|
|
74
|
+
return 0
|
|
75
|
+
fi
|
|
76
|
+
log_info "Uninstalling n8n..."
|
|
77
|
+
loading "Uninstalling n8n" _uninstall_n8n_impl
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
_update_n8n_impl() {
|
|
81
|
+
mkdir -p "$(dirname "$LOG_FILE")"
|
|
82
|
+
export GYP_DEFINES="android_ndk_path=''"
|
|
83
|
+
export ANDROID_API_LEVEL=24
|
|
84
|
+
|
|
85
|
+
if npm update -g n8n &>>"$LOG_FILE"; then
|
|
86
|
+
log_success "n8n updated"
|
|
87
|
+
return 0
|
|
88
|
+
else
|
|
89
|
+
log_error "Failed to update n8n"
|
|
90
|
+
return 1
|
|
91
|
+
fi
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
update_n8n() {
|
|
95
|
+
log_info "Updating n8n..."
|
|
96
|
+
loading "Updating n8n" _update_n8n_impl
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
reinstall_n8n() {
|
|
100
|
+
uninstall_n8n
|
|
101
|
+
install_n8n
|
|
102
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
import "@/utils/log"
|
|
4
|
+
|
|
5
|
+
LOG_FILE="$KARNEL_CACHE/install_db.log"
|
|
6
|
+
|
|
7
|
+
DB_TOOLS=(
|
|
8
|
+
"postgresql"
|
|
9
|
+
"mariadb"
|
|
10
|
+
"sqlite"
|
|
11
|
+
"mongodb"
|
|
12
|
+
"redis"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
for _tool in "${DB_TOOLS[@]}"; do
|
|
16
|
+
source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
|
|
17
|
+
done
|
|
18
|
+
unset _tool
|
|
19
|
+
|
|
20
|
+
_batch_db() {
|
|
21
|
+
local action="$1"
|
|
22
|
+
local action_past="$2"
|
|
23
|
+
local count_var="$3"
|
|
24
|
+
local count=0
|
|
25
|
+
local failed=0
|
|
26
|
+
local total=${#DB_TOOLS[@]}
|
|
27
|
+
local current=0
|
|
28
|
+
local func_name
|
|
29
|
+
|
|
30
|
+
progress_start "$total" "${action_past}ing DB tools..."
|
|
31
|
+
|
|
32
|
+
for tool in "${DB_TOOLS[@]}"; do
|
|
33
|
+
func_name="${action}_${tool//-/_}"
|
|
34
|
+
if declare -f "$func_name" &>/dev/null; then
|
|
35
|
+
loading "${action_past^}ing ${tool}" "$func_name"
|
|
36
|
+
case $? in 0) ((count++));; 1) ((failed++));; esac
|
|
37
|
+
fi
|
|
38
|
+
((current++))
|
|
39
|
+
progress_update "$current" "$total"
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
progress_done "$total"
|
|
43
|
+
eval "$count_var=$count"
|
|
44
|
+
return $failed
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
install_all_db_tools() {
|
|
48
|
+
_batch_db "install" "install" "installed_count"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
uninstall_all_db_tools() {
|
|
52
|
+
_batch_db "uninstall" "uninstall" "uninstalled_count"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
update_all_db_tools() {
|
|
56
|
+
_batch_db "update" "update" "updated_count"
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
reinstall_all_db_tools() {
|
|
60
|
+
_batch_db "reinstall" "reinstall" "reinstalled_count"
|
|
61
|
+
}
|