Skip to main content

Termux-AI

Release

Termux-AI is a lightweight, zero-dependency CLI wrapper for AI models (Gemini, OpenAI, Groq, Mistral), built for Termux on Android and general Linux environments. It brings the power of LLMs directly to your command line, following the Unix philosophy of piping and standard streams.

⚡ Features

  • 🚀 Lightweight: Uses standard Python requests. No heavy SDKs.
  • 🟢 Unix Compatible: Supports piping (stdin).
  • 🛠 Configurable: JSON configuration system (ai -c) for Prompts, Temperature, and Models.
  • 🛡 Secure: Restricted file permissions (600) for configuration.
  • ⏳ Robust: Built-in request timeouts and error handling.
  • 💬 Chat Mode: Keeps conversation context using --chat flag.
  • ⚡ Streaming: Real-time response streaming for a better experience.
  • 🔑 Env Support: Supports GEMINI_API_KEY, OPENAI_API_KEY, GROQ_API_KEY, and MISTRAL_API_KEY environment variables.

📥 Installation

Global Install (Recommended)

pip install termux-ai
# or
pipx install termux-ai

🔑 Setup

On the very first run, Termux-AI will ask for your AI provider and API Key.

  • Your configuration and history will be saved at ~/.local/share/termux-ai/.

💻 Usage

Basic Questions

ai "How do I untar a file in Linux?"

Piping (The Power Move)

cat error.log | ai "Explain what caused this crash"

Chat Mode (Contextual)

ai --chat "I want to learn Python."
# Next query...
ai --chat "What was the first thing I asked you?"

⚙️ Configuration

Run ai -c to open your configuration in your default editor.

🛠 Development

See GEMINI.md for development workflows, testing, and contribution guidelines.

📄 License

MIT License.

Metadata

Release files for termux-ai 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termux-ai 0.5.0
File Size Uploaded
termux_ai-0.5.0.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for termux-ai 0.5.0
File Interpreter ABI Platform
termux_ai-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.8 kB

Release files / termux_ai-0.5.0.tar.gz

Download URL termux_ai-0.5.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
29f89385b67959f42f306e269fce5b473390245780872633336935b3f59b0a41
BLAKE2b-256 checksum
How to use checksums
acac919847d74ab82c025ce3c867911a6dac492e4dc0b29cabb0c50c043bb7b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 8, 2026.

Transparency log

Release files / termux_ai-0.5.0-py3-none-any.whl

Download URL termux_ai-0.5.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc38d5e04f1873ea8ca7328498a4308d609fee97f1a3d963c4f3580f90af4fe6
BLAKE2b-256 checksum
How to use checksums
1e5cbf77368cdb273c3749db14510758ea9b3a88991f3630b271ea723a85922a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.2

2 release files

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page