cursor-termux
v1.0.2
Published
Install and run the official Cursor Agent CLI on Termux (Android ARM64) with your Cursor subscription login
Maintainers
Readme
cursor-termux
Unofficial installer for the official Cursor Agent CLI on Termux (Android ARM64).
Uses your Cursor subscription login. No BYO API keys.
Maintainer: Afnanksalal
Not affiliated with Anysphere or Cursor. Cursor Agent is proprietary. This repository only ships Termux / Bionic compatibility glue (installer, launcher, and Node preload).
Requirements
- Android ARM64 (
aarch64) - Termux from F-Droid
- Node.js 18+ (Termux
nodejs-lts) - A Cursor account / subscription
Install
On the tablet, inside Termux:
pkg install nodejs-lts
npm install -g cursor-termux
cursor-termuxWithout a global install:
npx cursor-termuxFrom this GitHub repo:
git clone https://github.com/Afnanksalal/cursor-termux.git
cd cursor-termux
npm install -g .
cursor-termuxLogin and use
source ~/.bashrc
NO_OPEN_BROWSER=1 cursor-agent login
# open the printed URL in a browser if needed
cursor-agent status
cd ~/your-project
cursor-agentPrompt mode (non-interactive):
cursor-agent -p --trust --mode ask "summarize this repo"agent is aliased to cursor-agent after install.
What it fixes
Official Cursor Agent ships a linux/arm64 glibc bundle. Termux uses Bionic, so the stock CLI breaks. This package:
| Problem | Fix |
|--------|-----|
| Bundled Node / ripgrep do not run | Symlink Termux node and rg |
| node_sqlite3 glibc addon | Rebuild for Bionic when possible |
| Merkle *.linux-arm64-gnu.node crash | Patch failure path to a JS stub |
| Fake musl file-service MODULE_NOT_FOUND | Spoof glibc detection + stub dlopen via preload |
| Lost after restart | Durable ~/.local/bin/cursor-agent + ~/.bashrc |
Layout after install
~/.local/bin/cursor-agent
~/.local/share/cursor-agent/termux-preload.js
~/.local/share/cursor-agent/versions/<version>/Updates
cursor-agent update may replace index.js and drop patches. Re-run cursor-termux after updating the agent.
Project layout
bin/cursor-termux.js CLI entry (runs the installer)
bin/postinstall-hint.js npm postinstall message
scripts/install.sh Termux installer
lib/termux-preload.js Node preload (glibc spoof + native stubs)Troubleshooting
Cannot find module '@anysphere/file-service-linux-arm64-musl'
Re-run cursor-termux. Confirm the launcher loads the preload:
head -n 30 ~/.local/bin/cursor-agent
ls -l ~/.local/share/cursor-agent/termux-preload.jsText file busy during install
Close any running cursor-agent, then re-run cursor-termux. The installer cleans old version dirs safely.
Login URL does not open
Use NO_OPEN_BROWSER=1 cursor-agent login and open the URL manually.
Agent broke after cursor-agent update
Re-run cursor-termux to re-apply patches and preload.
Disclaimer
Community workaround. Expect breakage when Cursor changes the agent bundle. Review the scripts before running. Prefer not to use this on highly sensitive codebases unless you accept the risk.
Contributing
See CONTRIBUTING.md. Contributors are listed in CONTRIBUTORS.md.
Security
See SECURITY.md.
License
MIT Copyright (c) 2026 Afnanksalal
This license covers the installer, launcher, and preload in this repository only. It does not cover Cursor Agent or any Anysphere / Cursor proprietary software downloaded by the installer.
