karnel-termux 4.11.6 → 4.13.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 (58) hide show
  1. package/README.md +60 -25
  2. package/install.sh +4 -3
  3. package/karnel/cli/commands/brain.sh +20 -4
  4. package/karnel/cli/commands/deploy.sh +16 -0
  5. package/karnel/cli/commands/doctor/fixes.sh +9 -4
  6. package/karnel/cli/commands/doctor.sh +1 -1
  7. package/karnel/cli/commands/env.sh +7 -4
  8. package/karnel/cli/commands/ia.sh +1 -1
  9. package/karnel/cli/commands/init.sh +4 -0
  10. package/karnel/cli/commands/install.sh +1 -1
  11. package/karnel/cli/commands/list.sh +5 -0
  12. package/karnel/cli/commands/pg.sh +4 -0
  13. package/karnel/cli/commands/plugin.sh +284 -72
  14. package/karnel/cli/commands/reinstall.sh +10 -2
  15. package/karnel/cli/commands/show.sh +10 -2
  16. package/karnel/cli/commands/supabase.sh +27 -5
  17. package/karnel/cli/commands/update.sh +2 -1
  18. package/karnel/cli/commands/voice.sh +1 -0
  19. package/karnel/cli/karnel.sh +79 -54
  20. package/karnel/modules/plugin.sh +14 -20
  21. package/karnel/modules/security.sh +3 -0
  22. package/karnel/tools/ai/all.sh +5 -0
  23. package/karnel/tools/ai/ampcode/README.md +31 -0
  24. package/karnel/tools/ai/ampcode/bin/amp +27 -0
  25. package/karnel/tools/ai/ampcode/helper/amp_helper.c +35 -0
  26. package/karnel/tools/ai/ampcode/install.sh +292 -0
  27. package/karnel/tools/ai/cursor-cli/README.md +34 -0
  28. package/karnel/tools/ai/cursor-cli/bin/cursor +33 -0
  29. package/karnel/tools/ai/cursor-cli/install.sh +173 -0
  30. package/karnel/tools/ai/droid/README.md +18 -0
  31. package/karnel/tools/ai/droid/install.sh +199 -0
  32. package/karnel/tools/ai/engram/install.sh +2 -2
  33. package/karnel/tools/ai/goose/README.md +17 -0
  34. package/karnel/tools/ai/goose/install.sh +131 -0
  35. package/karnel/tools/ai/kiro/install.sh +1 -1
  36. package/karnel/tools/ai/oh-my-pi/README.md +39 -0
  37. package/karnel/tools/ai/oh-my-pi/bin/omp +27 -0
  38. package/karnel/tools/ai/oh-my-pi/helper/omp_helper.c +27 -0
  39. package/karnel/tools/ai/oh-my-pi/install.sh +272 -0
  40. package/karnel/tools/ai/omni-route/install.sh +1 -1
  41. package/karnel/tools/games/pet-friends/pet-friends.py +26913 -38
  42. package/karnel/tools/lang/bun/install.sh +1 -1
  43. package/karnel/tools/plugins/install.sh +1522 -89
  44. package/karnel/tools/security/all.sh +10 -4
  45. package/karnel/tools/security/template.sh +25 -19
  46. package/karnel/tools/ui/banner/install.sh +9 -6
  47. package/karnel/tools/utils/notes/install.sh +1 -1
  48. package/karnel/tools/utils/zork/install.sh +1 -1
  49. package/karnel/tools/utils/zork/zork.sh +10 -0
  50. package/karnel/utils/banner.sh +65 -98
  51. package/karnel/utils/bootstrap.sh +3 -3
  52. package/karnel/utils/env.sh +4 -10
  53. package/karnel/utils/log.sh +19 -11
  54. package/karnel/utils/version.sh +26 -8
  55. package/package.json +1 -1
  56. package/scripts/completion.bash +11 -2
  57. package/scripts/completion.zsh +13 -0
  58. package/karnel/tools/games/terminal-arcade/terminal-arcade.py +0 -193
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.11.0-0078D4?style=for-the-badge" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-4.13.0-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">
@@ -33,18 +33,18 @@
33
33
 
34
34
  Created by **Israel Marques**.
35
35
 
36
- - **31 AI agents** for coding — Claude, Gemini, OpenCode, Ollama, Cline, karnelRoute and more
37
- - **7 languages** — Node.js, Python, Go, Rust, C/C++, PHP, Perl
36
+ - **37 AI agents** for coding — Claude, Gemini, OpenCode, Qoder, Ollama, Goose, Factory Droid, Cline, OmniRoute and more
37
+ - **8 languages** — Node.js, Python, Go, Rust, C/C++, PHP, Perl, Bun
38
38
  - **5 databases** — PostgreSQL, MariaDB, SQLite, MongoDB, Redis
39
39
  - **22 dev tools** — gh, curl, fzf, bat, lsd, jq, tmux, openssh, snyk and more
40
40
  - **11 utility scripts** — fconv, notes, treex, qrcode, zork and more
41
41
  - **2 network tools** — dark, dedsec-network
42
42
  - **3 deploy CLIs** — Vercel, Railway, Netlify
43
43
  - **Responsible OSINT** — Robin v2.8 through Tor with a loopback-only web UI
44
- - **Professional editor** — code-server (VS Code in browser)
44
+ - **3 editors** — code-server (VS Code in browser), Neovim, NvChad
45
45
  - **Second brain** — Memory system with AI search and idea graph
46
46
  - **Voice commands** — Speak to your AI agents
47
- - **Plugin system** — Install community plugins from GitHub: `karnel plugin install <user/repo>`
47
+ - **Plugin system** — Discover reviewed extensions: `karnel plugin search`
48
48
  - **Security tools** — Nmap, Hydra, SQLMap, Metasploit and more: `karnel install security`
49
49
 
50
50
  > [!IMPORTANT]
@@ -112,9 +112,9 @@ karnel
112
112
 
113
113
  | Module | Description | Installation |
114
114
  |--------|-------------|--------------|
115
- | `lang` | Node.js, Python, Go, Rust, C/C++, PHP, Perl | `karnel install lang` |
115
+ | `lang` | Node.js, Python, Go, Rust, C/C++, PHP, Perl, Bun | `karnel install lang` |
116
116
  | `db` | PostgreSQL, MariaDB, SQLite, MongoDB, Redis | `karnel install db` |
117
- | `ai` | 31 AI agents for coding | `karnel install ai` |
117
+ | `ai` | 37 AI agents for coding | `karnel install ai` |
118
118
  | `editor` | code-server (VS Code in browser) | `karnel install editor` |
119
119
  | `dev` | gh, curl, fzf, bat, lsd, jq and more | `karnel install dev` |
120
120
  | `npm` | TypeScript, NestJS CLI, Prettier and more | `karnel install npm` |
@@ -127,23 +127,50 @@ karnel
127
127
  | `utils` | fconv, notes, treex, passman, applaunch, qrcode, zork and more | `karnel install utils` |
128
128
  | `osint` | Robin v2.8, Tor, Streamlit, and LLM providers | `karnel install osint` |
129
129
  | `voice` | Speech-to-agent through Termux:API | `karnel install voice` |
130
- | `plugin` | Plugin manager — install extensions from GitHub | `karnel install plugin` |
130
+ | `plugin` | Built-in plugin manager — reviewed registry and local plugins | `karnel plugin search` |
131
131
  | `security` | Nmap, Hydra, SQLMap, Metasploit, Gobuster and more | `karnel install security` |
132
132
 
133
133
  ---
134
134
 
135
135
  ## Plugin System
136
136
 
137
- Extend Karnel with community plugins from GitHub:
137
+ Discover and install reviewed plugins from the official registry:
138
138
 
139
139
  ```bash
140
- karnel plugin install <user/repo> # Install a plugin
141
- karnel plugin list # List installed plugins
142
- karnel plugin remove <name> # Uninstall a plugin
143
- karnel plugin create <name> # Scaffold a new plugin
140
+ karnel plugin search
141
+ karnel plugin search backup --compatible
142
+ karnel plugin install karnel-hello
143
+ karnel plugin update karnel-hello
144
+ karnel plugin list
145
+ karnel plugin remove karnel-hello
146
+ karnel plugin create meu-plugin
144
147
  ```
145
148
 
146
- Each plugin needs a `karnel-plugin.json` manifest at the root of its repo. Commands go in a `commands/` directory — Karnel discovers them automatically at startup.
149
+ Plugins are Bash code loaded by the Karnel process and run with the current
150
+ user's permissions. They are not sandboxed. Registry plugins have reviewed
151
+ metadata and are staged, validated, and atomically activated, but you should
152
+ still review code you do not trust.
153
+
154
+ Installing an arbitrary GitHub repository requires both `--unsafe` and an
155
+ interactive confirmation:
156
+
157
+ ```bash
158
+ karnel plugin install owner/repo --unsafe
159
+ ```
160
+
161
+ `--unsafe` is not a sandbox or an approval. It is intentionally required again
162
+ when updating an unsafe plugin. The plugin manager never creates a missing
163
+ manifest for a cloned repository.
164
+
165
+ Every plugin requires a strict `karnel-plugin.json`, a `LICENSE` or
166
+ `LICENSE.md`, and exact files in `commands/`. The manifest declares Schema v1,
167
+ safe name, SemVer version, description, `commands`, `minKarnelVersion`, license,
168
+ optional checksum, and informational capabilities. Native command names and
169
+ plugin-to-plugin command collisions are rejected.
170
+
171
+ The installed plugin directory is `${XDG_DATA_HOME:-$HOME/.local/share}/karnel-data/plugins`.
172
+ See the [official plugin registry](https://github.com/israelmarques1024-dotcom/karnel-plugins)
173
+ for schemas, review policy, and safe publication requirements.
147
174
 
148
175
  ## Security Tools
149
176
 
@@ -185,7 +212,7 @@ See the bundled reference with `karnel show osint --robin`.
185
212
 
186
213
  ---
187
214
 
188
- ## AI Agents (31)
215
+ ## AI Agents (37)
189
216
 
190
217
  ```bash
191
218
  karnel install ai # Install all
@@ -210,6 +237,7 @@ karnel install ai --opencode --ollama # Install specific agents
210
237
  | **Engram** | `--engram` | Persistent memory system |
211
238
  | **CodeGraph** | `--codegraph` | Code structure analysis |
212
239
  | **Pi** | `--pi` | Minimalist terminal harness |
240
+ | **Qoder** | `--qoder` | Terminal-native AI coding partner and agent engine |
213
241
  | **Antigravity CLI** | `--antigravity-cli` | Terminal interface for Antigravity |
214
242
  | **MiniMax CLI** | `--minimax-cli` | Generate text, image, video and audio |
215
243
  | **Gentle AI** | `--gentle-ai` | AI workflow ecosystem |
@@ -228,7 +256,12 @@ karnel install ai --opencode --ollama # Install specific agents
228
256
  | **Context7** | `--ctx7` | Documentation for AI assistants |
229
257
  | **OpenSpec** | `--openspec` | Spec-Driven Development |
230
258
  | **Copilot-Termux** | `--copilot-termux` | GitHub Copilot CLI adapted for Termux |
231
-
259
+ | **AMP Code CLI** | `--ampcode` | AI coding agent by Sourcegraph (glibc) |
260
+ | **Cursor CLI** | `--cursor-cli` | Official Cursor AI agent adapted for Termux (glibc) |
261
+ | **Oh-My-Pi** | `--oh-my-pi` | Enhanced Pi agent with native Rust addons |
262
+ | **Goose CLI** | `--goose` | AI agent framework by Block (native Termux musl) |
263
+ | **Factory Droid** | `--droid` | Enterprise AI agent (via proot-distro Ubuntu) |
264
+
232
265
  </details>
233
266
 
234
267
  ---
@@ -459,18 +492,20 @@ karnel/
459
492
  │ │ └── karnel.sh # Main CLI (with TUI)
460
493
  │ ├── modules/ # Module orchestrators
461
494
  │ ├── tools/ # Tool installers
462
- │ │ ├── ai/ # 31 AI agents
463
- │ │ ├── lang/ # Languages
464
- │ │ ├── db/ # Databases
495
+ │ │ ├── ai/ # 37 AI agents
496
+ │ │ ├── lang/ # 8 languages
497
+ │ │ ├── db/ # 5 databases
465
498
  │ │ ├── dev/ # 22 dev tools
466
- │ │ ├── editor/ # Code editor
467
- │ │ ├── npm/ # Global npm packages
468
- │ │ ├── shell/ # ZSH plugins
469
- │ │ ├── ui/ # Termux interface
470
- │ │ ├── auto/ # Automation
499
+ │ │ ├── editor/ # 3 editors
500
+ │ │ ├── npm/ # 11 global npm packages
501
+ │ │ ├── shell/ # 10 ZSH plugins
502
+ │ │ ├── ui/ # 4 UI components
503
+ │ │ ├── auto/ # 1 automation tool
471
504
  │ │ ├── network/ # 2 network tools
472
505
  │ │ ├── utils/ # 11 utility tools
473
- │ │ └── deploy/ # Deploy CLIs
506
+ │ │ ├── games/ # 7 games
507
+ │ │ ├── security/ # 30 security tools
508
+ │ │ └── deploy/ # 4 deploy CLIs
474
509
  │ └── utils/ # Utilities (banner, log, env, etc.)
475
510
  ├── install.sh # Installation script
476
511
  ├── package.json # npm/pnpm publishing
package/install.sh CHANGED
@@ -111,7 +111,7 @@ bootstrap_dependencies() {
111
111
 
112
112
  if [[ $needed_tput -eq 1 ]]; then
113
113
  echo -e " ${P_BORDER}→${P_NC} Installing ncurses-utils..."
114
- pkg install -y ncurses &>/dev/null
114
+ pkg install -y ncurses-utils &>/dev/null
115
115
  echo -e " ${P_OK}✔${P_NC} ncurses installed"
116
116
  echo
117
117
  fi
@@ -210,7 +210,7 @@ clone_repo() {
210
210
  printf "\r Cloning%s " "$(printf '%*s' "$dots" '' | tr ' ' '.')"
211
211
  sleep 0.5
212
212
  done
213
- wait "$pid"
213
+ wait "$pid" || { log_fail "Failed to clone repository"; _cleanup_failed; exit 1; }
214
214
  progress_bar 10 10
215
215
  echo
216
216
  log_ok "Repository cloned"
@@ -220,7 +220,8 @@ clone_repo() {
220
220
 
221
221
  # Install shell completions
222
222
  if [ -f "$KARNEL_REPO/scripts/completion.bash" ]; then
223
- cp "$KARNEL_REPO/scripts/completion.bash" "$PREFIX/share/bash-completion/completions/karnel" 2>/dev/null || true
223
+ mkdir -p "$PREFIX/share/bash-completion/completions" 2>/dev/null || true
224
+ cp "$KARNEL_REPO/scripts/completion.bash" "$PREFIX/share/bash-completion/completions/karnel" 2>/dev/null || log_info "Failed to install bash completion (non-fatal)"
224
225
  fi
225
226
  if [ -f "$KARNEL_REPO/scripts/completion.zsh" ]; then
226
227
  cp "$KARNEL_REPO/scripts/completion.zsh" "$PREFIX/share/zsh/site-functions/_karnel" 2>/dev/null || true
@@ -54,10 +54,14 @@ _brain_title() {
54
54
  fi
55
55
  }
56
56
 
57
+ _brain_slug_escape() {
58
+ printf '%s\n' "$1" | sed 's/[\/&]/\\&/g; s/\n/\\n/g'
59
+ }
60
+
57
61
  _brain_update_related() {
58
62
  local file="$1" slug="$2"
59
63
  local tmp
60
- tmp=$(mktemp)
64
+ tmp=$(mktemp "${TMPDIR:-/tmp}/karnel-brain.XXXXXX")
61
65
  local frontmatter_end
62
66
  frontmatter_end=$(awk '/^---$/ {++n} n==2 {print NR; exit}' "$file")
63
67
 
@@ -73,8 +77,10 @@ _brain_update_related() {
73
77
  return
74
78
  fi
75
79
 
80
+ local escaped
81
+ escaped=$(_brain_slug_escape "$slug")
76
82
  if grep -q "^related:" "$tmp" 2>/dev/null; then
77
- sed -i "s/^related: \[\(.*\)\]/related: [\1, $slug]/" "$tmp"
83
+ sed -i "s/^related: \[\(.*\)\]/related: [\1, $escaped]/" "$tmp"
78
84
  else
79
85
  sed -i "/^---$/a related: [$slug]" "$tmp"
80
86
  fi
@@ -85,7 +91,7 @@ _brain_update_related() {
85
91
  _brain_remove_related() {
86
92
  local file="$1" slug="$2"
87
93
  local tmp
88
- tmp=$(mktemp)
94
+ tmp=$(mktemp "${TMPDIR:-/tmp}/karnel-brain.XXXXXX")
89
95
  local frontmatter_end
90
96
  frontmatter_end=$(awk '/^---$/ {++n} n==2 {print NR; exit}' "$file")
91
97
 
@@ -95,7 +101,9 @@ _brain_remove_related() {
95
101
  fi
96
102
 
97
103
  head -n $((frontmatter_end - 1)) "$file" >"$tmp"
98
- sed -i "s/related: \[\(.*\)$slug\(.*\)\]/related: [\1\2]/" "$tmp"
104
+ local escaped
105
+ escaped=$(_brain_slug_escape "$slug")
106
+ sed -i "s/related: \[\(.*\)$escaped\(.*\)\]/related: [\1\2]/" "$tmp"
99
107
  sed -i 's/related: \[, */related: [/; s/, *, */, /g; s/related: \[ *\]//' "$tmp"
100
108
  tail -n +$((frontmatter_end)) "$file" >>"$tmp"
101
109
  mv "$tmp" "$file"
@@ -1157,6 +1165,10 @@ brain_delete() {
1157
1165
  _brain_remove_related "$rfile" "$file_slug"
1158
1166
  done < <(rg -l "$file_slug" "$BRAIN_DIR" --glob '*.md' 2>/dev/null || true)
1159
1167
 
1168
+ if [[ "$file" != "$BRAIN_DIR"/* ]]; then
1169
+ log_error "Refusing to delete file outside brain directory"
1170
+ return 1
1171
+ fi
1160
1172
  rm "$file"
1161
1173
  log_success "Deleted: ${D_CYAN}$title${D_NC}"
1162
1174
 
@@ -1197,6 +1209,10 @@ brain_reset() {
1197
1209
  fi
1198
1210
 
1199
1211
  echo
1212
+ if [[ -z "$BRAIN_DIR" ]] || [[ "$BRAIN_DIR" == "/" ]]; then
1213
+ log_error "BRAIN_DIR is not set correctly, aborting"
1214
+ return 1
1215
+ fi
1200
1216
  loading "Deleting local brain..." rm -rf "$BRAIN_DIR"
1201
1217
  log_success "Brain destroyed"
1202
1218
  list_item "Recreate with: ${D_CYAN}karnel brain init${D_NC}"
@@ -23,6 +23,22 @@ deploy_main() {
23
23
 
24
24
  local tool="$1"
25
25
  case "$tool" in
26
+ --help|-h)
27
+ echo
28
+ box "Karnel Deploy"
29
+ echo
30
+ log_info "Usage: karnel deploy <tool>"
31
+ echo
32
+ log_info "Available tools:"
33
+ echo
34
+ list_item "vercel - Deploy to Vercel"
35
+ list_item "railway - Deploy to Railway"
36
+ list_item "netlify - Deploy to Netlify"
37
+ echo
38
+ log_info "Usage: ${D_CYAN}karnel deploy vercel${NC}"
39
+ echo
40
+ return
41
+ ;;
26
42
  vercel)
27
43
  if ! command -v vercel &>/dev/null; then
28
44
  log_warn "Vercel CLI not installed. Run: karnel install npm --vercel"
@@ -19,9 +19,10 @@ _fix_mkdir() {
19
19
 
20
20
  _fix_pkg_install() {
21
21
  local pkg_to_install=""
22
+ local fix_idx="${3:-$i}"
22
23
  case "$1" in
23
24
  pkg) pkg_to_install="$2" ;;
24
- *) pkg_to_install="${fix_commands[$i]:-}" ;;
25
+ *) pkg_to_install="${fix_commands[$fix_idx]:-}" ;;
25
26
  esac
26
27
  local pkg_name=""
27
28
  if [[ "$pkg_to_install" =~ pkg\ install\ -y\ (.+) ]]; then
@@ -207,7 +208,11 @@ _fix_psutil() {
207
208
  mkdir -p "$tmp"
208
209
  pip download psutil==7.2.2 --no-binary :all: --no-deps -d "$tmp" 2>/dev/null || return 1
209
210
  tar xzf "$tmp/psutil-7.2.2.tar.gz" -C "$tmp"
210
- sed -i 's/LINUX = sys.platform.startswith("linux")/LINUX = sys.platform.startswith(("linux", "android"))/' "$tmp/psutil-7.2.2/psutil/_common.py"
211
+ if grep -q 'LINUX = sys.platform.startswith("linux")' "$tmp/psutil-7.2.2/psutil/_common.py" 2>/dev/null; then
212
+ sed -i 's/LINUX = sys.platform.startswith("linux")/LINUX = sys.platform.startswith(("linux", "android"))/' "$tmp/psutil-7.2.2/psutil/_common.py"
213
+ else
214
+ log_warn "psutil patch target not found, skipping"
215
+ fi
211
216
  pip install "$tmp/psutil-7.2.2" 2>/dev/null
212
217
  local rc=$?
213
218
  rm -rf "$tmp"
@@ -230,8 +235,8 @@ _fix_npm_shebangs() {
230
235
  for f in "$PREFIX/bin/"*; do
231
236
  [[ -f "$f" ]] || continue
232
237
  local shebang
233
- shebang=$(head -1 "$f" 2>/dev/null | tr -d '\0')
234
- if [[ "$shebang" == "#!/usr/bin/env node" ]]; then
238
+ shebang=$(head -1 "$f" 2>/dev/null | tr -d '\0\r' | xargs)
239
+ if [[ "$shebang" == "#!/usr/bin/env node" ]]; then
235
240
  sed -i "1s|^.*$|#!$PREFIX/bin/node|" "$f" && ((fixed++))
236
241
  elif [[ "$shebang" == "#!/usr/bin/env bash" ]] || [[ "$shebang" == "#!/usr/bin/env sh" ]]; then
237
242
  sed -i "1s|^.*$|#!$PREFIX/bin/bash|" "$f" && ((fixed++))
@@ -296,7 +296,7 @@ doctor_termux() {
296
296
  if (( cache_files > 500 )); then
297
297
  log_warn "APT lists cache is large: $cache_size ($cache_files files)"
298
298
  ((warnings++))
299
- fix_commands+=("rm -rf $apt_cache_dir/* && pkg update -y")
299
+ [[ -n "$apt_cache_dir" ]] && fix_commands+=("rm -rf ${apt_cache_dir:?}/* && pkg update -y")
300
300
  fix_descriptions+=("Reset APT lists cache (fixes Hash Sum mismatch)")
301
301
  fix_callbacks+=("_fix_apt_cache")
302
302
  else
@@ -63,9 +63,11 @@ env_set() {
63
63
 
64
64
  read_secret "Value for $key" value
65
65
 
66
- if grep -q "^export $key=" "$rc_file" 2>/dev/null; then
66
+ local escaped_key
67
+ escaped_key=$(printf '%s\n' "$key" | sed 's/[\/&.*^$[]/\\&/g')
68
+ if grep -q "^export $escaped_key=" "$rc_file" 2>/dev/null; then
67
69
  local current_value
68
- current_value=$(grep "^export $key=" "$rc_file" | head -1 | sed 's/^export [^=]*=//')
70
+ current_value=$(grep "^export $escaped_key=" "$rc_file" | head -1 | sed 's/^export [^=]*=//')
69
71
  echo
70
72
  log_info "Current value: ${D_DIM}${current_value:0:40}${D_NC}"
71
73
  log_warn "Variable $D_CYAN$key$D_YELLOW already exists in $(basename "$rc_file")"
@@ -76,7 +78,7 @@ env_set() {
76
78
  separator
77
79
  return 0
78
80
  fi
79
- sed -i "/^export ${key}=/d" "$rc_file"
81
+ sed -i "/^export ${escaped_key}=/d" "$rc_file"
80
82
  echo
81
83
  log_info "Replacing $D_CYAN$key$D_NC..."
82
84
  else
@@ -156,7 +158,8 @@ env_unset() {
156
158
  return 0
157
159
  fi
158
160
 
159
- sed -i "/^export ${key}=/d" "$rc_file"
161
+ escaped_key=$(printf '%s\n' "$key" | sed 's/[\/&.*^$[]/\\&/g')
162
+ sed -i "/^export ${escaped_key}=/d" "$rc_file"
160
163
 
161
164
  echo
162
165
  log_success "Variable ${D_CYAN}${key}${D_GREEN} removed from ${D_NC}$(basename "$rc_file")"
@@ -431,7 +431,7 @@ ia_routes() {
431
431
  local -a routes=()
432
432
 
433
433
  # Collect all available AI CLIs (em sincronia com AI_TOOLS_REGISTRY em tools/ai/all.sh)
434
- for cmd in qwen gemini claude vibe openclaude openclaw ollama codex opencode mimo engram codegraph pi agy mmx gentle-ai gga hermes kimi command-code freebuff kilocode kiro cline crush odysseus kimchi omni-route ctx7 openspec copilot; do
434
+ for cmd in qwen gemini claude vibe openclaude openclaw ollama codex opencode mimo engram codegraph pi agy mmx gentle-ai gga hermes kimi command-code freebuff kilocode kiro cline crush odysseus kimchi omni-route ctx7 openspec copilot amp cursor omp goose droid; do
435
435
  if command -v "$cmd" &>/dev/null; then
436
436
  local path
437
437
  path=$(command -v "$cmd")
@@ -1235,6 +1235,10 @@ init_main() {
1235
1235
  local template="$1"
1236
1236
 
1237
1237
  case "$template" in
1238
+ --help|-h)
1239
+ init_help
1240
+ return
1241
+ ;;
1238
1242
  next | nextjs) configure_next ;;
1239
1243
  react | vite) configure_react ;;
1240
1244
  nest | nestjs) configure_nest ;;
@@ -826,7 +826,7 @@ _install_specific_tools() {
826
826
  _batch_tool_action "security" "install" "${tools[@]}"
827
827
  ;;
828
828
  supabase)
829
- import "@/tools/supabase/all"
829
+ import "@/tools/deploy/supabase/install"
830
830
  install_supabase
831
831
  case $? in 0) log_success "Supabase CLI installed";; 2) log_info "Supabase CLI already installed";; 1) log_error "Failed to install Supabase CLI";; esac
832
832
  ;;
@@ -198,6 +198,11 @@ _list_ai() {
198
198
  table_row "Context7 Docs" "--ctx7" "ctx7" "$(_check_cmd "ctx7")"
199
199
  table_row "OpenSpec SDD" "--openspec" "openspec" "$(_check_cmd "openspec")"
200
200
  table_row "Qoder" "--qoder" "qodercli" "$(_check_cmd "qodercli")"
201
+ table_row "AMP Code CLI" "--ampcode" "amp" "$(_check_cmd "amp")"
202
+ table_row "Cursor CLI" "--cursor-cli" "cursor" "$(_check_cmd "cursor")"
203
+ table_row "Oh-My-Pi" "--oh-my-pi" "omp" "$(_check_cmd "omp")"
204
+ table_row "Goose CLI" "--goose" "goose" "$(_check_cmd "goose")"
205
+ table_row "Factory Droid" "--droid" "droid" "$(_check_cmd "droid")"
201
206
  table_row "Copilot-Termux" "--copilot-termux" "copilot" "$(_check_cmd "copilot")"
202
207
  table_end
203
208
 
@@ -390,6 +390,10 @@ pg_main() {
390
390
  shift || true
391
391
 
392
392
  case "$cmd" in
393
+ --help|-h)
394
+ pg_help
395
+ return
396
+ ;;
393
397
  start)
394
398
  pg_start
395
399
  ;;