Skip to main content

LiteMind CLI

  _     _ _       __  __ _           _    ____ _     ___ 
 | |   (_) |_ ___|  \/  (_)_ __   __| |  / ___| |   |_ _|
 | |   | | __/ _ \ |\/| | | '_ \ / _` | | |   | |    | | 
 | |___| | ||  __/ |  | | | | | | (_| | | |___| |___ | | 
 |_____|_|\__\___|_|  |_|_|_| |_|\__,_|  \____|_____|___|

         Terminal interface for LiteMindUI  ·  Chat · RAG

A fully-featured terminal user interface (TUI) for the LiteMindUI backend, built with Textual.

Chat with local and cloud AI models, and query your own documents — all from your terminal, with no browser required.


Features

Feature Description
💬 Chat Streaming AI chat with full conversation history
📚 RAG Upload documents, query your knowledge base
🔄 Provider switching Switch provider and model mid-session, inline in the toolbar

Requirements

  • Python ≥ 3.11
  • A running LiteMindUI backend at http://localhost:8000 (quick-start here)
  • uv (recommended) or pip

Quick start

1. Start the LiteMindUI backend

The CLI is a frontend — it needs the backend running first.

# Option A — Docker (easiest)
curl -fsSL https://raw.githubusercontent.com/debabratamishra/litemind-ui/main/install.sh | bash

# Option B — from source
git clone https://github.com/debabratamishra/litemind-ui.git
cd litemind-ui
make up

Backend will be available at http://localhost:8000.

2. Install and run litemind-cli

git clone https://github.com/debabratamishra/litemind-cli.git
cd litemind-cli

# Install dependencies
uv sync

# (Optional) configure environment
cp .env.example .env
# edit .env if your backend runs somewhere other than localhost:8000

# Launch the TUI
uv run litemind-cli

Or install globally as a tool:

uv tool install .
litemind-cli

Usage

Usage: litemind-cli [OPTIONS] COMMAND [ARGS]...

  LiteMind CLI — terminal interface for the LiteMindUI backend.

Options:
  -b, --backend TEXT   Backend URL  [env: FASTAPI_URL]
  -m, --model TEXT     Default model name  [env: DEFAULT_MODEL]
  --version            Show version and exit
  --help               Show this message and exit

Commands:
  chat    Open the TUI on the Chat tab
  rag     Open the TUI on the RAG tab
  status  Check backend connectivity and print available models

Examples

# Open on the Chat tab (default)
litemind-cli

# Open directly on the RAG tab
litemind-cli rag

# Use a remote backend
litemind-cli --backend http://192.168.1.10:8000

# Override model at launch
litemind-cli --model mistral:7b

# Check if the backend is reachable
litemind-cli status

Inside the TUI

Switching providers

The toolbar at the top of both Chat and RAG tabs has an inline provider selector:

Selection What appears
🦙 Ollama Model dropdown — auto-populated with your local + cloud Ollama models
🌐 OpenRouter Model text field + API key + API base URL
NIM Model text field + API key + API base URL (pre-filled)

API base URLs are pre-filled automatically when you switch provider. You only need to enter your API key.

OpenRouter model format: provider/model-name
e.g. openai/gpt-4o, anthropic/claude-3.5-sonnet, meta-llama/llama-3.3-70b-instruct

NIM model format: org/model-name
e.g. meta/llama-3.3-70b-instruct, nvidia/llama-3.1-nemotron-70b-instruct

RAG — uploading documents

In the RAG tab, enter one or more file paths (space-separated) in the upload field and click Upload:

/Users/me/docs/report.pdf /Users/me/notes/meeting.md

Supported formats: PDF, DOCX, TXT, MD, CSV, XLSX, PPTX, HTML, ODT, RTF, YAML, JSON

Keyboard shortcuts

Key Action
1 Switch to Chat tab
2 Switch to RAG tab
3 Switch to Settings tab
Enter Send message
Ctrl+L Clear current conversation
Ctrl+N Start a new chat session
Ctrl+R Refresh RAG file list (RAG tab only)
Ctrl+S Save settings (Settings tab only)
Q Quit

Configuration

All options can be set in a .env file (copy from .env.example) or as environment variables. CLI flags always take precedence.

Variable Default Description
FASTAPI_URL http://localhost:8000 LiteMindUI backend URL
DEFAULT_BACKEND ollama Provider: ollama · openrouter · nim
DEFAULT_MODEL llama3.2 Default model name
API_BASE (empty) Override provider API base URL
API_KEY (empty) Provider API key
CONNECT_TIMEOUT 5 HTTP connect timeout in seconds
READ_TIMEOUT 600 HTTP read/stream timeout in seconds
LOG_LEVEL INFO DEBUG · INFO · WARNING · ERROR

Example .env for OpenRouter:

FASTAPI_URL=http://localhost:8000
DEFAULT_BACKEND=openrouter
DEFAULT_MODEL=openai/gpt-4o-mini
API_KEY=sk-or-your-key-here

Project layout

litemind_cli/
  config.py              env / config loading (singleton)
  app.py                 Textual App — MainScreen + SplashScreen
  main.py                Typer CLI entrypoint
  services/
    backend_service.py   health check, model listing
    chat_service.py      streaming chat (SSE parser included)
    rag_service.py       file upload, RAG query streaming
  screens/
    splash_screen.py     ASCII art intro (auto-dismisses after 3 s)
    chat_screen.py       Chat panel (Widget)
    rag_screen.py        RAG panel (Widget)
    settings_screen.py   Settings panel (Widget)
  widgets/
    message_list.py      scrollable chat bubble widget

Dependencies

Package Purpose
textual TUI framework
typer CLI interface
httpx Async HTTP client
python-dotenv .env loading
rich Terminal formatting

Related

  • litemind-ui — FastAPI backend + Streamlit web frontend
  • API contract — HTTP API reference for frontend developers

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litemind_cli-0.0.1.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litemind_cli-0.0.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file litemind_cli-0.0.1.tar.gz.

File metadata

  • Download URL: litemind_cli-0.0.1.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for litemind_cli-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b3a824916ce9e4d2f4991b0dddec621bebed99119b58f8cfdb089658380fd912
MD5 3deb29ad667ac26fc0dd7ae588bc6127
BLAKE2b-256 3268d7f1880c2b917b8fa5293c9f18338136c5a90c8460d390f91a28d64b80d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for litemind_cli-0.0.1.tar.gz:

Publisher: publish.yml on debabratamishra/litemind-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file litemind_cli-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: litemind_cli-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for litemind_cli-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd0d2f35e3c44f5bfb68b3cd9c6c074a972abfbd0cc16869549a5ef04db4eef3
MD5 28cb60d14f686c8ef8097b8bb096e6fb
BLAKE2b-256 7e6c6912a15daa51b2ea9ed8fd0063a5a39c8b3d509b685e22ba776a006e66c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for litemind_cli-0.0.1-py3-none-any.whl:

Publisher: publish.yml on debabratamishra/litemind-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.3

2 files

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page