@mmmbuto/gemini-cli-termux 0.22.6-termux → 0.22.7-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 +26 -19
- package/bundle/README.md +239 -0
- package/bundle/gemini.js +32431 -31845
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ pkg update && pkg upgrade -y
|
|
|
29
29
|
pkg install nodejs-lts -y
|
|
30
30
|
npm install -g @mmmbuto/gemini-cli-termux
|
|
31
31
|
|
|
32
|
-
gemini --version # expected: 0.22.
|
|
32
|
+
gemini --version # expected: 0.22.2-termux (npm latest); 0.22.7-termux available on testing channel
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Build from source:
|
|
@@ -64,8 +64,11 @@ node bundle/gemini.js --version
|
|
|
64
64
|
|
|
65
65
|
### 📚 Complete Documentation
|
|
66
66
|
|
|
67
|
-
- **
|
|
68
|
-
|
|
67
|
+
- **Test Results**
|
|
68
|
+
- [GEMINI_TEST_REPORT_v0.22.7.md](./GEMINI_TEST_REPORT_v0.22.7.md) — testing
|
|
69
|
+
channel
|
|
70
|
+
- [GEMINI_TEST_REPORT_v0.22.2.md](./GEMINI_TEST_REPORT_v0.22.2.md) — stable
|
|
71
|
+
baseline
|
|
69
72
|
- **[Test Suite](./GEMINI_TEST_SUITE.md)** - Test methodology and checklist
|
|
70
73
|
- **[Patches & Fixes](./docs/patches/)** - Known issues and workarounds
|
|
71
74
|
|
|
@@ -104,29 +107,30 @@ npm install -g @mmmbuto/gemini-cli-termux@latest
|
|
|
104
107
|
|
|
105
108
|
### Versions
|
|
106
109
|
|
|
107
|
-
- **latest**: 0.22.
|
|
108
|
-
- **
|
|
110
|
+
- **latest / stable**: 0.22.2-termux (default npm dist-tag)
|
|
111
|
+
- **testing**: 0.22.7-termux (adds Gemini 3 Flash preview; install explicitly)
|
|
112
|
+
- **previous**: 0.21.4-termux
|
|
109
113
|
|
|
110
114
|
## Tests
|
|
111
115
|
|
|
112
116
|
- Suite: [`GEMINI_TEST_SUITE.md`](./GEMINI_TEST_SUITE.md)
|
|
113
|
-
- Latest
|
|
114
|
-
[`GEMINI_TEST_REPORT_v0.22.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## Termux-API Integration
|
|
117
|
+
- Latest reports:
|
|
118
|
+
- [`GEMINI_TEST_REPORT_v0.22.7.md`](./GEMINI_TEST_REPORT_v0.22.7.md) — testing
|
|
119
|
+
channel, PASS (static verification) on Termux: version/env, CLI basics,
|
|
120
|
+
non-interactive JSON, Termux-API, context memory, Gemini 3 Flash, agent TOML
|
|
121
|
+
loader, patches integrity. Agent shell security filter blocks complex
|
|
122
|
+
`run_shell_command` calls in this environment (known restriction); CLI
|
|
123
|
+
itself verified via `--version`.
|
|
124
|
+
- [`GEMINI_TEST_REPORT_v0.22.2.md`](./GEMINI_TEST_REPORT_v0.22.2.md) — stable
|
|
125
|
+
baseline, PASS with expected optional-native warnings.
|
|
126
|
+
|
|
127
|
+
## Termux-API Integration
|
|
124
128
|
|
|
125
129
|
This fork supports optional integration with Termux-API commands for Android
|
|
126
130
|
device access. Enable Gemini to interact with your device hardware and Android
|
|
127
131
|
features.
|
|
128
132
|
|
|
129
|
-
|
|
133
|
+
## Context memory + TTS note:
|
|
130
134
|
|
|
131
135
|
- The Termux fork ships JSON context memory at
|
|
132
136
|
`~/.gemini/context_memory/{base.json,user.json,user.journal.jsonl}`. In
|
|
@@ -169,7 +173,10 @@ See [docs/termux-api/](./docs/termux-api/) for complete documentation.
|
|
|
169
173
|
|
|
170
174
|
---
|
|
171
175
|
|
|
172
|
-
## v0.22.
|
|
176
|
+
## v0.22.7-termux (testing) Highlights
|
|
177
|
+
|
|
178
|
+
- **Gemini 3 Flash preview** enabled (`gemini-3-flash-preview`) with help/docs
|
|
179
|
+
visibility.
|
|
173
180
|
|
|
174
181
|
- **Context Memory (default ON)**: strict, merge-safe JSON memory at
|
|
175
182
|
`~/.gemini/context_memory/{base.json,user.json,user.journal.jsonl}` with
|
|
@@ -188,7 +195,7 @@ See [docs/termux-api/](./docs/termux-api/) for complete documentation.
|
|
|
188
195
|
|
|
189
196
|
See `docs/cli/context-memory.md` for the detailed memory layout and settings.
|
|
190
197
|
|
|
191
|
-
## v0.22.
|
|
198
|
+
## v0.22.2-termux Improvements
|
|
192
199
|
|
|
193
200
|
This release includes significant improvements to the Termux experience:
|
|
194
201
|
|
package/bundle/README.md
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# 🤖 Gemini CLI – Termux Edition
|
|
2
|
+
|
|
3
|
+
Android/Termux optimized fork of Google Gemini CLI. Installs cleanly on Termux
|
|
4
|
+
by skipping native modules and adding clipboard detection for Termux.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/@mmmbuto/gemini-cli-termux)
|
|
7
|
+
[](https://www.npmjs.com/package/@mmmbuto/gemini-cli-termux)
|
|
8
|
+
[](https://ko-fi.com/dionanos)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What This Is
|
|
13
|
+
|
|
14
|
+
**Optimized Termux edition** of `google-gemini/gemini-cli`.
|
|
15
|
+
|
|
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.
|
|
24
|
+
|
|
25
|
+
## Installation (Termux)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pkg update && pkg upgrade -y
|
|
29
|
+
pkg install nodejs-lts -y
|
|
30
|
+
npm install -g @mmmbuto/gemini-cli-termux
|
|
31
|
+
|
|
32
|
+
gemini --version # expected: 0.22.2-termux (npm latest); 0.22.7-termux available on testing channel
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Build from source:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/DioNanos/gemini-cli-termux.git
|
|
39
|
+
cd gemini-cli-termux
|
|
40
|
+
npm install --ignore-optional --ignore-scripts
|
|
41
|
+
npm run build && npm run bundle
|
|
42
|
+
node bundle/gemini.js --version
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Termux Optimizations
|
|
46
|
+
|
|
47
|
+
- **Smart Clipboard:** Auto-detects Android environment to enable seamless
|
|
48
|
+
clipboard operations (fixes `TERMUX__PREFIX`).
|
|
49
|
+
- **Streamlined Install:** Native PTY/keychain deps are **omitted** on Termux
|
|
50
|
+
(fallback to `child_process` + file-based tokens), avoiding native builds.
|
|
51
|
+
- **Clean UX:** Suppresses desktop-centric warnings (like home directory checks)
|
|
52
|
+
to optimize the experience for mobile terminal usage.
|
|
53
|
+
- **ARM64 Native:** Bundled specifically for Android architecture.
|
|
54
|
+
|
|
55
|
+
## Environment Specifics
|
|
56
|
+
|
|
57
|
+
- **Shell Integration:** Uses robust `child_process` fallback instead of
|
|
58
|
+
`node-pty` for maximum stability on Android.
|
|
59
|
+
- **Credentials:** Keys are stored in standard config files for portability (no
|
|
60
|
+
dependency on system keychains).
|
|
61
|
+
- **Parser:** Simplified Bash parsing to reduce heavy binary dependencies.
|
|
62
|
+
|
|
63
|
+
## Documentation & Fixes
|
|
64
|
+
|
|
65
|
+
### 📚 Complete Documentation
|
|
66
|
+
|
|
67
|
+
- **Test Results**
|
|
68
|
+
- [GEMINI_TEST_REPORT_v0.22.7.md](./GEMINI_TEST_REPORT_v0.22.7.md) — testing
|
|
69
|
+
channel
|
|
70
|
+
- [GEMINI_TEST_REPORT_v0.22.2.md](./GEMINI_TEST_REPORT_v0.22.2.md) — stable
|
|
71
|
+
baseline
|
|
72
|
+
- **[Test Suite](./GEMINI_TEST_SUITE.md)** - Test methodology and checklist
|
|
73
|
+
- **[Patches & Fixes](./docs/patches/)** - Known issues and workarounds
|
|
74
|
+
|
|
75
|
+
### 🔧 Common Issues & Solutions
|
|
76
|
+
|
|
77
|
+
| Issue | Quick Fix | Documentation |
|
|
78
|
+
| --------------------- | ----------------------------- | --------------------------------------------------- |
|
|
79
|
+
| node-pty warning | `export NODE_NO_WARNINGS=1` | [Details](./docs/patches/node-pty-warning.md) |
|
|
80
|
+
| CLI syntax (`--json`) | Use `-o json` instead | [Details](./docs/patches/cli-syntax-differences.md) |
|
|
81
|
+
| Hooks commands | Use interactive mode `/hooks` | [Details](./docs/patches/hooks-interactive-only.md) |
|
|
82
|
+
|
|
83
|
+
### 📝 Quick Reference
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Correct usage examples
|
|
87
|
+
gemini -o json "your prompt" # ✅ JSON output
|
|
88
|
+
gemini --output-format json "prompt" # ✅ Also works
|
|
89
|
+
gemini --json "prompt" # ❌ Wrong syntax
|
|
90
|
+
|
|
91
|
+
# Quiet mode (suppress warnings)
|
|
92
|
+
export NODE_NO_WARNINGS=1
|
|
93
|
+
gemini "your prompt"
|
|
94
|
+
|
|
95
|
+
# Hooks management (interactive only)
|
|
96
|
+
gemini # Start interactive mode
|
|
97
|
+
/hooks # Manage hooks
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
See [docs/patches/README.md](./docs/patches/README.md) for complete solutions.
|
|
101
|
+
|
|
102
|
+
## Updating
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm install -g @mmmbuto/gemini-cli-termux@latest
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Versions
|
|
109
|
+
|
|
110
|
+
- **latest / stable**: 0.22.2-termux (default npm dist-tag)
|
|
111
|
+
- **testing**: 0.22.7-termux (adds Gemini 3 Flash preview; install explicitly)
|
|
112
|
+
- **previous**: 0.21.4-termux
|
|
113
|
+
|
|
114
|
+
## Tests
|
|
115
|
+
|
|
116
|
+
- Suite: [`GEMINI_TEST_SUITE.md`](./GEMINI_TEST_SUITE.md)
|
|
117
|
+
- Latest reports:
|
|
118
|
+
- [`GEMINI_TEST_REPORT_v0.22.7.md`](./GEMINI_TEST_REPORT_v0.22.7.md) — testing
|
|
119
|
+
channel, PASS (static verification) on Termux: version/env, CLI basics,
|
|
120
|
+
non-interactive JSON, Termux-API, context memory, Gemini 3 Flash, agent TOML
|
|
121
|
+
loader, patches integrity. Agent shell security filter blocks complex
|
|
122
|
+
`run_shell_command` calls in this environment (known restriction); CLI
|
|
123
|
+
itself verified via `--version`.
|
|
124
|
+
- [`GEMINI_TEST_REPORT_v0.22.2.md`](./GEMINI_TEST_REPORT_v0.22.2.md) — stable
|
|
125
|
+
baseline, PASS with expected optional-native warnings.
|
|
126
|
+
|
|
127
|
+
## Termux-API Integration
|
|
128
|
+
|
|
129
|
+
This fork supports optional integration with Termux-API commands for Android
|
|
130
|
+
device access. Enable Gemini to interact with your device hardware and Android
|
|
131
|
+
features.
|
|
132
|
+
|
|
133
|
+
## Context memory + TTS note:
|
|
134
|
+
|
|
135
|
+
- The Termux fork ships JSON context memory at
|
|
136
|
+
`~/.gemini/context_memory/{base.json,user.json,user.journal.jsonl}`. In
|
|
137
|
+
`/settings → Context Memory` you can toggle autoload, choose the primary
|
|
138
|
+
source, and (if needed) enable writes to `base.json` via
|
|
139
|
+
`Allow Base Memory Writes`.
|
|
140
|
+
- TTS notifications are controlled by
|
|
141
|
+
`/settings → Notifications → Enable TTS Notifications`. When disabled,
|
|
142
|
+
`termux-tts-speak` is blocked even if an agent asks for it. These behaviors
|
|
143
|
+
are merge-safe and confined to Termux patches.
|
|
144
|
+
|
|
145
|
+
### Quick Setup
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Install Termux-API package
|
|
149
|
+
pkg install termux-api jq
|
|
150
|
+
|
|
151
|
+
# Copy tool discovery scripts
|
|
152
|
+
mkdir -p ~/.config/gemini/termux-tools
|
|
153
|
+
cp scripts/termux-tools/*.sh ~/.config/gemini/termux-tools/
|
|
154
|
+
|
|
155
|
+
# Configure in settings
|
|
156
|
+
cat > ~/.config/gemini/settings.json << 'EOF'
|
|
157
|
+
{
|
|
158
|
+
"tool_discovery_command": "bash ~/.config/gemini/termux-tools/discovery.sh",
|
|
159
|
+
"tool_call_command": "bash ~/.config/gemini/termux-tools/call.sh"
|
|
160
|
+
}
|
|
161
|
+
EOF
|
|
162
|
+
|
|
163
|
+
# Test
|
|
164
|
+
gemini "What's my battery status?"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Supported Commands
|
|
168
|
+
|
|
169
|
+
Battery, Clipboard, Toast, Notifications, TTS, Vibrate, Torch, WiFi info,
|
|
170
|
+
Location, Camera, Dialog, Share, and more.
|
|
171
|
+
|
|
172
|
+
See [docs/termux-api/](./docs/termux-api/) for complete documentation.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## v0.22.7-termux (testing) Highlights
|
|
177
|
+
|
|
178
|
+
- **Gemini 3 Flash preview** enabled (`gemini-3-flash-preview`) with help/docs
|
|
179
|
+
visibility.
|
|
180
|
+
|
|
181
|
+
- **Context Memory (default ON)**: strict, merge-safe JSON memory at
|
|
182
|
+
`~/.gemini/context_memory/{base.json,user.json,user.journal.jsonl}` with
|
|
183
|
+
per-source autoload, primary selector, and GEMINI.md bootstrap on first run.
|
|
184
|
+
- **Deterministic compaction**: journal append-only with incremental offsets,
|
|
185
|
+
closed JSON schemas, key-based upsert, TTL/ephemeral guardrails,
|
|
186
|
+
sensitivity=high excluded from autoload.
|
|
187
|
+
- **Base write toggle**: enable/disable writes to `base.json` from
|
|
188
|
+
`/save_memory target=base` (off by default, merge-safe).
|
|
189
|
+
- **TTS toggle**: new `/settings` switch to allow/block `termux-tts-speak`;
|
|
190
|
+
shell tool blocks TTS when disabled.
|
|
191
|
+
- **Termux-first shell**: non-interactive commands (`echo`, `pwd`, `ls`) work
|
|
192
|
+
without native PTY deps; optional natives removed for faster installs.
|
|
193
|
+
- **Termux-API tools**: discovery/call scripts under `scripts/termux-tools/`
|
|
194
|
+
expose Termux APIs as tools (battery, tts, camera, etc.).
|
|
195
|
+
|
|
196
|
+
See `docs/cli/context-memory.md` for the detailed memory layout and settings.
|
|
197
|
+
|
|
198
|
+
## v0.22.2-termux Improvements
|
|
199
|
+
|
|
200
|
+
This release includes significant improvements to the Termux experience:
|
|
201
|
+
|
|
202
|
+
### Installation
|
|
203
|
+
|
|
204
|
+
- **Clear postinstall message** - No more confusion about native module warnings
|
|
205
|
+
- **`make termux-install`** - One-command build from source
|
|
206
|
+
- **`termux-setup.sh`** - Helper script for first-time setup
|
|
207
|
+
|
|
208
|
+
### Developer Experience
|
|
209
|
+
|
|
210
|
+
- **Termux detection utility** - `isTermux()` and `detectTermuxEnvironment()`
|
|
211
|
+
- **Punycode warning suppression** - Cleaner output on Android
|
|
212
|
+
- **Merge-safe patches** - Easy to maintain after upstream sync
|
|
213
|
+
- **`check-termux-patches.sh`** - Verify patches after merge
|
|
214
|
+
|
|
215
|
+
### Documentation
|
|
216
|
+
|
|
217
|
+
- Complete Termux-API integration plan
|
|
218
|
+
- 60+ commands documented with parameters
|
|
219
|
+
- Merge strategy guide for maintainers
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Changelog (Termux)
|
|
224
|
+
|
|
225
|
+
- **0.22.1-termux**: Termux-API integration, improved installation UX, Termux
|
|
226
|
+
detection utility, merge automation scripts.
|
|
227
|
+
- **0.22.0-termux**: Sync with upstream (0.21.0-nightly); added hide banner
|
|
228
|
+
patch; restored ARM64 dependency.
|
|
229
|
+
- **0.21.4-termux**: (Previous)
|
|
230
|
+
|
|
231
|
+
## Upstream Tracking
|
|
232
|
+
|
|
233
|
+
- Upstream: https://github.com/google-gemini/gemini-cli
|
|
234
|
+
- Divergent files: `esbuild.config.js`, `docs/TERMUX.md`, `package.json`,
|
|
235
|
+
`README.md`, `test-gemini/*`
|
|
236
|
+
|
|
237
|
+
## License
|
|
238
|
+
|
|
239
|
+
Apache 2.0 (same as upstream). See LICENSE.
|