@mmmbuto/gemini-cli-termux 0.21.4-termux → 0.22.1-termux
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 +97 -23
- package/bundle/gemini.js +268261 -258583
- package/bundle/policies/read-only.toml +5 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🤖 Gemini CLI – Termux Edition
|
|
2
2
|
|
|
3
|
-
Android/Termux
|
|
3
|
+
Android/Termux optimized fork of Google Gemini CLI. Installs cleanly on Termux
|
|
4
4
|
by skipping native modules and adding clipboard detection for Termux.
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@mmmbuto/gemini-cli-termux)
|
|
@@ -11,14 +11,16 @@ by skipping native modules and adding clipboard detection for Termux.
|
|
|
11
11
|
|
|
12
12
|
## What This Is
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Optimized Termux edition** of `google-gemini/gemini-cli`.
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
16
|
+
This project focuses on maintaining a first-class experience for Gemini on
|
|
17
|
+
Android/Termux. It provides critical adaptations for the mobile environment
|
|
18
|
+
while tracking upstream development closely.
|
|
19
|
+
|
|
20
|
+
- **Termux-First:** Pre-configured for Android filesystem and clipboard.
|
|
21
|
+
- **Lightweight:** Native dependencies managed for ARM64 without complex
|
|
22
|
+
compilation.
|
|
23
|
+
- **Up-to-Date:** Synchronized with the latest Google Gemini CLI features.
|
|
22
24
|
|
|
23
25
|
## Installation (Termux)
|
|
24
26
|
|
|
@@ -27,7 +29,7 @@ pkg update && pkg upgrade -y
|
|
|
27
29
|
pkg install nodejs-lts -y
|
|
28
30
|
npm install -g @mmmbuto/gemini-cli-termux
|
|
29
31
|
|
|
30
|
-
gemini --version # expected: 0.
|
|
32
|
+
gemini --version # expected: 0.22.0-termux (latest)
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
Build from source:
|
|
@@ -40,23 +42,30 @@ npm run build && npm run bundle
|
|
|
40
42
|
node bundle/gemini.js --version
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
##
|
|
45
|
+
## Termux Optimizations
|
|
44
46
|
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
- **Smart Clipboard:** Auto-detects Android environment to enable seamless
|
|
48
|
+
clipboard operations (fixes `TERMUX__PREFIX`).
|
|
49
|
+
- **Streamlined Install:** Native modules (`node-pty`, `keytar`,
|
|
50
|
+
`tree-sitter-bash`) are handled gracefully to ensure instant installation
|
|
51
|
+
without compilation errors.
|
|
52
|
+
- **Clean UX:** Suppresses desktop-centric warnings (like home directory checks)
|
|
53
|
+
to optimize the experience for mobile terminal usage.
|
|
54
|
+
- **ARM64 Native:** Bundled specifically for Android architecture.
|
|
48
55
|
|
|
49
|
-
##
|
|
56
|
+
## Environment Specifics
|
|
50
57
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
58
|
+
- **Shell Integration:** Uses robust `child_process` fallback instead of
|
|
59
|
+
`node-pty` for maximum stability on Android.
|
|
60
|
+
- **Credentials:** Keys are stored in standard config files for portability (no
|
|
61
|
+
dependency on system keychains).
|
|
62
|
+
- **Parser:** Simplified Bash parsing to reduce heavy binary dependencies.
|
|
54
63
|
|
|
55
64
|
## Documentation & Fixes
|
|
56
65
|
|
|
57
66
|
### 📚 Complete Documentation
|
|
58
67
|
|
|
59
|
-
- **[Test Results](./GEMINI_TEST_REPORT_v0.
|
|
68
|
+
- **[Test Results](./GEMINI_TEST_REPORT_v0.22.0.md)** - Comprehensive test
|
|
60
69
|
report with analysis
|
|
61
70
|
- **[Test Suite](./GEMINI_TEST_SUITE.md)** - Test methodology and checklist
|
|
62
71
|
- **[Patches & Fixes](./docs/patches/)** - Known issues and workarounds
|
|
@@ -96,14 +105,14 @@ npm install -g @mmmbuto/gemini-cli-termux@latest
|
|
|
96
105
|
|
|
97
106
|
### Versions
|
|
98
107
|
|
|
99
|
-
- **latest**: 0.
|
|
100
|
-
- **stable**: 0.
|
|
108
|
+
- **latest**: 0.22.0-termux (this build)
|
|
109
|
+
- **stable**: 0.22.0-termux
|
|
101
110
|
|
|
102
111
|
## Tests
|
|
103
112
|
|
|
104
113
|
- Suite: [`GEMINI_TEST_SUITE.md`](./GEMINI_TEST_SUITE.md)
|
|
105
114
|
- Latest report:
|
|
106
|
-
[`GEMINI_TEST_REPORT_v0.
|
|
115
|
+
[`GEMINI_TEST_REPORT_v0.22.0.md`](./GEMINI_TEST_REPORT_v0.22.0.md)
|
|
107
116
|
- PASS with warnings (node-pty optional missing log; `--version --json`
|
|
108
117
|
outputs plain string; config-path flag unsupported; extensions settings
|
|
109
118
|
needs subcommand).
|
|
@@ -112,10 +121,75 @@ npm install -g @mmmbuto/gemini-cli-termux@latest
|
|
|
112
121
|
- Optional native modules (node-pty, keytar, tree-sitter-bash) not built on
|
|
113
122
|
Termux → warnings expected; CLI remains functional.
|
|
114
123
|
|
|
124
|
+
## Termux-API Integration (NEW!)
|
|
125
|
+
|
|
126
|
+
This fork supports optional integration with Termux-API commands for Android
|
|
127
|
+
device access. Enable Gemini to interact with your device hardware and Android
|
|
128
|
+
features.
|
|
129
|
+
|
|
130
|
+
### Quick Setup
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Install Termux-API package
|
|
134
|
+
pkg install termux-api jq
|
|
135
|
+
|
|
136
|
+
# Copy tool discovery scripts
|
|
137
|
+
mkdir -p ~/.config/gemini/termux-tools
|
|
138
|
+
cp scripts/termux-tools/*.sh ~/.config/gemini/termux-tools/
|
|
139
|
+
|
|
140
|
+
# Configure in settings
|
|
141
|
+
cat > ~/.config/gemini/settings.json << 'EOF'
|
|
142
|
+
{
|
|
143
|
+
"tool_discovery_command": "bash ~/.config/gemini/termux-tools/discovery.sh",
|
|
144
|
+
"tool_call_command": "bash ~/.config/gemini/termux-tools/call.sh"
|
|
145
|
+
}
|
|
146
|
+
EOF
|
|
147
|
+
|
|
148
|
+
# Test
|
|
149
|
+
gemini "What's my battery status?"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Supported Commands
|
|
153
|
+
|
|
154
|
+
Battery, Clipboard, Toast, Notifications, TTS, Vibrate, Torch, WiFi info,
|
|
155
|
+
Location, Camera, Dialog, Share, and more.
|
|
156
|
+
|
|
157
|
+
See [docs/termux-api/](./docs/termux-api/) for complete documentation.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## v0.22.1-termux Improvements
|
|
162
|
+
|
|
163
|
+
This release includes significant improvements to the Termux experience:
|
|
164
|
+
|
|
165
|
+
### Installation
|
|
166
|
+
|
|
167
|
+
- **Clear postinstall message** - No more confusion about native module warnings
|
|
168
|
+
- **`make termux-install`** - One-command build from source
|
|
169
|
+
- **`termux-setup.sh`** - Helper script for first-time setup
|
|
170
|
+
|
|
171
|
+
### Developer Experience
|
|
172
|
+
|
|
173
|
+
- **Termux detection utility** - `isTermux()` and `detectTermuxEnvironment()`
|
|
174
|
+
- **Punycode warning suppression** - Cleaner output on Android
|
|
175
|
+
- **Merge-safe patches** - Easy to maintain after upstream sync
|
|
176
|
+
- **`check-termux-patches.sh`** - Verify patches after merge
|
|
177
|
+
|
|
178
|
+
### Documentation
|
|
179
|
+
|
|
180
|
+
- Complete Termux-API integration plan
|
|
181
|
+
- 60+ commands documented with parameters
|
|
182
|
+
- Merge strategy guide for maintainers
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
115
186
|
## Changelog (Termux)
|
|
116
187
|
|
|
117
|
-
- **0.
|
|
118
|
-
|
|
188
|
+
- **0.22.1-termux**: Termux-API integration, improved installation UX, Termux
|
|
189
|
+
detection utility, merge automation scripts.
|
|
190
|
+
- **0.22.0-termux**: Sync with upstream (0.21.0-nightly); added hide banner
|
|
191
|
+
patch; restored ARM64 dependency.
|
|
192
|
+
- **0.21.4-termux**: (Previous)
|
|
119
193
|
|
|
120
194
|
## Upstream Tracking
|
|
121
195
|
|