@mmmbuto/gemini-cli-termux
v0.21.3-termux
Published
Android/Termux compatible fork of Google Gemini CLI. Installs cleanly on Termux by skipping native modules and adding clipboard detection for Termux.
Downloads
457
Readme
🤖 Gemini CLI – Termux Edition
Android/Termux compatible fork of Google Gemini CLI. Installs cleanly on Termux by skipping native modules and adding clipboard detection for Termux.
What This Is
Temporary compatibility fork of google-gemini/gemini-cli for Android Termux.
- Tracks upstream regularly.
- Minimal patches only: Termux clipboard env fix, native modules marked optional.
- Bundled for ARM64/Android.
- Sunset: once upstream adds Termux support, migrate back to
@google/gemini-cli.
Installation (Termux)
pkg update && pkg upgrade -y
pkg install nodejs-lts -y
npm install -g @mmmbuto/gemini-cli-termux
gemini --version # expected: 0.21.2-termux (latest)Build from source:
git clone https://github.com/DioNanos/gemini-cli-termux.git
cd gemini-cli-termux
npm install --ignore-optional --ignore-scripts
npm run build && npm run bundle
node bundle/gemini.js --versionPatches
- Clipboardy: sets
TERMUX__PREFIXfromPREFIXon Android. - Native modules (
keytar,node-pty,tree-sitter-bash) kept optional; install with--ignore-optional --ignore-scripts.
Known Limitations on Termux
- No PTY (node-pty fails to build) → limited shell integration.
- No secure keychain → credentials stored in plain config files.
- Bash parsing without tree-sitter.
Documentation & Fixes
📚 Complete Documentation
- Test Results - Comprehensive test report with analysis
- Test Suite - Test methodology and checklist
- Patches & Fixes - Known issues and workarounds
🔧 Common Issues & Solutions
| Issue | Quick Fix | Documentation |
| --------------------- | ----------------------------- | --------------------------------------------------- |
| node-pty warning | export NODE_NO_WARNINGS=1 | Details |
| CLI syntax (--json) | Use -o json instead | Details |
| Hooks commands | Use interactive mode /hooks | Details |
📝 Quick Reference
# Correct usage examples
gemini -o json "your prompt" # ✅ JSON output
gemini --output-format json "prompt" # ✅ Also works
gemini --json "prompt" # ❌ Wrong syntax
# Quiet mode (suppress warnings)
export NODE_NO_WARNINGS=1
gemini "your prompt"
# Hooks management (interactive only)
gemini # Start interactive mode
/hooks # Manage hooksSee docs/patches/README.md for complete solutions.
Updating
npm install -g @mmmbuto/gemini-cli-termux@latestVersions
- latest: 0.21.3-termux (this build)
- stable: 0.21.3-termux
Tests
- Suite:
GEMINI_TEST_SUITE.md - Latest report:
GEMINI_TEST_REPORT_v0.21.3.md- PASS with warnings (node-pty optional missing log;
--version --jsonoutputs plain string; config-path flag unsupported; extensions settings needs subcommand). - Non-interactive/file tests executed via agent; Termux checks pass; package/bundle verified.
- Optional native modules (node-pty, keytar, tree-sitter-bash) not built on Termux → warnings expected; CLI remains functional.
- PASS with warnings (node-pty optional missing log;
Changelog (Termux)
- 0.21.2-termux (latest/stable): upstream main sync; Termux patches
retained; bundle export fix for
createInkStdio; tests pending refresh.
Upstream Tracking
- Upstream: https://github.com/google-gemini/gemini-cli
- Divergent files:
esbuild.config.js,docs/TERMUX.md,package.json,README.md,test-gemini/*
License
Apache 2.0 (same as upstream). See LICENSE.
