@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # 🤖 Gemini CLI – Termux Edition
2
2
 
3
- Android/Termux compatible fork of Google Gemini CLI. Installs cleanly on 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
  [![npm](https://img.shields.io/npm/v/@mmmbuto/gemini-cli-termux?style=flat-square&logo=npm)](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
- Temporary compatibility fork of `google-gemini/gemini-cli` for Android Termux.
14
+ **Optimized Termux edition** of `google-gemini/gemini-cli`.
15
15
 
16
- - Tracks upstream regularly.
17
- - Minimal patches only: Termux clipboard env fix, native modules marked
18
- optional, PTY auto-disabled on Termux (fallback to child_process).
19
- - Bundled for ARM64/Android.
20
- - Sunset: once upstream adds Termux support, migrate back to
21
- `@google/gemini-cli`.
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
- ## Patches
45
+ ## Termux Optimizations
44
46
 
45
- - Clipboardy: sets `TERMUX__PREFIX` from `PREFIX` on Android.
46
- - Native modules (`keytar`, `node-pty`, `tree-sitter-bash`) kept optional;
47
- install with `--ignore-optional --ignore-scripts`.
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
- ## Known Limitations on Termux
56
+ ## Environment Specifics
50
57
 
51
- - No PTY (node-pty fails to build) limited shell integration.
52
- - No secure keychain credentials stored in plain config files.
53
- - Bash parsing without tree-sitter.
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)