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.2

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.2
File Size Uploaded
termux_ai-0.5.2.tar.gz 14.0 kB Details

Built distribution (wheel)

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

Total release size: 30.5 kB

Release files / termux_ai-0.5.2.tar.gz

Download URL termux_ai-0.5.2.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
de3463e6c09a18981edadcbf3ddd8c1a9391cbd969988861217ce6a21e65088a
BLAKE2b-256 checksum
How to use checksums
3d3aefff649567c96c3f67d8798f60e6f3ef9c7006c5ce1b4f1f545722c654bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 19, 2026.

Transparency log

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

Download URL termux_ai-0.5.2-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
507321288d39dfe1bf097b68dbadf74bebc32efe59f2a2a1038278d07489ab90
BLAKE2b-256 checksum
How to use checksums
ac9ec8c4e2266592fd6d003620ab7edfcfcb26dfdae36bc2d78bb1ac0df554de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.0

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