karnel-termux 4.7.7 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +39 -4
  2. package/karnel/cli/commands/backup.sh +8 -0
  3. package/karnel/cli/commands/doctor/system.sh +2 -0
  4. package/karnel/cli/commands/doctor.sh +8 -0
  5. package/karnel/cli/commands/install.sh +139 -84
  6. package/karnel/cli/commands/list.sh +32 -0
  7. package/karnel/cli/commands/open.sh +10 -6
  8. package/karnel/cli/commands/reinstall.sh +11 -0
  9. package/karnel/cli/commands/robin.sh +656 -0
  10. package/karnel/cli/commands/show.sh +1 -0
  11. package/karnel/cli/commands/start.sh +5 -0
  12. package/karnel/cli/commands/status.sh +11 -0
  13. package/karnel/cli/commands/uninstall.sh +9 -0
  14. package/karnel/cli/commands/update.sh +9 -0
  15. package/karnel/cli/commands/version.sh +2 -0
  16. package/karnel/cli/karnel.sh +35 -25
  17. package/karnel/modules/dev.sh +19 -46
  18. package/karnel/modules/osint.sh +123 -0
  19. package/karnel/tools/ai/crush/install.sh +1 -1
  20. package/karnel/tools/ai/omni-route/install.sh +1 -1
  21. package/karnel/tools/deploy/railway/install.sh +1 -1
  22. package/karnel/tools/dev/all.sh +45 -2
  23. package/karnel/tools/dev/fzf/install.sh +36 -9
  24. package/karnel/tools/npm/turbopack/install.sh +2 -0
  25. package/karnel/tools/osint/all.sh +65 -0
  26. package/karnel/tools/osint/robin/README.md +99 -0
  27. package/karnel/tools/osint/robin/common.sh +258 -0
  28. package/karnel/tools/osint/robin/install.sh +548 -0
  29. package/karnel/tools/osint/robin/requirements-termux.txt +33 -0
  30. package/karnel/utils/env.sh +16 -2
  31. package/karnel/utils/tools.sh +9 -2
  32. package/package.json +6 -1
  33. package/scripts/check-package.js +45 -0
  34. package/scripts/completion.bash +8 -3
  35. package/scripts/completion.zsh +8 -1
  36. package/karnel/tools/dev/applaunch/__pycache__/applaunch.cpython-314.pyc +0 -0
  37. package/karnel/tools/dev/fconv/__pycache__/fconv.cpython-314.pyc +0 -0
  38. package/karnel/tools/dev/filecheck/__pycache__/filecheck.cpython-314.pyc +0 -0
  39. package/karnel/tools/dev/notes/__pycache__/notes.cpython-314.pyc +0 -0
  40. package/karnel/tools/dev/passman/__pycache__/passman.cpython-314.pyc +0 -0
  41. package/karnel/tools/dev/splash/__pycache__/splash.cpython-314.pyc +0 -0
  42. package/karnel/tools/dev/websites/__pycache__/websites.cpython-314.pyc +0 -0
  43. package/karnel/tools/games/arcade/__pycache__/arcade.cpython-314.pyc +0 -0
  44. package/karnel/tools/games/buzz/__pycache__/buzz.cpython-314.pyc +0 -0
  45. package/karnel/tools/games/ctfgod/__pycache__/ctfgod.cpython-314.pyc +0 -0
  46. package/karnel/tools/games/detective/__pycache__/detective.cpython-314.pyc +0 -0
  47. package/karnel/tools/games/pet-friends/__pycache__/pet-friends.cpython-314.pyc +0 -0
  48. package/karnel/tools/games/tamagotchi/__pycache__/tamagotchi.cpython-314.pyc +0 -0
  49. package/karnel/tools/games/terminal-arcade/__pycache__/terminal-arcade.cpython-314.pyc +0 -0
@@ -24,6 +24,7 @@ uninstall_main() {
24
24
  list_item "shell - Remove ZSH + Oh My Zsh"
25
25
  list_item "ui - Restore Termux UI to default"
26
26
  list_item "auto - Remove automation tools"
27
+ list_item "osint - Remove OSINT tools"
27
28
  echo
28
29
  log_info "Uninstall specific tools with flags:"
29
30
  echo
@@ -106,6 +107,10 @@ _uninstall_full_module() {
106
107
  import "@/modules/auto"
107
108
  uninstall_auto
108
109
  ;;
110
+ osint)
111
+ import "@/modules/osint"
112
+ uninstall_osint
113
+ ;;
109
114
  *)
110
115
  log_warn "Unknown uninstall target: $target"
111
116
  echo "Run 'karnel uninstall' to see available targets"
@@ -116,5 +121,9 @@ _uninstall_full_module() {
116
121
  _uninstall_specific_tools() {
117
122
  local module="$1"
118
123
  shift
124
+ if [[ "$module" == "osint" ]]; then
125
+ import "@/tools/osint/robin/common"
126
+ _robin_print_disclaimer
127
+ fi
119
128
  _batch_tool_action "$module" "uninstall" "$@"
120
129
  }
@@ -25,6 +25,7 @@ update_main() {
25
25
  list_item "shell - Update ZSH plugins"
26
26
  list_item "ui - Update Termux UI"
27
27
  list_item "auto - Update Automation Tools"
28
+ list_item "osint - Update OSINT tools"
28
29
  echo
29
30
  log_info "Update specific tools with flags:"
30
31
  echo
@@ -112,6 +113,10 @@ _update_full_module() {
112
113
  import "@/tools/games/all"
113
114
  update_all_games
114
115
  ;;
116
+ osint)
117
+ import "@/modules/osint"
118
+ update_osint
119
+ ;;
115
120
  *)
116
121
  log_warn "Unknown update target: $target"
117
122
  echo "Run 'karnel update' to see available targets"
@@ -123,6 +128,10 @@ _update_full_module() {
123
128
  _update_specific_tools() {
124
129
  local module="$1"
125
130
  shift
131
+ if [[ "$module" == "osint" ]]; then
132
+ import "@/tools/osint/robin/common"
133
+ _robin_print_disclaimer
134
+ fi
126
135
  _batch_tool_action "$module" "update" "$@"
127
136
  }
128
137
 
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env bash
2
+
1
3
  version_main() {
2
4
  echo "$KARNEL_VERSION"
3
5
  }
@@ -57,29 +57,33 @@ karnel_help() {
57
57
  separator_section "Available Commands"
58
58
  echo
59
59
  printf " ${D_CYAN}%-12s${NC} %s\n" "--version" "Show current version"
60
- printf " ${D_CYAN}%-12s${NC} %s\n" "brain" "Second brain — save and search memories"
61
60
  printf " ${D_CYAN}%-12s${NC} %s\n" "backup" "Backup all Termux configs + tools"
62
- printf " ${D_CYAN}%-12s${NC} %s\n" "restore" "Restore from a backup"
63
- printf " ${D_CYAN}%-12s${NC} %s\n" "search" "Search tools and memories"
61
+ printf " ${D_CYAN}%-12s${NC} %s\n" "brain" "Second brain — save, search, and query memories"
64
62
  printf " ${D_CYAN}%-12s${NC} %s\n" "cleanup" "Clean caches, logs, and temp files"
63
+ printf " ${D_CYAN}%-12s${NC} %s\n" "deploy" "Deploy projects to Vercel, Railway, Netlify"
64
+ printf " ${D_CYAN}%-12s${NC} %s\n" "doctor" "Run diagnostics (termux/code)"
65
+ printf " ${D_CYAN}%-12s${NC} %s\n" "doctor termux" "Full Termux environment diagnostics"
66
+ printf " ${D_CYAN}%-12s${NC} %s\n" "doctor code" "Analyze project code structure"
65
67
  printf " ${D_CYAN}%-12s${NC} %s\n" "env" "Manage environment variables"
68
+ printf " ${D_CYAN}%-12s${NC} %s\n" "help" "Show this help screen"
69
+ printf " ${D_CYAN}%-12s${NC} %s\n" "ia" "AI agent manager — sessions, install, routes"
70
+ printf " ${D_CYAN}%-12s${NC} %s\n" "init" "Scaffold projects (Next, React, Nest, etc.)"
66
71
  printf " ${D_CYAN}%-12s${NC} %s\n" "install" "Install modules and packages"
67
- printf " ${D_CYAN}%-12s${NC} %s\n" "show" "Show tool documentation"
68
- printf " ${D_CYAN}%-12s${NC} %s\n" "update" "Update modules or framework"
69
- printf " ${D_CYAN}%-12s${NC} %s\n" "uninstall" "Remove installed modules"
70
- printf " ${D_CYAN}%-12s${NC} %s\n" "reinstall" "Uninstall + install modules"
71
- printf " ${D_CYAN}%-12s${NC} %s\n" "open" "Open documentation in browser"
72
- printf " ${D_CYAN}%-12s${NC} %s\n" "list" "List available tools in modules"
72
+ printf " ${D_CYAN}%-12s${NC} %s\n" "list" "List available tools in a module"
73
+ printf " ${D_CYAN}%-12s${NC} %s\n" "open" "Open docs in browser for a module"
73
74
  printf " ${D_CYAN}%-12s${NC} %s\n" "pg" "PostgreSQL database manager"
75
+ printf " ${D_CYAN}%-12s${NC} %s\n" "reinstall" "Uninstall + install a module"
76
+ printf " ${D_CYAN}%-12s${NC} %s\n" "restore" "Restore Termux from a backup"
77
+ printf " ${D_CYAN}%-12s${NC} %s\n" "robin" "Dark Web OSINT tool (Tor + LLM)"
78
+ printf " ${D_CYAN}%-12s${NC} %s\n" "search" "Search across all tools and memories"
79
+ printf " ${D_CYAN}%-12s${NC} %s\n" "show" "Show README/docs for a tool"
80
+ printf " ${D_CYAN}%-12s${NC} %s\n" "start" "Start services (code-server, etc.)"
74
81
  printf " ${D_CYAN}%-12s${NC} %s\n" "status" "Quick system overview"
75
- printf " ${D_CYAN}%-12s${NC} %s\n" "doctor" "Show doctor subcommands"
76
- printf " ${D_CYAN}%-12s${NC} %s\n" "doctor termux" "Full Termux environment diagnostics"
77
- printf " ${D_CYAN}%-12s${NC} %s\n" "doctor code" "Analyze project code structure"
78
- printf " ${D_CYAN}%-12s${NC} %s\n" "upgrade" "Upgrade Karnel framework"
79
- printf " ${D_CYAN}%-12s${NC} %s\n" "init" "Configure existing projects"
80
- printf " ${D_CYAN}%-12s${NC} %s\n" "start" "Start services (editor, etc.)"
82
+ printf " ${D_CYAN}%-12s${NC} %s\n" "uninstall" "Remove installed modules"
83
+ printf " ${D_CYAN}%-12s${NC} %s\n" "update" "Update modules or framework"
84
+ printf " ${D_CYAN}%-12s${NC} %s\n" "upgrade" "Upgrade Karnel framework itself"
85
+ printf " ${D_CYAN}%-12s${NC} %s\n" "version" "Show current version"
81
86
  printf " ${D_CYAN}%-12s${NC} %s\n" "voice" "Speech-to-agent via microphone"
82
- printf " ${D_CYAN}%-12s${NC} %s\n" "ia" "AI agent manager — sessions, install, routes"
83
87
  echo
84
88
  separator_section "Quick Start"
85
89
  echo
@@ -93,17 +97,19 @@ karnel_help() {
93
97
  echo
94
98
  log_info "Install, update, reinstall, uninstall, list, show or open:"
95
99
  echo
96
- printf " ${D_GREEN}%-10s${NC} %s\n" "lang" "Node, Python, Perl, PHP, Rust, C/C++, Go"
97
- printf " ${D_GREEN}%-10s${NC} %s\n" "db" "PostgreSQL, MariaDB, SQLite, MongoDB"
98
100
  printf " ${D_GREEN}%-10s${NC} %s\n" "ai" "OpenCode, Gentle AI, Claude Code, etc."
99
- printf " ${D_GREEN}%-10s${NC} %s\n" "editor" "code-server (VS Code in browser)"
101
+ printf " ${D_GREEN}%-10s${NC} %s\n" "auto" "Automation Tools (n8n)"
102
+ printf " ${D_GREEN}%-10s${NC} %s\n" "db" "PostgreSQL, MariaDB, SQLite, MongoDB"
103
+ printf " ${D_GREEN}%-10s${NC} %s\n" "deploy" "Vercel, Railway, Netlify CLIs"
100
104
  printf " ${D_GREEN}%-10s${NC} %s\n" "dev" "GitHub CLI, wget, curl, fzf, etc."
105
+ printf " ${D_GREEN}%-10s${NC} %s\n" "editor" "code-server (VS Code in browser)"
106
+ printf " ${D_GREEN}%-10s${NC} %s\n" "games" "Buzz, CTF God, Detective, Tamagotchi, etc."
107
+ printf " ${D_GREEN}%-10s${NC} %s\n" "lang" "Node, Python, Perl, PHP, Rust, C/C++, Go"
101
108
  printf " ${D_GREEN}%-10s${NC} %s\n" "npm" "Node.js global npm packages"
109
+ printf " ${D_GREEN}%-10s${NC} %s\n" "osint" "OSINT Tools (Robin — Dark Web + LLM)"
102
110
  printf " ${D_GREEN}%-10s${NC} %s\n" "shell" "ZSH + Oh My Zsh + 10 plugins"
103
111
  printf " ${D_GREEN}%-10s${NC} %s\n" "ui" "Font, Cursor, Extra-keys, Banner"
104
- printf " ${D_GREEN}%-10s${NC} %s\n" "auto" "Automation Tools (n8n)"
105
- printf " ${D_GREEN}%-10s${NC} %s\n" "deploy" "Vercel, Railway, Netlify CLIs"
106
- printf " ${D_GREEN}%-10s${NC} %s\n" "games" "Buzz, CTF God, Detective, Tamagotchi, etc."
112
+ printf " ${D_GREEN}%-10s${NC} %s\n" "voice" "Speech-to-agent via microphone"
107
113
 
108
114
  echo
109
115
  separator_section "Help"
@@ -408,14 +414,18 @@ _tui_install_menu() {
408
414
  local target
409
415
  target=$(_dialog_menu "Install Modules" "Select target module to install:" \
410
416
  "ai" "AI Tools (OpenCode, Claude, Ollama, etc.)" \
417
+ "auto" "Automation Tools (n8n)" \
411
418
  "db" "Databases (PostgreSQL, MariaDB, SQLite, MongoDB)" \
412
- "lang" "Programming Languages (Node, Python, Go, Rust, etc.)" \
413
- "editor" "Code Editor (code-server)" \
419
+ "deploy" "Deploy CLIs (Vercel, Railway, Netlify)" \
414
420
  "dev" "Development Tools (GitHub CLI, fzf, bat, etc.)" \
421
+ "editor" "Code Editor (code-server)" \
422
+ "games" "Games (Buzz, CTF God, Detective, etc.)" \
423
+ "lang" "Programming Languages (Node, Python, Go, Rust, etc.)" \
415
424
  "npm" "Node.js Global npm Packages" \
425
+ "osint" "OSINT Tools (Robin — Dark Web + LLM)" \
416
426
  "shell" "ZSH + Oh My Zsh + Plugins" \
417
427
  "ui" "Termux UI (font, cursor, extra-keys, banner)" \
418
- "auto" "Automation Tools (n8n)" \
428
+ "voice" "Speech-to-Agent via microphone" \
419
429
  "back" "Back to Main Menu")
420
430
 
421
431
  local exit_status=$?
@@ -24,28 +24,7 @@ install_dev() {
24
24
  fi
25
25
  separator
26
26
  echo
27
- list_item "GitHub CLI"
28
- list_item "Wget"
29
- list_item "Curl"
30
- list_item "LSD (ls replacement)"
31
- list_item "Bat (cat replacement)"
32
- list_item "Proot (chroot alternative)"
33
- list_item "Ncurses Utils"
34
- list_item "Tmate (terminal sharing)"
35
- list_item "Cloudflared (Cloudflare Tunnel)"
36
- list_item "Translate Shell"
37
- list_item "html2text (HTML to text converter)"
38
- list_item "jq (JSON processor)"
39
- list_item "bc (calculator)"
40
- list_item "Tree (directory listing)"
41
- list_item "Fzf (fuzzy finder)"
42
- list_item "ImageMagick (image manipulation)"
43
- list_item "Shfmt (shell script formatter)"
44
- list_item "Make (build automation)"
45
- list_item "Udocker (container management)"
46
- list_item "Snyk (security scanner)"
47
- list_item "httptmux (interactive API client)"
48
- list_item "Zork (text adventure games I, II, III)"
27
+ _show_dev_summary
49
28
  echo
50
29
  }
51
30
 
@@ -122,33 +101,27 @@ reinstall_dev() {
122
101
  fi
123
102
  separator
124
103
  echo
125
- list_item "GitHub CLI"
126
- list_item "Wget"
127
- list_item "Curl"
128
- list_item "LSD (ls replacement)"
129
- list_item "Bat (cat replacement)"
130
- list_item "Proot (chroot alternative)"
131
- list_item "Ncurses Utils"
132
- list_item "Tmate (terminal sharing)"
133
- list_item "Cloudflared (Cloudflare Tunnel)"
134
- list_item "Translate Shell"
135
- list_item "html2text (HTML to text converter)"
136
- list_item "jq (JSON processor)"
137
- list_item "bc (calculator)"
138
- list_item "Tree (directory listing)"
139
- list_item "Fzf (fuzzy finder)"
140
- list_item "ImageMagick (image manipulation)"
141
- list_item "Shfmt (shell script formatter)"
142
- list_item "Make (build automation)"
143
- list_item "Udocker (container management)"
144
- list_item "Snyk (security scanner)"
145
- list_item "httptmux (interactive API client)"
146
- list_item "Zork (text adventure games I, II, III)"
147
- echo
104
+ _show_dev_summary
105
+ echo
148
106
  }
149
107
 
150
108
  _reinstall_dev_wrapper() {
151
109
  import "@/tools/dev/all"
152
110
  reinstall_all_dev
153
111
  return $?
154
- }
112
+ }
113
+
114
+ _show_dev_summary() {
115
+ local idx=0
116
+ for tool in "${TOOLS_PACKAGES[@]}"; do
117
+ local display="${TOOLS_DISPLAY[$idx]:-$tool}"
118
+ local result="${_INSTALL_RESULTS[$tool]:-}"
119
+ case "$result" in
120
+ 0) list_item_check success "$display" ;;
121
+ 2) list_item_check pending "$display" ;;
122
+ 1) list_item_check fail "$display" ;;
123
+ *) list_item "$display" ;;
124
+ esac
125
+ ((idx++))
126
+ done
127
+ }
@@ -0,0 +1,123 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+ import "@/utils/colors"
5
+ import "@/tools/osint/robin/common"
6
+
7
+ LOG_FILE="$KARNEL_CACHE/install_osint.log"
8
+
9
+ install_osint() {
10
+ _robin_print_disclaimer
11
+ separator
12
+ box "Installing OSINT Tools"
13
+ separator
14
+ echo
15
+
16
+ log_info "Installing OSINT tools..."
17
+ echo
18
+ mkdir -p "$(dirname "$LOG_FILE")"
19
+
20
+ local rc=0
21
+ _install_osint_wrapper || rc=$?
22
+ if [ "$rc" -eq 0 ]; then
23
+ log_success "OSINT tools installed successfully"
24
+ else
25
+ log_warn "$rc OSINT tool(s) failed to install"
26
+ fi
27
+ separator
28
+ echo
29
+ list_item "Robin — AI-powered Dark Web OSINT tool (Tor + LLM)"
30
+ echo
31
+ return "$rc"
32
+ }
33
+
34
+ _install_osint_wrapper() {
35
+ import "@/tools/osint/all"
36
+ install_all_osint
37
+ return $?
38
+ }
39
+
40
+ uninstall_osint() {
41
+ _robin_print_disclaimer
42
+ if [[ ! -d "$KARNEL_TOOLS/osint" ]]; then
43
+ log_info "OSINT tools are not installed"
44
+ return 0
45
+ fi
46
+ separator
47
+ box "Uninstalling OSINT Tools"
48
+ separator
49
+ echo
50
+
51
+ log_info "Uninstalling OSINT tools..."
52
+
53
+ local rc=0
54
+ _uninstall_osint_wrapper || rc=$?
55
+ if [ "$rc" -eq 0 ]; then
56
+ log_success "OSINT tools uninstalled"
57
+ else
58
+ log_warn "$rc OSINT tool(s) failed to uninstall"
59
+ fi
60
+ return "$rc"
61
+ }
62
+
63
+ _uninstall_osint_wrapper() {
64
+ import "@/tools/osint/all"
65
+ uninstall_all_osint
66
+ return $?
67
+ }
68
+
69
+ update_osint() {
70
+ _robin_print_disclaimer
71
+ separator
72
+ box "Updating OSINT Tools"
73
+ separator
74
+ echo
75
+
76
+ log_info "Updating OSINT tools..."
77
+
78
+ local rc=0
79
+ _update_osint_wrapper || rc=$?
80
+ if [ "$rc" -eq 0 ]; then
81
+ log_success "OSINT tools updated"
82
+ else
83
+ log_warn "$rc OSINT tool(s) failed to update"
84
+ fi
85
+ return "$rc"
86
+ }
87
+
88
+ _update_osint_wrapper() {
89
+ import "@/tools/osint/all"
90
+ update_all_osint
91
+ return $?
92
+ }
93
+
94
+ reinstall_osint() {
95
+ _robin_print_disclaimer
96
+ separator
97
+ box "Reinstalling OSINT Tools"
98
+ separator
99
+ echo
100
+
101
+ log_info "Reinstalling OSINT tools..."
102
+ echo
103
+ mkdir -p "$(dirname "$LOG_FILE")"
104
+
105
+ local rc=0
106
+ _reinstall_osint_wrapper || rc=$?
107
+ if [ "$rc" -eq 0 ]; then
108
+ log_success "OSINT tools reinstalled successfully"
109
+ else
110
+ log_warn "$rc OSINT tool(s) failed to reinstall"
111
+ fi
112
+ separator
113
+ echo
114
+ list_item "Robin — AI-powered Dark Web OSINT tool (Tor + LLM)"
115
+ echo
116
+ return "$rc"
117
+ }
118
+
119
+ _reinstall_osint_wrapper() {
120
+ import "@/tools/osint/all"
121
+ reinstall_all_osint
122
+ return $?
123
+ }
@@ -68,7 +68,7 @@ uninstall_crush() {
68
68
 
69
69
  log_info "Uninstalling Crush..."
70
70
  rm -f "$PREFIX/bin/crush"
71
- npm uninstall -g @charmland/crush &>>"$LOG_FILE" 2>/dev/null
71
+ npm uninstall -g @charmland/crush &>>"$LOG_FILE"
72
72
  log_success "Crush uninstalled"
73
73
  return 0
74
74
  }
@@ -134,7 +134,7 @@ uninstall_omni_route() {
134
134
  fi
135
135
 
136
136
  log_info "Uninstalling omniRoute..."
137
- npm uninstall -g karnelroute 2>>"$LOG_FILE" 2>/dev/null
137
+ npm uninstall -g karnelroute &>>"$LOG_FILE"
138
138
  rm -rf "$HOME/.karnel/packages/karnelroute"
139
139
  rm -f "$PREFIX/bin/karnelroute" "$PREFIX/bin/omni-route"
140
140
  log_success "omniRoute uninstalled"
@@ -83,7 +83,7 @@ install_railway() {
83
83
 
84
84
  uninstall_railway() {
85
85
  log_info "Uninstalling Railway CLI..."
86
- npm uninstall -g @railway/cli &>>"$LOG_FILE" 2>/dev/null || true
86
+ npm uninstall -g @railway/cli &>>"$LOG_FILE" || true
87
87
  rm -f "$PREFIX/bin/railway" 2>/dev/null
88
88
  rm -rf "$RAILWAY_DATA_DIR" 2>/dev/null
89
89
  log_success "Railway CLI uninstalled"
@@ -39,11 +39,49 @@ TOOLS_PACKAGES=(
39
39
  "splash"
40
40
  )
41
41
 
42
+ TOOLS_DISPLAY=(
43
+ "GitHub CLI"
44
+ "Wget"
45
+ "Curl"
46
+ "LSD (ls replacement)"
47
+ "Bat (cat replacement)"
48
+ "Proot (chroot alternative)"
49
+ "Ncurses Utils"
50
+ "Tmate (terminal sharing)"
51
+ "OpenSSH"
52
+ "Tmux"
53
+ "Cloudflared (Cloudflare Tunnel)"
54
+ "Translate Shell"
55
+ "html2text (HTML to text converter)"
56
+ "jq (JSON processor)"
57
+ "bc (calculator)"
58
+ "Tree (directory listing)"
59
+ "Fzf (fuzzy finder)"
60
+ "ImageMagick (image manipulation)"
61
+ "Shfmt (shell script formatter)"
62
+ "Make (build automation)"
63
+ "Udocker (container management)"
64
+ "Snyk (security scanner)"
65
+ "httptmux (interactive API client)"
66
+ "Zork (text adventure games I, II, III)"
67
+ "Fconv (file converter)"
68
+ "Filecheck (file integrity)"
69
+ "Websites (project scaffold)"
70
+ "Notes (terminal notes)"
71
+ "Treex (tree explorer)"
72
+ "Passman (password manager)"
73
+ "Applaunch (app launcher)"
74
+ "Splash (startup splash)"
75
+ )
76
+
42
77
  for _tool in "${TOOLS_PACKAGES[@]}"; do
43
- source "$(dirname "$BASH_SOURCE")/$_tool/install.sh"
78
+ # shellcheck disable=SC1090
79
+ source "$(dirname "${BASH_SOURCE[0]}")/$_tool/install.sh"
44
80
  done
45
81
  unset _tool
46
82
 
83
+ declare -gA _INSTALL_RESULTS
84
+
47
85
  _batch_dev() {
48
86
  local action="$1"
49
87
  local action_past="$2"
@@ -54,13 +92,18 @@ _batch_dev() {
54
92
  local current=0
55
93
  local func_name
56
94
 
95
+ _INSTALL_RESULTS=()
57
96
  progress_start "$total" "${action_past}ing dev tools..."
58
97
 
59
98
  for tool in "${TOOLS_PACKAGES[@]}"; do
60
99
  func_name="${action}_${tool//-/_}"
61
100
  if declare -f "$func_name" &>/dev/null; then
62
101
  loading "${action_past^}ing ${tool}" "$func_name"
63
- case $? in 0) ((count++));; 1) ((failed++));; esac
102
+ _INSTALL_RESULTS["$tool"]=$?
103
+ case ${_INSTALL_RESULTS["$tool"]} in
104
+ 0) ((count++));;
105
+ 1) ((failed++));;
106
+ esac
64
107
  fi
65
108
  ((current++))
66
109
  progress_update "$current" "$total"
@@ -41,18 +41,45 @@ _update_fzf_pkg_impl() {
41
41
  return 0
42
42
  }
43
43
 
44
+ _fix_fzf_zshrc() {
45
+ local zshrc="$HOME/.zshrc"
46
+ [[ -f "$zshrc" ]] || return 0
47
+
48
+ if ! grep -qs "fzf/key-bindings" "$zshrc" 2>/dev/null; then
49
+ return 0
50
+ fi
51
+
52
+ if grep -qs "autoload.*up-line-or-beginning-search" "$zshrc" 2>/dev/null; then
53
+ return 0
54
+ fi
55
+
56
+ local tmpfile
57
+ tmpfile=$(mktemp)
58
+ while IFS= read -r line; do
59
+ if [[ "$line" == *"fzf/key-bindings"* ]]; then
60
+ echo "# Ensure up-line-or-beginning-search is available for fzf" >> "$tmpfile"
61
+ echo "autoload -Uz up-line-or-beginning-search 2>/dev/null" >> "$tmpfile"
62
+ echo "zle -N up-line-or-beginning-search 2>/dev/null" >> "$tmpfile"
63
+ fi
64
+ echo "$line" >> "$tmpfile"
65
+ done < "$zshrc"
66
+ mv "$tmpfile" "$zshrc"
67
+ log_info "Fixed zsh up-line-or-beginning-search widget loading for fzf"
68
+ }
69
+
44
70
  install_fzf() {
45
- if command -v fzf &>/dev/null; then
46
- log_info "Fzf is already installed"
47
- return 2
48
- fi
49
- log_info "Installing Fzf..."
71
+ if command -v fzf &>/dev/null; then
72
+ log_info "Fzf is already installed"
73
+ return 2
74
+ fi
75
+ log_info "Installing Fzf..."
50
76
 
51
- mkdir -p "$(dirname "$LOG_FILE")"
77
+ mkdir -p "$(dirname "$LOG_FILE")"
52
78
 
53
- _install_fzf_pkg || return 1
54
- log_success "Fzf installed"
55
- return 0
79
+ _install_fzf_pkg || return 1
80
+ _fix_fzf_zshrc
81
+ log_success "Fzf installed"
82
+ return 0
56
83
  }
57
84
 
58
85
  uninstall_fzf() {
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env bash
2
+
1
3
  import "@/utils/log"
2
4
  import "@/utils/colors"
3
5
 
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env bash
2
+
3
+ import "@/utils/log"
4
+
5
+ OSINT_TOOLS=(
6
+ "robin"
7
+ )
8
+
9
+ for _tool in "${OSINT_TOOLS[@]}"; do
10
+ # shellcheck disable=SC1090
11
+ source "$(dirname "${BASH_SOURCE[0]}")/$_tool/install.sh"
12
+ done
13
+ unset _tool
14
+
15
+ _batch_osint() {
16
+ local action="$1"
17
+ local action_past="$2"
18
+ local count_var="$3"
19
+ local count=0
20
+ local failed=0
21
+ local skipped=0
22
+ local total=${#OSINT_TOOLS[@]}
23
+ local current=0
24
+ local func_name
25
+
26
+ progress_start "$total" "${action_past}ing OSINT tools..."
27
+
28
+ for tool in "${OSINT_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
33
+ 0) ((count++)) ;;
34
+ 2) ((skipped++)) ;;
35
+ *) ((failed++)) ;;
36
+ esac
37
+ else
38
+ log_error "Missing OSINT action: $func_name"
39
+ ((failed++))
40
+ fi
41
+ ((current++))
42
+ progress_update "$current" "$total"
43
+ done
44
+
45
+ progress_done "$total"
46
+ eval "$count_var=$count"
47
+ (( skipped > 0 )) && log_info "$skipped OSINT tool(s) already in the requested state"
48
+ (( failed == 0 ))
49
+ }
50
+
51
+ install_all_osint() {
52
+ _batch_osint "install" "install" "installed_count"
53
+ }
54
+
55
+ uninstall_all_osint() {
56
+ _batch_osint "uninstall" "uninstall" "uninstalled_count"
57
+ }
58
+
59
+ update_all_osint() {
60
+ _batch_osint "update" "update" "updated_count"
61
+ }
62
+
63
+ reinstall_all_osint() {
64
+ _batch_osint "reinstall" "reinstall" "reinstalled_count"
65
+ }