{"id":49235269,"url":"https://github.com/niyazmft/droid-ai-toolkit","last_synced_at":"2026-04-24T15:05:03.598Z","repository":{"id":340445733,"uuid":"1166076361","full_name":"niyazmft/droid-ai-toolkit","owner":"niyazmft","description":"🤖 Automated toolkit for running AI tools (OpenClaw, Gemini CLI, n8n) on Android via Termux. Kernel patches, path redirection, and memory optimization for non-rooted devices.","archived":false,"fork":false,"pushed_at":"2026-04-14T19:22:13.000Z","size":8129,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T21:22:39.469Z","etag":null,"topics":["agentic-ai","ai-gateway","android","automation","mig","openclaw","self-hosted","shell-script","slack-bot","telegram-bot-ai-assistant","termux","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niyazmft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-24T21:16:06.000Z","updated_at":"2026-04-14T19:19:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/niyazmft/droid-ai-toolkit","commit_stats":null,"previous_names":["niyazmft/openclaw-android-toolkit","niyazmft/droid-ai-toolkit"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/niyazmft/droid-ai-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niyazmft%2Fdroid-ai-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niyazmft%2Fdroid-ai-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niyazmft%2Fdroid-ai-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niyazmft%2Fdroid-ai-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niyazmft","download_url":"https://codeload.github.com/niyazmft/droid-ai-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niyazmft%2Fdroid-ai-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32228461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai-gateway","android","automation","mig","openclaw","self-hosted","shell-script","slack-bot","telegram-bot-ai-assistant","termux","whatsapp-bot"],"created_at":"2026-04-24T15:05:02.981Z","updated_at":"2026-04-24T15:05:03.592Z","avatar_url":"https://github.com/niyazmft.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Droid AI Toolkit (Termux)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/Cover.png\" width=\"100%\" alt=\"Droid AI Toolkit Cover\"\u003e\n\u003c/p\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Version](https://img.shields.io/badge/version-1.9.0-blue.svg)](https://github.com/niyazmft/droid-ai-toolkit)\n\n[![Platform](https://img.shields.io/badge/Platform-Android%20(Termux)-green.svg)](https://termux.dev/)\n\nA high-performance, automated toolkit for running AI tools — [OpenClaw](https://github.com/the-claw-team/openclaw), [Gemini CLI](https://github.com/google/gemini-cli), [n8n](https://github.com/n8n-io/n8n), [Ollama](https://ollama.com), and [Hermes](https://hermes-agent.nousresearch.com) — natively on non-rooted Android devices. This toolkit bypasses kernel restrictions (`renameat2`), patches hardcoded system paths, and optimizes execution for mobile environments.\n\n---\n\n## 📱 Compatibility\n\n- **OS**: Android 9.0 and above.\n- **Architecture**: Tested on `armv8l` (32-bit) and `aarch64` (64-bit) CPUs.\n- **Optimization**: Automatically detects system RAM and recommends appropriate memory limits (512MB to 2048MB) for Node.js and n8n workloads.\n- **Package Managers**: Supports both **npm** (Standard) and **pnpm** (High Efficiency) for Node.js-based tools.\n- **Process Management**: Supports **PM2** (Recommended) and **termux-services** (Native).\n\n---\n\n## 🚀 Quick Start\n\n### 1. Environment Setup\n\nInstall **Termux** from [F-Droid](https://f-droid.org/en/packages/com.termux/). Do **not** use the Play Store version as it is obsolete.\n\n### 2. Run the Toolkit\n\nExecute the following command to start the interactive toolkit:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/niyazmft/droid-ai-toolkit/main/install.sh | bash\n```\n\n\u003e 💡 **Smart Repair (v1.5.0+):** If a tool is already installed, the toolkit offers a **[R] Repair** mode. Use this to fix Android-specific patches in seconds without re-downloading the entire package.\n\n### 3. Choose Your Tools\n\nThe toolkit menu provides one-click install/repair for:\n\n| Option | Tool | Description |\n| :---: | :--- | :--- |\n| **1** | **Hermes** | Nous Research AI agent |\n| **2** | **OpenClaw** | AI Gateway with multi-channel support |\n| **3** | **Gemini CLI** | Google's command-line AI assistant |\n| **4** | **n8n** | Workflow automation server |\n| **5** | **Ollama** | Local LLM runner (Termux native package) |\n\n### 4. Onboard OpenClaw (If Installed)\n\nInitialize your account and API providers:\n\n```bash\nopenclaw onboard\n```\n\n*Select **QuickStart** and choose an external provider (OpenRouter, OpenAI, etc.).*\n\n### 5. Background Service (Optimized)\n\nTo keep tools running even after you close Termux:\n\n1. Run the toolkit and choose **Option 7 (Manage PM2 Processes)**.\n2. Select the service you want to start (OpenClaw, n8n, or Ollama).\n3. View logs with: `pm2 logs`\n\n---\n\n## ✨ Key Features\n\n- 🛠 **Smart Repair**: Detects existing installations and provides a 2-second \"Repair Only\" path to re-apply patches without redundant downloads.\n- 🩹 **Zero-Config Patching**: Automatically fixes the `koffi` native bridge and `renameat2` kernel crashes for OpenClaw.\n- 📂 **Path Awareness**: Aggressively redirects `/bin/npm`, `/bin/node`, and `/tmp` to Termux-compatible directories using `$PREFIX`.\n- 🚀 **PM2 Integration**: Native support for starting, stopping, and monitoring OpenClaw, n8n, and Ollama via PM2 with optimized memory flags.\n- 📦 **pnpm Support**: Integrated support for pnpm to speed up installations and save storage space.\n- 🧠 **Memory Guard**: Automatically clears memory (PM2 kill) and increases Node.js heap limits (1.5GB+) to prevent crashes on low-RAM devices during updates.\n- 🛡 **Surgical Cleanup**: The uninstaller offers **Soft/Deep** options and a **Wipe Stack (Reset)** function that preserves your system packages while cleaning the apps.\n- 🧩 **Gemini CLI Support**: Dedicated installer with NDK environment optimizations.\n- 🦙 **Ollama Support**: One-click install via Termux native package (`pkg install ollama`).\n- ⚡ **Hermes Support**: One-click install via official curl installer.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/4-gemini_cli.jpg\" width=\"300\" alt=\"Gemini CLI Interface\"\u003e\n\u003c/p\u003e\n\n---\n\n## 🦙 Ollama (Local LLMs)\n\nRun large language models locally on your Android device. Installed via Termux's native package manager:\n\n```bash\nollama serve          # Start the server\nollama pull llama3    # Download a model\nollama run llama3     # Run a model\n```\n\nUse **Option 7 (PM2)** to keep Ollama running in the background. Downloaded models are stored in `~/.ollama` and preserved during uninstall.\n\n---\n\n## ⚡ Hermes (Nous Research Agent)\n\nAI agent by Nous Research, installed via the official curl installer:\n\n```bash\nhermes                # Start the agent\n```\n\n---\n\n## 🗑 Uninstallation \u0026 Reset\n\nRun the toolkit and select **Option 9 (Uninstall)** to access the modular uninstallation menu. Each option provides a detailed summary of the impact before you confirm:\n\n- **Remove OpenClaw**: Choice of **Soft Uninstall** (keeps memories/skills) or **Deep Uninstall** (full wipe). Automatically cleans up PM2 and background services.\n- **Remove Gemini CLI**: Full removal of application binaries and configurations.\n- **Remove n8n**: Surgically kills the GCP tunnel (port 5678) and removes the watchdog cron.\n- **Remove Ollama**: Removes the package. Downloaded models in `~/.ollama` are preserved.\n- **Remove Hermes**: Runs the official uninstaller if available, otherwise removes directories manually.\n- **Wipe Software Stack (Reset)**: Batch \"Deep Uninstall\" of all five applications. **Safe Reset**: Cleans all toolkit-specific data but **preserves system packages** (Node.js, Git, Python, etc.) so your other Termux apps don't break.\n\n---\n\n## 📱 n8n Android Infrastructure\n\nThis toolkit includes a professional-grade setup for running **n8n** on Android with an optional GCP bridge for secure public access.\n\n### 1. Installation\n\nRun the toolkit and choose **Option 4 (Install/Repair n8n Server)**. This will:\n\n- Install n8n, Python 3, and process monitors.\n- Configure a 5-minute watchdog (Cron) to ensure 24/7 uptime.\n- Set up an optimized memory cap for your device.\n\n### 2. Monitoring \u0026 Control\n\n- **Manual Restart**: Choose **Option 7** in the toolkit or run `~/n8n_server/scripts/n8n-monitor.sh`.\n- **View n8n Dashboard**: If not using a bridge, access locally at `http://localhost:5678`.\n\n---\n\n## 🌐 GCP Bridge Walkthrough (Optional)\n\nTo expose your n8n instance securely to the internet (`https://yourdomain.com`), follow this walkthrough:\n\n### Step 1: Prepare the GCP VM\n\n1. **Create Instance**: In GCP Console, create an `e2-micro` VM (Debian/Ubuntu).\n2. **Static IP**: Reserve a static external IP for this VM.\n3. **Firewall**: Allow **TCP 80** (HTTP), **443** (HTTPS), and **22** (SSH).\n\n### Step 2: Set up DNS\n\n1. Point your domain (e.g., `n8n.example.com`) to the GCP VM's static IP.\n\n### Step 3: Configure Nginx (on GCP VM)\n\n1. Install Nginx and Certbot: `sudo apt install nginx certbot python3-certbot-nginx`\n2. Create a site config that proxies to `localhost:5678`.\n3. Secure it with SSL: `sudo certbot --nginx -d yourdomain.com`\n\n### Step 4: Establish the Tunnel\n\n1. Run the toolkit on your Android device and choose **Option 6 (Configure GCP Bridge)**.\n2. Follow the prompts to enter your VM IP and Domain.\n3. Copy the generated **SSH Public Key** and paste it into the GCP VM's `~/.ssh/authorized_keys` file.\n4. The monitor script will now automatically maintain a secure `autossh` tunnel to the VM.\n\n---\n\n## 📊 Management Commands\n\n| Action | Command |\n| :--- | :--- |\n| **Check Health** | `sv status openclaw` |\n| **View Live Logs** | `tail -f ~/.openclaw/logs/current` |\n| **Stop Service** | `sv down openclaw` |\n| **Restart Gateway** | `sv restart openclaw` |\n| **Force Kill (Stray)** | `pkill -9 -f openclaw` |\n| **Fix Environment** | `openclaw doctor` |\n| **Find Access Token** | `grep \"token\" ~/.openclaw/openclaw.json` |\n| **Ollama: Start Server** | `ollama serve` |\n| **Ollama: Pull Model** | `ollama pull llama3` |\n| **Ollama: Run Model** | `ollama run llama3` |\n| **Hermes: Start** | `hermes` |\n\n---\n\n## 🔄 Maintenance\n\n### 🛡 Safe Updates \u0026 Smart Repair\n\n**⚠️ WARNING:** Never use the built-in `openclaw update` command. It will overwrite the Android patches and break the application.\n\nTo update or repair safely:\n\n1. Run the `install.sh` script.\n2. Choose the tool's **Install/Repair** option from the menu.\n3. Select **[R] Repair** to fix patches instantly (2s) or **[U] Update** to install the latest verified version.\n\n\u003e 💡 **Latest Version:** This toolkit always installs the latest available version of each tool to ensure maximum feature compatibility and security.\n\n### 🔋 Battery Optimization\n\nTo prevent Android from killing the background process, run:\n\n```bash\ntermux-wake-lock\n```\n\n---\n\n## 🛠 Troubleshooting\n\n- **Telegram Plugin Not Available**: This toolkit attempts to pre-fix this. If it persists, finish onboarding and run: `openclaw channels add --channel telegram`.\n- **Homebrew Recommendations**: **Ignore them.** Homebrew is not supported on Android. Use `pkg install \u003cpackage\u003e` for any missing dependencies.\n- **Node.js Errors**: Run the toolkit's **Install/Repair** option to reset environment locks and paths.\n- **Ollama Not Found After Install**: Restart Termux or run `source ~/.bashrc` to refresh your PATH.\n\n---\n\n## 🛠 Code Quality\n\nThis project implements a \"Zero-Waste\" and \"Self-Healing\" quality gate to maintain high standards for all contributions.\n\n### Tools Used\n\n- **ESLint v10**: Modern JavaScript and JSON linting via Flat Config.\n- **Stylelint**: Standardized CSS quality checks.\n- **Markdownlint**: Documentation consistency enforcement.\n- **Husky \u0026 lint-staged**: Automated pre-commit hooks to auto-fix code.\n- **Self-Healing**: Custom Python scripts to safely refactor unused code.\n\n### Usage\n\nRun the full quality audit locally:\n\n```bash\npnpm run lint:all\n```\n\n---\n\n## 📄 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniyazmft%2Fdroid-ai-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniyazmft%2Fdroid-ai-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniyazmft%2Fdroid-ai-toolkit/lists"}