Skip to content

hatixntsoa/gemini.chat.tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini Chat TUI 🤖

gemini-chat-tui is a terminal-based chat interface for interacting with Google's Gemini AI model directly from your terminal. It provides a clean Textual-based user interface with rich output and seamless Gemini API integration.

Python Version License: MIT Project Status

Contents

Features | Screenshot | Setup & Run | Termux Support | Requirements | License


Features

  • Terminal UI (Textual) — Clean, keyboard-driven chat interface for Gemini AI.
  • Asynchronous Interaction — Input is disabled while Gemini responds for smooth UX.
  • Environment Variable Management — Securely load your API key using .env.
  • Lightweight & Fast — No unnecessary dependencies, minimal setup.
  • Cross-Platform — Works on Linux, macOS, and Windows.

Screenshot

Gemini Chat TUI running in terminal

Example: Gemini Chat TUI in action inside the terminal interface.


Setup & Run

1. Clone the repository

First, clone this repository and navigate into the project folder:

git clone https://github.com/hatixntsoa/gemini.chat.tui.git
cd gemini.chat.tui

2. Create a Virtual Environment

You can use either Python’s built-in venv or uv to manage your environment.

Option 1: Using Python venv

python -m venv .venv

Option 2: Using uv (recommended for speed)

uv --quiet venv --seed .venv

3. Activate the Virtual Environment

macOS / Linux

source .venv/bin/activate

Windows (Command Prompt)

.venv\Scripts\activate

Windows (PowerShell)

.\.venv\Scripts\Activate.ps1

4. Set Up Environment Variables

The application requires a valid Gemini API key — either free or paid — which can be generated through your Google Account on the Google AI Studio API platform.

Once you have your key, create a .env file in the project’s root directory and add it as follows:

echo "GEMINI_API_KEY=your-api-key-here" > .env

5. Install Dependencies

Install all required packages using pip:

pip install -r requirements.txt

or using uv if installed

uv pip install -r requirements.txt

6. Run the TUI application

python pychatui/main.py

Termux Support 🚧

Note: A Termux-compatible version will be released soon.

Currently, google-generativeai depends on gRPC (grpcio), which requires native compilation and doesn’t provide prebuilt binaries for ARM64 (used by Termux on Android).

Building grpcio manually would need Rust toolchains and C/C++ build dependencies, but compilation still fails on Termux environments at this time.

Once a working build process or precompiled ARM64 wheels become available, full Termux support will be added.


Requirements

  • Python 3.8+

  • Dependencies (automatically installed via pip):

    • python-dotenv>=1.0.0
    • google-generativeai>=0.7.0
    • textual>=0.77.0
    • rich>=13.0.0

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Simple Gemini TUI Chat App

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages