A high-performance Terminal User Interface (TUI) designed to replicate the experience of browser based llm chat applications directly in your terminal.
Project description
PureChat
A high-performance Terminal User Interface (TUI) designed to replicate the experience of browser based llm chat applications directly in your terminal. This tool provides persistent conversation memory, real-time streaming, and interactive session management.
💡 Motivation
Most modern AI CLI tools have become heavily "agentic." While powerful for automation, they often force massive context windows, auto-execute commands, and prioritize task completion over simple conversation. This results in high token consumption, slower response times, and a lack of control over what data is being sent.
Gemini CLI Vault was built to fill the gap for a "regular" chat app in the terminal. It provides a familiar web-like experience for discussing complicated topics in a controlled environment where you don't want the tool to send excessive context or execute commands autonomously.
✨ Key Features
- Persistent Memory: Conversations are stored in a local SQLite database (gemini_vault.db), allowing you to resume any chat session at any time.
- Live Streaming & Markdown: Responses stream in real-time with full Markdown rendering, including syntax-highlighted code blocks, tables, and lists.
- Intelligent Context Window: Automatically manages token usage using a sliding window of the last 12 messages to maintain context without exceeding limits.
- Interactive Session Switcher: Use the /conversations command to browse, search, and switch between previous chat sessions using an arrow-key menu.
- Global Command History: Navigate your previous prompts across all sessions using the UP and DOWN arrows (powered by prompt_toolkit).
- Google Search Integration: The assistant is equipped with the Google Search tool to provide up-to-date information on current events.
- Dynamic Personalities: Load custom system instructions from a GEMINI.md file to change the AI's behavior and tone.
🛠️ Installation (using uv)
- Clone the repository:
git clone https://github.com/yourusername/gemini-cli-vault.git
cd gemini-cli-vault
- Configure Environment Variables:
# Create a .env file in the project root:
GEMINI_API_KEY=your_google_api_key_here
GEMINI_MODEL=gemini-3-flash-preview
- (Optional) Define System Instructions: Create a GEMINI.md file to set the AI's System Prompt: You are an expert software architect. Provide concise, high-level advice and always include code snippets in Python or Rust.
🚀 Usage
Start a new or default session:
uv run main.py
Start or resume a specific session by name:
python main.py --name Project-Alpha
⌨️ In-Chat Commands
/conversations: Opens the interactive session manager to switch or create chats./exit: Safely saves and exits the application.UP / DOWN: Cycle through your entire history of user prompts.Ctrl+C: Interrupt the current input line.
🏗️ Project Architecture
main.py: The entry point and TUI controller. Handles the input loop and rich live display.db_manager.py: The data layer. Manages SQLite tables, message logging, and session retrieval.ai_manager.py: The AI integration layer. Configures the google-genai client, tools, and system instructions.gemini_vault.db: The local database generated on first run.
🤖 AI Disclosure
This project was primarily developed with the assistance of AI. While the core logic, architecture, and feature set were human-directed, the majority of the code implementation and boilerplate was generated and refined using Large Language Models.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pure_chat-0.1.1.tar.gz.
File metadata
- Download URL: pure_chat-0.1.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73df791ccaa92cbf6a69915b36088fa6e2b4d01be740b5c27c4e26a5d2a16d59
|
|
| MD5 |
7d9f667170fd24239fdf08aabd92dd32
|
|
| BLAKE2b-256 |
c7dbd7d8bfff55b91534416027f15eefe0f74e00557c377b2a99973bd1255948
|
File details
Details for the file pure_chat-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pure_chat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72c75c316ebe65ba1412ca04afb31933b0074ad7e0a82d9c1106f4401f833083
|
|
| MD5 |
000b7957f641303215b04247b7ffe4bd
|
|
| BLAKE2b-256 |
72cab8659ac33185e1be7cadc4edb0a13080ccd91dc73b95d0e464cada0eedcd
|