@mmmbuto/gemini-cli-termux 0.22.0-termux → 0.22.2-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 +89 -16
- package/bundle/gemini.js +4273 -7324
- package/package.json +5 -3
- package/scripts/postinstall.cjs +47 -0
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
|
|
|
@@ -40,17 +42,24 @@ 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
|
|
|
@@ -112,8 +121,72 @@ 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
|
|
|
188
|
+
- **0.22.1-termux**: Termux-API integration, improved installation UX, Termux
|
|
189
|
+
detection utility, merge automation scripts.
|
|
117
190
|
- **0.22.0-termux**: Sync with upstream (0.21.0-nightly); added hide banner
|
|
118
191
|
patch; restored ARM64 dependency.
|
|
119
192
|
- **0.21.4-termux**: (Previous)
|