https://github.com/alex72-py/aria-termux
Terminal-native AI assistant built specifically for Termux and Android development.
https://github.com/alex72-py/aria-termux
ai ai-agents aiagent android assistant cli gemma gemma4 llm mobile mobile-development mobile-first mobile-friendly python termux
Last synced: about 2 months ago
JSON representation
Terminal-native AI assistant built specifically for Termux and Android development.
- Host: GitHub
- URL: https://github.com/alex72-py/aria-termux
- Owner: Alex72-py
- License: mit
- Created: 2026-05-11T07:28:10.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-11T08:21:26.000Z (about 2 months ago)
- Last Synced: 2026-05-11T10:14:51.098Z (about 2 months ago)
- Topics: ai, ai-agents, aiagent, android, assistant, cli, gemma, gemma4, llm, mobile, mobile-development, mobile-first, mobile-friendly, python, termux
- Language: Python
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ ARIA โ AI Terminal Co-Pilot for Termux
[](https://python.org)
[](https://www.gnu.org/software/bash/)
[](LICENSE)
[](https://ai.google.dev/)
> **Built for developers who use Termux as a real development environment on Android.**
---
## ๐ Table of Contents
- [About](#about)
- [โจ Features](#-features)
- [๐ธ Screenshots](#-screenshots)
- [๐ฌ Demo](#-demo)
- [๐ Quick Start](#-quick-start)
- [๐ First Run](#-first-run)
- [๐ Usage](#-usage)
- [๐๏ธ Architecture](#-architecture)
- [๐ง Knowledge Base](#-knowledge-base)
- [๐ก๏ธ Safety Features](#-safety-features)
- [๐ Supported Models](#-supported-models)
- [โ๏ธ Configuration](#-configuration)
- [๐งช Testing](#-testing)
- [โ ๏ธ Limitations](#-limitations)
- [๐ค Contributing](#-contributing)
- [๐ License](#-license)
---
## About
ARIA is a terminal-native AI assistant designed specifically for Termux and Android development workflows. It combines Google's Gemma 4 models with a Termux-focused knowledge base, command system, and[...]
### Why ARIA?
Unlike generic desktop-focused coding assistants, ARIA understands the unique constraints of Android-based development:
โ๏ธ **Clang** instead of GCC
๐๏ธ **Android filesystem quirks**
๐ **Proot/container environments**
๐ฑ **Mobile-only workflows**
๐ซ **Package and permission limitations**
๐ **Termux-specific debugging patterns**
---
## โจ Features
### ๐ป Advanced Terminal UI
- Slash Command Interface (`/ask`, `/fix`, `/models`, `/watch`)
- Rich syntax highlighting & formatting
- Animated startup sequences
- Color-coded output
### ๐ค Intelligent AI
- Dynamic Gemma model discovery
- Auto model switching
- Self-healing API layer
- Graceful fallback handling
### ๐ก๏ธ Safety First
- Risk scoring system
- Confirmation prompts for dangerous operations
- Guardian safety layer
- Multi-level command validation
### ๐ Knowledge Base
- Common Termux errors
- Package management tips
- Python environments
- Proot-distro setup
- Android bridge tools
### ๐ Additional Features
- **Clipboard Integration**: Copy commands with one keystroke
- **Watch Mode**: Auto-detect and analyze terminal errors
- **Offline Support**: Works without internet for KB queries
---
## ๐ธ Screenshots
๐ฑ Click to expand screenshot gallery
### Startup Interface

### Model Selection

### Error Analysis

---
## ๐ฌ Demo
https://github.com/user-attachments/assets/0bdec9c0-fd24-4844-8c09-aea0cd376e34
---
## ๐ Quick Start
### Prerequisites
- Termux app on Android
- Python 3.8+
- Internet connection (for AI features)
### Installation
```bash
# Update system packages
pkg update && pkg upgrade -y
# Install required tools
pkg install python git -y
pkg install termux-api -y
# Clone and install ARIA
git clone https://github.com/Alex72-py/aria-termux.git
cd aria-termux
# Install Python dependencies
pip install -r requirements.txt
# Launch ARIA
python run_aria.py
```
> ๐ก **Tip:** `termux-api` is optional but recommended for clipboard integration. ARIA will gracefully fall back without it.
---
## ๐ First Run
ARIA launches an interactive configuration wizard on first startup:
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Welcome to ARIA Configuration Wizard โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Enter Google AI Studio API key: โขโขโขโขโขโขโขโขโขโขโขโขโขโข
Enter preferred model: gemma-4-31b-it
Enable Guardian mode? [y/n]: y
Enable watch mode? [y/n]: n
```
**Get your free API key here:**
๐ [Google AI Studio](https://aistudio.google.com/app/apikey)
---
## ๐ Usage
### Command Reference
CommandDescriptionExample
/ask
Ask ARIA any question about Termux or development
/ask How do I install Python on Termux?
/fix
Analyze and fix terminal errors
/fix "clang: error: linker command failed"
/models
List all available Gemma models
/models
/kb
Search the offline knowledge base
/kb python module not found
/watch
Enable automatic error detection
/watch
---
## ๐๏ธ Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ARIA Core System โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ Command System โ
โ โโ /ask, /fix, /models, /kb, /watch โ
โ โ
โ ๐ค API Client โ
โ โโ Auto Model Discovery โ
โ โโ Intelligent Retry Logic โ
โ โโ Fallback Handling โ
โ โ
โ ๐ก๏ธ Guardian Safety Layer โ
โ โโ Risk Assessment โ
โ โโ Confirmation Prompts โ
โ โ
โ ๐ Watch Mode โ
โ โโ Error Detection โ
โ โโ Auto Analysis โ
โ โ
โ ๐ Offline Knowledge Base โ
โ โโ Termux Troubleshooting โ
โ โ
โ ๐จ Rich Terminal UI โ
โ โโ Syntax Highlighting โ
โ โโ Animations โ
โ โโ Color-Coded Output โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ง Knowledge Base
ARIA includes comprehensive offline knowledge covering:
| Category | Topics |
|----------|--------|
| ๐ **Common Errors** | Package conflicts, permission issues, build errors |
| ๐ฆ **Package Management** | pkg, apt, pip installation & troubleshooting |
| ๐ **Python** | Virtual environments, venv, pip caching |
| ๐ง **Proot-Distro** | Linux distributions, container setup |
| ๐ **Android Bridge** | Termux:API, Tasker integration, system access |
| ๐ **Git & SSH** | SSH keys, Git configuration, GitHub access |
| ๐ **Networking** | Port forwarding, localhost, DNS issues |
---
## ๐ก๏ธ Safety Features
### Guardian Safety Layer
ARIA analyzes potentially dangerous commands before execution with a comprehensive risk assessment system:
Risk Level
Color
Description
Action
๐ข Low
Green
Safe operations (listing, viewing)
Execute immediately
๐ก Medium
Yellow
Network/code operations
Execute with notice
๐ High
Orange
User/system modifications
Require confirmation
๐ด Critical
Red
Recursive deletion, destructive commands
Require explicit approval
---
## ๐ Supported Models
ARIA supports the full lineup of Google Gemma 4 models:
```
Gemma 4 Model Family
โโโ gemma-4-2b-it (Lightweight, 2B parameters)
โโโ gemma-4-4b-it (Balanced, 4B parameters)
โโโ gemma-4-26b-a4b-it (Advanced, 26B parameters)
โโโ gemma-4-31b-it (Expert, 31B parameters)
```
**Auto-discovery:** ARIA fetches available models from your API key automatically.
---
## โ๏ธ Configuration
### Config File
Configuration is stored locally in:
```
~/.aria/config.json
```
Example structure:
```json
{
"api_key": "your-google-ai-studio-key",
"model": "gemma-4-31b-it",
"guardian_mode": true,
"watch_mode": false
}
```
### Environment Variables
Override config with environment variables:
```bash
export ARIA_API_KEY="your-key"
export ARIA_MODEL="gemma-4-31b-it"
export ARIA_GUARDIAN_MODE="true"
```
---
## ๐งช Testing
Run the test suite with pytest:
```bash
# Run all tests
python -m pytest tests/
# Run with verbose output
python -m pytest tests/ -v
# Run specific test file
python -m pytest tests/test_api.py
```
---
## โ ๏ธ Limitations
> **Development Status:** This is a hackathon submission. These limitations are planned for future releases.
- ๐ Watch mode is experimental and may require manual review
- ๐ Internet connection required for AI features (knowledge base works offline)
- ๐ฑ Optimized primarily for Termux on Android
- ๐ค Some auto-fix suggestions require manual verification
- ๐ Transparent reasoning output shows intermediate model thinking
---
## ๐ง Transparent Reasoning
ARIA intentionally exposes intermediate reasoning during operations. This helps:
โ
Debug prompt and model behavior
โ
Inspect reasoning quality
โ
Improve transparency during testing
โ
Analyze response generation in real time
**Future releases** will include:
- Optional hidden reasoning mode
- Cleaner response streaming
- User-configurable verbosity levels
- Dedicated developer/debug modes
---
## ๐ฆ Dependencies
| Package | Purpose |
|---------|---------|
| `google-generativeai` | Google Gemma API client |
| `rich` | Rich terminal formatting & UI |
| `click` | CLI command interface |
| `pydantic` | Data validation & models |
| `python-dotenv` | Environment variable management |
See `requirements.txt` for versions and additional dependencies.
---
## ๐ค Contributing
We welcome contributions! Here's how to get started:
```bash
# Create a feature branch
git checkout -b feature/my-feature
# Make your changes and commit
git add .
git commit -m "Add my feature"
# Push and create a pull request
git push origin feature/my-feature
```
**Guidelines:**
- Follow PEP 8 for Python code
- Add tests for new features
- Update documentation
- Keep commits focused and descriptive
---
## ๐ License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
```
MIT License
Copyright (c) 2026 Alex72-py
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
```
---
## ๐ฏ Hackathon Submission
**Submitted for:** Google Gemma 4 Challenge
### ๐ Highlights
- ๐ฏ **Real-world Focus**: Actual Termux developer workflow optimization
- ๐ **Dynamic Discovery**: Auto-detect and switch between available models
- ๐ก๏ธ **Resilient API**: Self-healing with intelligent retry logic
- ๐ฑ **Mobile-First**: Terminal UI optimized for small screens
- ๐พ **Offline Ready**: Fallback support without internet connection
- ๐ **Safety-Conscious**: Risk assessment before executing commands
---
### ๐ ARIA
*Making Android terminal development faster, safer, and more usable.*
**[โฌ back to top](#-aria--ai-terminal-co-pilot-for-termux)**
[](https://github.com/Alex72-py/aria-termux)
[](https://github.com/Alex72-py)