karnel-termux 4.17.42 → 4.17.43

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  <p align="center">
10
10
  <a href="https://github.com/israelmarques1024-dotcom/karnel-termux">
11
- <img src="https://img.shields.io/badge/version-4.17.42-0078D4?style=for-the-badge" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-4.17.43-0078D4?style=for-the-badge" alt="Version">
12
12
  </a>
13
13
  <a href="https://www.npmjs.com/package/karnel-termux">
14
14
  <img src="https://img.shields.io/npm/v/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm">
@@ -78,7 +78,7 @@ Why it's great:
78
78
  ### Via checksummed GitHub release (recommended)
79
79
 
80
80
  ```bash
81
- version=4.17.42
81
+ version=4.17.43
82
82
  tmpdir=$(mktemp -d) && trap 'rm -rf "$tmpdir"' EXIT
83
83
  base="https://github.com/israelmarques1024-dotcom/karnel-termux/releases/download/v$version"
84
84
  curl -fsSL "$base/karnel-termux-install.sh" -o "$tmpdir/karnel-termux-install.sh"
@@ -142,6 +142,7 @@ aliases, or options; use `karnel help` and the CLI reference for the full set.
142
142
  | `karnel upgrade` | Upgrade the framework (self-update) |
143
143
  | `karnel ia` | Manage AI agent sessions, install tools, show launchers |
144
144
  | `karnel search <query>` | Search tools and Brain memories |
145
+ | `karnel stats` | System overview: versions, modules, disk usage, tool counts |
145
146
  | `karnel status` | System health dashboard (disk, RAM, services, connectivity) |
146
147
  | `karnel start editor [port]` | Start code-server (VS Code in browser) |
147
148
  | `karnel start robin` | Start Robin OSINT (Tor + web UI) |
@@ -157,6 +158,10 @@ aliases, or options; use `karnel help` and the CLI reference for the full set.
157
158
  | `karnel deploy` | Run Vercel, Railway, Netlify, or Supabase CLI commands |
158
159
  | `karnel supabase` | Manage the Supabase CLI and remote-project helpers |
159
160
  | `karnel robin` | Manage the Robin OSINT service |
161
+ | `karnel backup` | Backup Termux configs and package metadata |
162
+ | `karnel restore` | Restore Termux from a backup |
163
+ | `karnel cleanup` | Clean caches, logs, and temp files |
164
+ | `karnel plugin` | Plugin manager — search, install, enable, disable, config |
160
165
  | `karnel --version` | Show installed version |
161
166
 
162
167
  ### Modules
@@ -1 +1 @@
1
- 14253a4bd8af3c1c2ae600f7bf4663e959a5d9ac
1
+ 3b64b17a6f9d7a93bcbfbcd7f0c86e858cd5195d
@@ -30,13 +30,7 @@ ia_help() {
30
30
 
31
31
  # List all AI sessions from known tools
32
32
  ia_sessions() {
33
- # $1 was historically `--all`; agent names are always shown now, so the
34
- # flag is accepted for back-compat and ignored.
35
- local show_all="${1:-0}"
36
- if [[ "$show_all" == "--all" ]]; then
37
- show_all=0
38
- fi
39
-
33
+ # $1 was historically `--all`; agent names are always shown now.
40
34
  mkdir -p "$IA_SESSIONS_DIR"
41
35
 
42
36
  local -a sessions=()
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+
6
+ stats_main() {
7
+ separator
8
+ box "◈ KARNEL STATS ◈"
9
+ separator
10
+ echo
11
+
12
+ _stats_version
13
+ echo
14
+ _stats_modules
15
+ echo
16
+ _stats_disk
17
+ echo
18
+ _stats_tools
19
+ echo
20
+ }
21
+
22
+ _stats_version() {
23
+ printf " ${D_CYAN}%-14s${NC} v%s\n" "Version:" "$KARNEL_VERSION"
24
+ printf " ${D_CYAN}%-14s${NC} %s\n" "KARNEL_PATH:" "$KARNEL_PATH"
25
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Shell:" "${SHELL##*/}"
26
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Node:" "$(node -v 2>/dev/null || echo 'not installed')"
27
+ printf " ${D_CYAN}%-14s${NC} %s\n" "npm:" "$(npm -v 2>/dev/null || echo 'not installed')"
28
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Python:" "$(python3 -V 2>/dev/null | awk '{print $2}' || echo 'not installed')"
29
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Go:" "$(go version 2>/dev/null | awk '{print $3}' || echo 'not installed')"
30
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Rust:" "$(rustc --version 2>/dev/null | awk '{print $2}' || echo 'not installed')"
31
+ }
32
+
33
+ _stats_modules() {
34
+ log_info "Installed Modules"
35
+ echo
36
+ local -a modules=(ai auto db deploy dev editor games lang network npm osint plugin security shell ui utils voice)
37
+ local installed=0
38
+ local not_installed=0
39
+ local status
40
+
41
+ for mod in "${modules[@]}"; do
42
+ local marker="${KARNEL_DATA:-$HOME/.local/share/karnel-data}/${mod}/.installed"
43
+ if [[ -f "$marker" ]]; then
44
+ status="${GREEN}installed${NC}"
45
+ ((installed++))
46
+ else
47
+ status="${D_RED}—${NC}"
48
+ ((not_installed++))
49
+ fi
50
+ printf " %-12s %b\n" "$mod" "$status"
51
+ done
52
+ echo
53
+ printf " ${D_CYAN}Total:${NC} %d installed, %d not installed\n" "$installed" "$not_installed"
54
+ }
55
+
56
+ _stats_disk() {
57
+ log_info "Disk Usage"
58
+ echo
59
+ local karnel_size data_size cache_size config_size
60
+
61
+ karnel_size=$(du -sh "$KARNEL_PATH/.." 2>/dev/null | awk '{print $1}')
62
+ data_size=$(du -sh "${KARNEL_DATA:-$HOME/.local/share/karnel-data}" 2>/dev/null | awk '{print $1}')
63
+ cache_size=$(du -sh "$KARNEL_CACHE" 2>/dev/null | awk '{print $1}')
64
+ config_size=$(du -sh "${KARNEL_CONFIG:-$HOME/.config/karnel}" 2>/dev/null | awk '{print $1}')
65
+
66
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Framework:" "${karnel_size:-0}"
67
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Data:" "${data_size:-0}"
68
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Cache:" "${cache_size:-0}"
69
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Config:" "${config_size:-0}"
70
+
71
+ local total_storage
72
+ total_storage=$(du -sh "$KARNEL_PATH/.." "${KARNEL_DATA:-$HOME/.local/share/karnel-data}" "$KARNEL_CACHE" 2>/dev/null | tail -1 | awk '{print $1}')
73
+ echo
74
+ printf " ${D_CYAN}%-14s${NC} %s\n" "Total:" "${total_storage:-unknown}"
75
+ }
76
+
77
+ _stats_tools() {
78
+ log_info "Tool Counts"
79
+ echo
80
+ local -A tool_counts=(
81
+ [ai]=0 [auto]=0 [db]=0 [deploy]=0 [dev]=0 [editor]=0
82
+ [games]=0 [lang]=0 [network]=0 [npm]=0 [osint]=0
83
+ [plugin]=0 [security]=0 [shell]=0 [ui]=0 [utils]=0 [voice]=0
84
+ )
85
+
86
+ local total=0
87
+ for mod in "${!tool_counts[@]}"; do
88
+ local tools_dir="$KARNEL_PATH/tools/$mod"
89
+ if [[ -d "$tools_dir" ]]; then
90
+ local count
91
+ count=$(find "$tools_dir" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | wc -l)
92
+ tool_counts[$mod]=$count
93
+ ((total += count))
94
+ fi
95
+ done
96
+
97
+ for mod in ai auto db deploy dev editor games lang network npm osint plugin security shell ui utils voice; do
98
+ local count=${tool_counts[$mod]:-0}
99
+ [[ "$count" -gt 0 ]] && printf " %-12s %d tools\n" "$mod" "$count"
100
+ done
101
+ echo
102
+ printf " ${D_CYAN}%-14s${NC} %d tools across %d modules\n" "Total:" "$total" "${#tool_counts[@]}"
103
+ }
@@ -115,6 +115,7 @@ karnel_help() {
115
115
  printf " ${D_CYAN}%-18s${NC} %s\n" "search <query>" "Search across all tools and memories"
116
116
  printf " ${D_CYAN}%-18s${NC} %s\n" "show <module> [--tool]" "Show README/docs for a tool"
117
117
  printf " ${D_CYAN}%-18s${NC} %s\n" "start [editor,robin]" "Start services (code-server, etc.)"
118
+ printf " ${D_CYAN}%-18s${NC} %s\n" "stats" "System overview: modules, tools, disk usage"
118
119
  printf " ${D_CYAN}%-18s${NC} %s\n" "status" "Quick system overview"
119
120
  printf " ${D_CYAN}%-18s${NC} %s\n" "supabase [doctor,types,migrate,link,remote,remote-status,install,uninstall]" "Supabase CLI (types, migrate, functions, secrets)"
120
121
  printf " ${D_CYAN}%-18s${NC} %s\n" "uninstall <module>" "Remove installed modules"
@@ -4,13 +4,8 @@ import "@/utils/log"
4
4
  import "@/utils/colors"
5
5
 
6
6
  TERMUX_DIR="$HOME/.termux"
7
- TERMUX_ASSETS_DIR="$(dirname "$KARNEL_PATH")/assets"
8
7
  LOG_FILE="$KARNEL_CACHE/install_ui.log"
9
8
 
10
- install_ui() {
11
- setup_ui
12
- }
13
-
14
9
  setup_ui() {
15
10
  separator
16
11
  box "Configuring Termux UI"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karnel-termux",
3
- "version": "4.17.42",
3
+ "version": "4.17.43",
4
4
  "description": "Modular Dev Environment for Termux — install languages, databases, AI agents, editors, and more with one command",
5
5
  "bin": {
6
6
  "karnel": "karnel/bin/karnel"
@@ -35,7 +35,7 @@ _karnel_completions() {
35
35
  local cur prev words cword
36
36
  _init_completion || return
37
37
 
38
- local commands="agent backup brain cleanup deploy doctor env help ia init install list open pg plugin reinstall restore robin search show start status supabase uninstall update upgrade version voice"
38
+ local commands="agent backup brain cleanup deploy doctor env help ia init install list open pg plugin reinstall restore robin search show start stats status supabase uninstall update upgrade version voice"
39
39
  local modules="ai auto db deploy dev editor games lang network npm osint plugin security shell ui utils voice"
40
40
  local install_targets="$modules supabase"
41
41
  local update_targets="$modules supabase karnel"
@@ -28,6 +28,7 @@ _karnel_commands() {
28
28
  'search:Search tools and memories'
29
29
  'show:Show tool documentation'
30
30
  'start:Start a service'
31
+ 'stats:System overview with versions, modules, and tool counts'
31
32
  'status:Show a quick system overview'
32
33
  'supabase:Manage Supabase CLI remote workflows'
33
34
  'uninstall:Remove modules and tools'