Skip to content
Alienkrishn edited this page Mar 30, 2025 · 2 revisions

📚 Termux AI Assistant Wiki (v2.0)

🌟 Core Features

  • 10 Free AI Models via OpenRouter API
  • Interactive Terminal UI with color support
  • Encrypted API Key Storage in ~/.config/termux_assistant/
  • Conversation History with timestamp
  • No Root Required

🚀 Installation

curl -sL https://is.gd/Termux_Ai | bash

Auto-installs dependencies:

  • curl - API requests
  • jq - JSON processing
  • bc - Math calculations

🧠 Model Catalog

🔍 Available Models

Model ID Provider Parameters Best For
deepseek-r1 Deepseek 7B General Q&A
qwen2.5-vl-32b Alibaba 32B Multimodal
rogue-rose Sophosympatheia 103B Technical analysis
Full list...

💡 Tip: Use mistral-small for fastest responses


🖥️ Usage Guide

🏁 First Run

  1. Launch with termux-ai
  2. Navigate to:
    Settings (2) → API Key (1)
  3. Enter your OpenRouter key

🗣️ Chat Session

[MAIN MENU]
1. Start Chat Session  
2. Settings  
3. View History  
4. Exit
  • Type exit or quit to end session
  • Press Ctrl+C for emergency exit

⚙️ Settings

Option Description Default
API Key OpenRouter authentication -
Model Selection Switch between 10 models deepseek-r1
Max Tokens Response length limit 800
Temperature Creativity control (0.1-2.0) 0.7

🔧 Troubleshooting

🚨 Common Issues

Symptom Solution
API errors Verify key at OpenRouter
Model timeout Switch to lighter model (gemma-3-27b)
Blank responses Check debug.log for errors

📜 Log Files

# View error logs
cat ~/.config/termux_assistant/debug.log

# Check history
nl -ba ~/.config/termux_assistant/history

❓ FAQ

❔ How to update?

pkg upgrade termux-ai  # If installed via repo

or

curl -sL https://is.gd/Termux_Ai | bash  # Fresh install

❔ Where is data stored?

~/.config/termux_assistant/

  • config - Settings
  • history - Chat logs
  • api_key - Encrypted credential

❔ Can I use paid models?

Yes - add funds to your OpenRouter account for GPT-4/Claude access


⚠️ Limitations

  • No pipe input (echo "hi" | termux-ai)
  • No command arguments (all settings in-menu)
  • No background mode (keep Termux open)

📌 Pro Tips

  1. Use termux-wake-lock for long sessions
  2. Clear history via Settings → Clear History
  3. Lower max_tokens on slow connections

🔗 Official Repository: Anon4You/Termux-Ai
📅 Last Updated: July 2024
🐞 Report Issues: GitHub Issues


Appendix: Detailed Model Specs

Model ID Context Window Supported Languages Rate Limits
deepseek-r1 4K EN/CN/JP 5 req/min
qwen2.5-vl-32b 8K Multilingual 3 req/min
rogue-rose 16K EN/DE/FR 1 req/min