@mmmbuto/gemini-cli-termux 0.24.2-termux → 0.24.4-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 +7 -11
- package/bundle/docs/cli/settings.md +1 -1
- package/bundle/docs/cli/skills.md +156 -0
- package/bundle/docs/cli/telemetry.md +3 -3
- package/bundle/docs/cli/tutorials/skills-getting-started.md +124 -0
- package/bundle/docs/cli/tutorials.md +4 -0
- package/bundle/docs/get-started/configuration.md +44 -19
- package/bundle/docs/hooks/best-practices.md +177 -127
- package/bundle/docs/hooks/index.md +22 -0
- package/bundle/docs/sidebar.json +4 -0
- package/bundle/gemini.js +27472 -18856
- package/bundle/policies/write.toml +5 -0
- package/package.json +5 -4
- package/bundle/README.md +0 -239
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmmbuto/gemini-cli-termux",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.4-termux",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.0.0"
|
|
6
6
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/DioNanos/gemini-cli-termux.git"
|
|
15
15
|
},
|
|
16
16
|
"config": {
|
|
17
|
-
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.24.
|
|
17
|
+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.24.4-termux"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"start": "crossenv NODE_ENV=development node scripts/start.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"lint:all": "node scripts/lint.js",
|
|
53
53
|
"format": "prettier --experimental-cli --write .",
|
|
54
54
|
"typecheck": "npm run typecheck --workspaces --if-present",
|
|
55
|
-
"preflight": "npm run clean && npm ci && npm run format && npm run
|
|
55
|
+
"preflight": "npm run clean && npm ci && npm run format && npm run build && npm run lint:ci && npm run typecheck && npm run test:ci",
|
|
56
56
|
"prepare": "husky && npm run bundle",
|
|
57
57
|
"prepare:package": "node scripts/prepare-package.js",
|
|
58
58
|
"release:version": "node scripts/version.js",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
],
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@octokit/rest": "^22.0.0",
|
|
83
|
+
"@types/js-yaml": "^4.0.9",
|
|
83
84
|
"@types/marked": "^5.0.2",
|
|
84
85
|
"@types/mime-types": "^3.0.1",
|
|
85
86
|
"@types/minimatch": "^5.1.2",
|
|
@@ -96,8 +97,8 @@
|
|
|
96
97
|
"esbuild-plugin-wasm": "^1.1.0",
|
|
97
98
|
"eslint": "^9.24.0",
|
|
98
99
|
"eslint-config-prettier": "^10.1.2",
|
|
100
|
+
"eslint-plugin-headers": "^1.3.3",
|
|
99
101
|
"eslint-plugin-import": "^2.31.0",
|
|
100
|
-
"eslint-plugin-license-header": "^0.8.0",
|
|
101
102
|
"eslint-plugin-react": "^7.37.5",
|
|
102
103
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
103
104
|
"glob": "^12.0.0",
|
package/bundle/README.md
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
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.
|