https://github.com/xingjian-zhang/mini_chat
Your minimal chatbot in terminal
https://github.com/xingjian-zhang/mini_chat
chatbot cli cli-app llm python terminal tui
Last synced: 2 months ago
JSON representation
Your minimal chatbot in terminal
- Host: GitHub
- URL: https://github.com/xingjian-zhang/mini_chat
- Owner: xingjian-zhang
- Created: 2025-03-18T23:47:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-19T13:41:28.000Z (over 1 year ago)
- Last Synced: 2025-04-11T05:58:16.953Z (about 1 year ago)
- Topics: chatbot, cli, cli-app, llm, python, terminal, tui
- Language: Python
- Homepage:
- Size: 341 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mini-chat ð
A minimal terminal-based chatbot using Rich for UI and direct HTTP requests for API communication.

## Features
- ðĻ Rich terminal UI with syntax highlighting
- âĻ Markdown support and streaming responses
- âïļ Profile and configuration management
- ðŠķ Extremely lightweight
## Installation
```bash
# Development setup
git clone https://github.com/xingjian-zhang/mini_chat.git
cd mini_chat
uv venv && uv pip install -e ".[dev]"
```
Set your API key using OpenAI's standard environment variable:
```bash
export OPENAI_API_KEY=your_key_here
```
## Configure Profiles
The chatbot supports multiple configuration profiles, allowing you to save different settings for different use cases. Profiles are stored as YAML files in the `~/.config/mini-chat/profiles/` directory.
Profiles are managed by directly editing the YAML files:
- Each profile is stored as a separate `.yaml` file
- The active profile is specified in `~/.config/mini-chat/active_profile.txt`
- The default profile is used if none is specified
You can switch between profiles within the application using:
```
/profile use
```
## Usage
Run with `mini-chat` or `mc`
### Basic Commands
- Type normally to chat with the AI
- `/help` - Show help
- `/clear` - Clear conversation
- `/exit` - Exit
- `/system ` - Add system instructions
- `/config` - View/change settings
- `/profile use ` - Switch between profiles
## Project Structure
```
mini_chat/
âââ __init__.py # Package initialization
âââ __main__.py # Application entry point
âââ api.py # API communication layer
âââ cli.py # Command-line interface handling
âââ config.py # Configuration management
âââ models.py # Data models
âââ ui.py # User interface components
âââ utils.py # Utility functions
```
## Development
```bash
# Lint and format
ruff check . --fix
ruff format .
# Run tests
pytest
```
See architecture.md for project structure details.
## Roadmap
- [ ] Support for additional LLM providers beyond OpenAI
- [ ] Conversation history management and persistence
- [ ] File attachment and context upload capabilities
- [ ] Custom themes and UI configurations
- [ ] MCP