Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– PocketAI

A lightweight, private, and beautiful local AI assistant powered by Ollama.

Python License: MIT Version Ollama Platform

GitHub Repo GitHub release GitHub stars

PocketAI is an elegant terminal-based AI assistant that connects to your local Ollama server.

Unlike cloud AI assistants, PocketAI keeps everything offline, private, and under your control.

Whether your AI model runs on your desktop computer or on your Android phone through Termux, PocketAI provides the exact same seamless experience over your local network.

โšก Fast โ€ข ๐Ÿ”’ Private โ€ข ๐ŸŽจ Beautiful โ€ข ๐Ÿ’ป Terminal First


โœจ Features

  • ๐Ÿค– Local AI chat powered by Ollama
  • ๐Ÿš€ First-Run Setup Wizard
  • ๐Ÿค– Automatic Ollama Detection
  • ๐Ÿ“ฆ Automatic Model Detection
  • โš™๏ธ Automatic Configuration Creation
  • ๐Ÿ–ฅ๏ธ EXE Ready (No manual config required)
  • ๐Ÿ›ก๏ธ Graceful Ctrl+C Exit Confirmation
  • โšก Real-time streaming responses
  • ๐Ÿง  Conversation memory
  • ๐Ÿ’พ Save conversations
  • ๐Ÿ“š Browse saved chat history
  • ๐Ÿ“‚ Load previous conversations
  • โœ๏ธ Rename saved conversations
  • ๐Ÿ—‘๏ธ Delete saved conversations
  • ๐ŸŽจ Multiple beautiful themes
  • ๐Ÿ“Š Built-in response statistics
  • ๐Ÿ” Search within the current conversation
  • ๐Ÿ“ค Export conversations to Markdown, Plain Text, or PDF
  • ๐Ÿ”„ Built-in update checker
  • ๐Ÿ“ฆ Model browser & quick model switching
  • ๐Ÿ“– Rich help menu
  • ๐Ÿ”’ 100% Local & Private
  • ๐Ÿ“ฑ Windows โ€ข Linux โ€ข Android Hybrid Support

๐Ÿ† Feature Comparison

Feature PocketAI ChatGPT Web Local AI Web UIs
Offline processing โœ… โŒ โœ…
Rich Terminal UI โœ… โŒ โŒ
Zero Setup (EXE) โœ… โœ… โŒ
Android (Termux) Ready โœ… โŒ โŒ
Open Source โœ… โŒ โœ…
Document Chat (RAG) v0.6 โœ… โš ๏ธ (Varies)

๐ŸŒŸ Why PocketAI?

PocketAI was built for developers, students, Linux users, and AI enthusiasts who love working inside the terminal. Instead of providing another heavy browser interface, PocketAI focuses on simplicity.

Why choose PocketAI?

  • ๐Ÿš€ Starts instantly
  • ๐Ÿ’ป Terminal-first workflow
  • ๐Ÿชถ Lightweight architecture
  • ๐Ÿ”’ Completely offline
  • ๐ŸŽจ Beautiful Rich-powered UI
  • ๐Ÿ“‚ Persistent conversation management
  • โšก Extremely fast
  • โค๏ธ Open Source

If you spend most of your time in the terminal, PocketAI feels like a natural AI companion.


๐Ÿ“ธ Preview

๐Ÿ“ธ Screenshots and demo GIFs will be added soon.

Current UI includes:

  • ๐Ÿš€ First-Run Setup Wizard
  • ๐ŸŽจ Rich Dashboard
  • ๐Ÿ“ฆ Model Manager
  • ๐Ÿ” Conversation Search
  • ๐Ÿ“ค Export Manager
  • ๐Ÿ“š Conversation History
  • โš™๏ธ Theme System

๐Ÿ—๏ธ Architecture

PocketAI acts as a lightweight, blazing-fast bridge between your terminal and your local LLMs.

       You (Terminal)
             โ”‚
             โ–ผ
       PocketAI CLI
             โ”‚
             โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” (Hybrid Mode)
             โ–ผ                  โ–ผ
      Local PC Ollama    Android (Termux) Ollama
             โ”‚                  โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ–ผ
               Local AI Models


๐Ÿ“‚ Project Structure

PocketAI/
โ”‚
โ”œโ”€โ”€ pocketai/
โ”‚   โ”œโ”€โ”€ ai.py
โ”‚   โ”œโ”€โ”€ config.py
โ”‚   โ”œโ”€โ”€ exporter.py
โ”‚   โ”œโ”€โ”€ markdown.py
โ”‚   โ”œโ”€โ”€ models.py
โ”‚   โ”œโ”€โ”€ search.py
โ”‚   โ”œโ”€โ”€ setup.py
โ”‚   โ”œโ”€โ”€ setup_ui.py
โ”‚   โ”œโ”€โ”€ storage.py
โ”‚   โ”œโ”€โ”€ theme.py
โ”‚   โ”œโ”€โ”€ ui.py
โ”‚   โ”œโ”€โ”€ updater.py
โ”‚   โ””โ”€โ”€ main.py
โ”‚
โ”œโ”€โ”€ chats/
โ”œโ”€โ”€ exports/
โ”œโ”€โ”€ PocketAI.spec
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE


โš™๏ธ Requirements & Tested Platforms

๐Ÿ’ป Desktop

  • Tested On: Windows 11 โœ… | Ubuntu 24.04 โœ…
  • Python 3.13+
  • Git
  • Requests & Rich Libraries
  • Ollama (Installed locally on your computer)

๐Ÿ“ฑ Android (Hybrid Mode)

  • Tested On: Android 13/14 (Termux) โœ…
  • Android Device
  • Termux (via F-Droid or GitHub โ€” Do not use Google Play version)
  • Ollama for Android (Running inside Termux)

๐Ÿ“ฅ Download

The easiest way to get started with PocketAI is by downloading the latest release from the GitHub Releases page.

๐ŸชŸ Windows

Option 1 โ€” Standalone EXE (Recommended)

  1. Download PocketAI.exe from the latest release.
  2. Double-click PocketAI.exe.
  3. Complete the first-run setup wizard.
  4. Start chatting with your local AI.

Option 2 โ€” ZIP Package

  1. Download the Windows ZIP package.
  2. Extract it to any folder.
  3. Run PocketAI.exe.
  4. Complete the first-run setup wizard.

Note: Ollama must already be installed and running with at least one model.


๐Ÿ› ๏ธ Build from Source

Developers who want to build PocketAI from source can clone the repository and install the required dependencies:

git clone [https://github.com/kongogaming/PocketAI.git](https://github.com/kongogaming/PocketAI.git)
cd PocketAI
pip install -r requirements.txt

Next, choose one of the two methods below to host your AI model.


๐Ÿ’ป Method 1 โ€” Run on Your Computer (Recommended)

Use this method if you want your PC's hardware to handle the AI processing.

  1. Install Ollama: Download from ollama.com/download.
  2. Download a Model:
ollama pull qwen2.5:1.5b
  1. Start Ollama:
ollama serve

๐Ÿ“ฑ Method 2 โ€” Android Hybrid Mode (Termux)

Use this method if you want your phone to run the AI, and connect to it from your PC over Wi-Fi.

  1. Install Termux: Download the latest APK from F-Droid (Recommended) or the Termux GitHub Releases.

โš ๏ธ Important: Do not download Termux from the Google Play Store, as that version is deprecated and broken.

  1. Update Packages:
pkg update && pkg upgrade
  1. Install Ollama & Download a Model: Follow standard Termux instructions for Ollama, then run:
ollama pull gemma3:270m
  1. Expose Ollama to your Local Network:
export OLLAMA_HOST=0.0.0.0:11434
ollama serve

โš ๏ธ Leave this Termux session running!

  1. Find your Phone's IP Address: Take note of your phone's local IP (e.g., 192.168.29.142).

๐Ÿ Run PocketAI

If you built from source, launch the app on your PC from the PocketAI folder:

python pocketai/main.py

๐Ÿš€ First Launch

PocketAI automatically detects whether a configuration exists. No manual config editing is required.

On first launch, the interactive setup wizard will:

  1. Connect to your Ollama server (or prompt for your phone's IP if using Hybrid Mode).
  2. Detect installed models.
  3. Recommend the best model.
  4. Generate your configuration file automatically.
  5. Launch the PocketAI dashboard.

โš™๏ธ Configuration Example

If you ever need to manually inspect the config.json that the wizard generates, it looks like this:

{
  "url": "[http://127.0.0.1:11434/api/chat](http://127.0.0.1:11434/api/chat)",
  "model": "qwen2.5:1.5b",
  "theme": "monokai",
  "stats": true
}

๐ŸŽฎ Commands

PocketAI comes with a rich set of built-in commands to manage your experience directly from the chat prompt.

Command Description
/help Show help menu
/about About PocketAI
/config View current configuration
/theme Browse available themes
/theme <name> Change theme
/models List installed Ollama models
/model Show current model
/model <name> Switch model
/save Save conversation
/history Browse saved chats
/load <id> Load conversation
/rename <id> <title> Rename conversation
/delete <id> Delete conversation
/search <text> Search current conversation
/export md Export as Markdown
/export txt Export as Text
/export pdf Export as PDF
/update Check for updates
/stats Show statistics status
/stats on Enable statistics
/stats off Disable statistics
/reset Clear conversation
/clear Clear terminal
/version Show PocketAI version
/bye Exit PocketAI

๐Ÿงฉ Supported Models

PocketAI works with any Ollama-compatible model.

Recommended:

  • โญ qwen2.5:1.5b
  • โญ qwen2.5:3b
  • โญ qwen3:4b
  • โญ gemma3:1b
  • gemma3:270m
  • llama3.2
  • phi4-mini
  • deepseek-r1
  • mistral
  • tinyllama

๐Ÿ› ๏ธ Troubleshooting

Ollama isn't detected

Make sure the server is actively running. Open a new terminal window and run:

ollama serve

No models found during Setup

You need to pull at least one model before PocketAI can use it. Run:

ollama pull qwen2.5:1.5b

Connection Refused (Hybrid Mode)

If connecting from your PC to your Android phone fails, ensure your phone is broadcasting on 0.0.0.0 by running export OLLAMA_HOST=0.0.0.0:11434 inside Termux before starting the server.


โ“ FAQ

Does PocketAI require the Internet? No, 100% of the processing happens locally on your machine once your models are downloaded.

Can I use it with any Ollama model? Yes. As long as Ollama supports it, PocketAI can chat with it.

Does it work on Android? Yes, using the Termux method outlined in the installation instructions.


โš ๏ธ Known Limitations

  • Internet web search is not currently supported.
  • Requires an active Ollama server to function.
  • Document RAG functionality is not yet available (Planned for v0.6).

๐Ÿ—บ๏ธ Roadmap

โœ… v0.1 - v0.4

  • Local AI Chat & Streaming Responses
  • Configuration & Theme Systems
  • Rich Terminal UI & Statistics
  • Conversation Memory, Save & Load
  • History Management & Dashboard Improvements

โœ… v0.5.1

  • Search Conversations
  • Markdown, TXT, and PDF Export
  • Update Checker
  • Model Manager Improvements
  • UI Polish & Better Help System

โœ… v0.5.2

  • First-Run Setup Wizard
  • Automatic Ollama Detection
  • Automatic Model Detection
  • Automatic Configuration Creation
  • Better EXE Distribution
  • Graceful Ctrl+C Exit Confirmation
  • Setup Wizard UI Polish

๐Ÿš€ Planned for v0.6

  • Automatic Self-Updater
  • GitHub Release Installer
  • Voice Input
  • Text-to-Speech
  • Chat With Documents (RAG)
  • Image Understanding
  • Plugin System
  • Performance Improvements

โค๏ธ Acknowledgements & Built With

PocketAI is powered by amazing open-source projects. Huge thanks to their maintainers:


๐Ÿค Contributing

Contributions are always welcome! Feel free to:

  • Fork the repository
  • Improve the code
  • Suggest features
  • Report bugs
  • Open Pull Requests

๐Ÿ“„ License

Licensed under the MIT License. See the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Author

Somya Ranjan Pal


โญ If you like PocketAI, consider giving the repository a star!

Made with โค๏ธ using Python, Rich, and Ollama.

Releases

Packages

Contributors

Languages