karnel-termux 4.17.33 → 4.17.34
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 +18 -2
- package/karnel/RELEASE_COMMIT +1 -1
- package/karnel/bin/karnel +19 -0
- package/karnel/cli/karnel.sh +2 -1
- package/karnel/utils/agent_actions.sh +4 -0
- package/karnel/utils/log.sh +10 -0
- package/package.json +1 -1
- package/scripts/completion.bash +3 -3
- package/scripts/completion.zsh +3 -2
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.
|
|
11
|
+
<img src="https://img.shields.io/badge/version-4.17.34-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.
|
|
81
|
+
version=4.17.34
|
|
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"
|
|
@@ -104,6 +104,22 @@ After installation, run:
|
|
|
104
104
|
karnel
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
### Noninteractive mode
|
|
108
|
+
|
|
109
|
+
Use `--auto` before or after a command to approve supported confirmations and
|
|
110
|
+
select the recommended installation method without prompting. With no tool
|
|
111
|
+
flags, the whole module is installed:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
karnel --auto install ai
|
|
115
|
+
karnel install security --auto
|
|
116
|
+
karnel --auto update ai
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`--auto` does not invent required values such as API tokens, passwords, project
|
|
120
|
+
names, or voice input. It also does not replace explicit trust and legal opt-in
|
|
121
|
+
flags such as `--unsafe` or `--accept-responsible-use`.
|
|
122
|
+
|
|
107
123
|
In a terminal, running `karnel` without a command opens a curated menu for
|
|
108
124
|
common workflows. The menu is not a complete inventory of CLI commands,
|
|
109
125
|
aliases, or options; use `karnel help` and the CLI reference for the full set.
|
package/karnel/RELEASE_COMMIT
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
f571178a0a7fdf05e9963d7effeeb2ddf65e7599
|
package/karnel/bin/karnel
CHANGED
|
@@ -20,6 +20,20 @@ KARNEL_PATH="$(cd "$BIN_DIR/.." 2>/dev/null && pwd)" || {
|
|
|
20
20
|
# cargar bootstrap
|
|
21
21
|
source "$KARNEL_PATH/utils/bootstrap.sh"
|
|
22
22
|
|
|
23
|
+
# --auto is global and may be supplied before or after the command. Remove it
|
|
24
|
+
# before dispatch because module lifecycle parsers treat every --flag as a tool.
|
|
25
|
+
_karnel_args=()
|
|
26
|
+
for _karnel_arg in "$@"; do
|
|
27
|
+
if [[ "$_karnel_arg" == "--auto" ]]; then
|
|
28
|
+
export KARNEL_AUTO=1
|
|
29
|
+
export KARNEL_NONINTERACTIVE=1
|
|
30
|
+
export KARNEL_REMOVE_DEFAULT=y
|
|
31
|
+
else
|
|
32
|
+
_karnel_args+=("$_karnel_arg")
|
|
33
|
+
fi
|
|
34
|
+
done
|
|
35
|
+
set -- "${_karnel_args[@]}"
|
|
36
|
+
|
|
23
37
|
# Informational flags must not initialize user state or trigger update checks.
|
|
24
38
|
case "${1:-}" in
|
|
25
39
|
--help|-h|--version|help|version|list|show) KARNEL_READ_ONLY=1 ;;
|
|
@@ -129,4 +143,9 @@ fi
|
|
|
129
143
|
# cargar CLI unificado (com TUI + help)
|
|
130
144
|
import "@/cli/karnel"
|
|
131
145
|
|
|
146
|
+
if [[ "${KARNEL_AUTO:-0}" == "1" && $# -eq 0 ]]; then
|
|
147
|
+
karnel_help
|
|
148
|
+
exit 0
|
|
149
|
+
fi
|
|
150
|
+
|
|
132
151
|
karnel_main "$@"
|
package/karnel/cli/karnel.sh
CHANGED
|
@@ -88,7 +88,8 @@ karnel_help() {
|
|
|
88
88
|
echo
|
|
89
89
|
box "◈ KARNEL v${KARNEL_VERSION} ◈"
|
|
90
90
|
echo
|
|
91
|
-
|
|
91
|
+
log_info "Usage: karnel <command> [options]"
|
|
92
|
+
log_info "Global option: --auto Run supported confirmations and selections without prompts"
|
|
92
93
|
echo
|
|
93
94
|
separator_section "Available Commands"
|
|
94
95
|
echo
|
|
@@ -1306,6 +1306,10 @@ agent_server_stop() {
|
|
|
1306
1306
|
# ------------------------------------------------------------
|
|
1307
1307
|
agent_confirm() {
|
|
1308
1308
|
local prompt="$1" var="$2" _val
|
|
1309
|
+
if [[ "${KARNEL_AUTO:-0}" == "1" ]]; then
|
|
1310
|
+
read -r "$var" <<<"y"
|
|
1311
|
+
return 0
|
|
1312
|
+
fi
|
|
1309
1313
|
while true; do
|
|
1310
1314
|
printf ' %b%b [%b]%b\n' "$D_YELLOW" "$prompt" "${D_GREEN}y${GRAY}/${D_RED}n${NC}" "$NC" >&2
|
|
1311
1315
|
printf ' > ' >&2
|
package/karnel/utils/log.sh
CHANGED
|
@@ -277,6 +277,11 @@ read_confirm() {
|
|
|
277
277
|
local var="$2"
|
|
278
278
|
local _val
|
|
279
279
|
|
|
280
|
+
if [[ "${KARNEL_AUTO:-0}" == "1" ]]; then
|
|
281
|
+
read -r "$var" <<<"y"
|
|
282
|
+
return 0
|
|
283
|
+
fi
|
|
284
|
+
|
|
280
285
|
if [[ ! -t 0 ]]; then
|
|
281
286
|
read -r "$var" <<<"n"
|
|
282
287
|
return 1
|
|
@@ -310,6 +315,11 @@ read_confirm_default() {
|
|
|
310
315
|
local var="$3"
|
|
311
316
|
local _val
|
|
312
317
|
|
|
318
|
+
if [[ "${KARNEL_AUTO:-0}" == "1" ]]; then
|
|
319
|
+
read -r "$var" <<<"y"
|
|
320
|
+
return 0
|
|
321
|
+
fi
|
|
322
|
+
|
|
313
323
|
if [[ ! -t 0 ]]; then
|
|
314
324
|
read -r "$var" <<<"$default"
|
|
315
325
|
[[ "$default" == "y" ]] && return 0 || return 1
|
package/package.json
CHANGED
package/scripts/completion.bash
CHANGED
|
@@ -44,7 +44,7 @@ _karnel_completions() {
|
|
|
44
44
|
local ai_tools="10router qwen-code gemini-cli claude-code mistral-vibe openclaude openclaw ollama codex opencode mimocode engram codegraph pi antigravity-cli minimax-cli gentle-ai gga hermes-agent kimi-code command-code codebuff freebuff kilocode-cli kiro crush cline odysseus kimchi-code omni-route ctx7 openspec supercode-cli puter keelcode copilot-termux qoder ampcode cursor-cli oh-my-pi goose droid cactus cactus-needle hugging-face walkie"
|
|
45
45
|
|
|
46
46
|
if [[ $cword -eq 1 ]]; then
|
|
47
|
-
COMPREPLY=($(compgen -W "$commands --help --version" -- "$cur"))
|
|
47
|
+
COMPREPLY=($(compgen -W "$commands --auto --help --version" -- "$cur"))
|
|
48
48
|
return
|
|
49
49
|
fi
|
|
50
50
|
|
|
@@ -53,14 +53,14 @@ _karnel_completions() {
|
|
|
53
53
|
if [[ $cword -eq 2 ]]; then
|
|
54
54
|
COMPREPLY=($(compgen -W "$install_targets" -- "$cur"))
|
|
55
55
|
else
|
|
56
|
-
COMPREPLY=($(compgen -W "$(_karnel_tool_flags "${words[2]}")" -- "$cur"))
|
|
56
|
+
COMPREPLY=($(compgen -W "$(_karnel_tool_flags "${words[2]}") --auto" -- "$cur"))
|
|
57
57
|
fi
|
|
58
58
|
;;
|
|
59
59
|
update)
|
|
60
60
|
if [[ $cword -eq 2 ]]; then
|
|
61
61
|
COMPREPLY=($(compgen -W "$update_targets" -- "$cur"))
|
|
62
62
|
else
|
|
63
|
-
COMPREPLY=($(compgen -W "$(_karnel_tool_flags "${words[2]}")" -- "$cur"))
|
|
63
|
+
COMPREPLY=($(compgen -W "$(_karnel_tool_flags "${words[2]}") --auto" -- "$cur"))
|
|
64
64
|
fi
|
|
65
65
|
;;
|
|
66
66
|
show)
|
package/scripts/completion.zsh
CHANGED
|
@@ -98,15 +98,16 @@ _karnel() {
|
|
|
98
98
|
|
|
99
99
|
if (( CURRENT == 2 )); then
|
|
100
100
|
_karnel_commands
|
|
101
|
+
compadd -- --auto
|
|
101
102
|
return
|
|
102
103
|
fi
|
|
103
104
|
|
|
104
105
|
case "$command" in
|
|
105
106
|
install|uninstall|reinstall)
|
|
106
|
-
if (( CURRENT == 3 )); then _karnel_modules; compadd -- supabase; else _karnel_tool_flags "${words[3]}"; fi
|
|
107
|
+
if (( CURRENT == 3 )); then _karnel_modules; compadd -- supabase; else _karnel_tool_flags "${words[3]}"; compadd -- --auto; fi
|
|
107
108
|
;;
|
|
108
109
|
update)
|
|
109
|
-
if (( CURRENT == 3 )); then _karnel_modules; compadd -- supabase karnel; else _karnel_tool_flags "${words[3]}"; fi
|
|
110
|
+
if (( CURRENT == 3 )); then _karnel_modules; compadd -- supabase karnel; else _karnel_tool_flags "${words[3]}"; compadd -- --auto; fi
|
|
110
111
|
;;
|
|
111
112
|
show)
|
|
112
113
|
if (( CURRENT == 3 )); then _karnel_modules; compadd -- backup restore; else _karnel_tool_flags "${words[3]}"; fi
|