Mochi Coco 🍡
.-===-.
|[:::]|
`-----´
A beautiful, feature-rich CLI chat application for interacting with LLMs via Ollama with streaming responses, session persistence, markdown rendering and tool support.
Installation
pip install mochi-coco
Quick Start
- Make sure you have Ollama running locally
- Pull a model:
ollama pull gpt-oss:20b - Start chatting:
mochi-coco
- Or directly open a specific chat session:
mochi-coco --chat 1
Features
- 🚀 Streaming responses - Real-time chat with immediate feedback
- ⚡ Stream interruption - Press ESC during streaming to interrupt and save partial responses
- 💾 Session persistence - Your conversations are automatically saved in the terminal's directory and resumable
- 🎨 Rich markdown rendering - Beautiful formatting with syntax highlighting and toggle rendering mid session
- 🔄 Model switching - Change models mid-conversation
- ✏️ Message editing - Edit previous messages and start from there
- 🧠 Thinking blocks - Toggle display of model reasoning (when supported by model + only in markdown mode)
- 📋 Session management - Switch between different chat sessions
- 🎛️ Interactive menus - Easy-to-use command interface with clear instructions
- ⚡ Background summarization - Automatic conversation summaries
- 📝 System Prompts - Drop
*.mdor*.txtfiles into thesystem_promptsfolder in the root directory of the terminal to use as system prompts. - Tool support - Let the LLM use tools to you've created by placing them in the
toolsfolder in the root directory of the terminal.
Session Commands
While chatting, you can use these commands:
/menu- Open the main menu with all options OR type in the following shortcuts:/chats- Switch between existing sessions or create new ones/models- Change the current model/markdown- Toggle markdown rendering on/off/thinking- Toggle thinking blocks display (only when markdown rendering is enabled)/system- Change system prompt during chat session/tools- Enable/disable tools feature (only when/toolsfolder exists in the terminal's root directory)
/status- Show status information about the current session (e.g. model, tools enabled/disabled, context window size, etc.)/edit- Edit a previous message and continue from there/exitor/quit- Exit the application
Usage
Basic Chat
mochi-coco
Custom Ollama Host
mochi-coco --host http://localhost:11434
Example Session
$ mochi-coco
╭─────────────────────────────────────── 🍡 Welcome to Mochi-Coco! ───────────────────────────────────────╮
│ │
│ 🤖 AI Chat with Style | v0.4.0 │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────── 💬 Previous Sessions ──────────────────────────────────────────╮
│ │
│ ┏━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓ │
│ ┃ # ┃ Session ID ┃ Model ┃ Preview ┃ Messages ┃ │
│ ┡━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩ │
│ │ 1 │ bc8a8d5c8e │ gpt-oss:20b │ Who was the first Avenger in the │ 26 │ │
│ │ │ │ │ MCU and who th... │ │ │
│ └─────┴──────────────┴──────────────────────┴─────────────────────────────────────┴──────────┘ │
│ │
│ 💡 Options: │
│ • 📝 Select session (1-1) │
│ • 🆕 Type 'new' for new chat │
│ • 🗑️ Type '/delete <number>' to delete session │
│ • 👋 Type 'q' to quit │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice: new
╭─ 🤖 Available Models ───────────────────────────────────────────────────────────────────────────────────╮
│ ╭─────┬───────────────────────────┬──────────────┬─────────────────┬──────────┬───────╮ │
│ │ # │ Model Name │ Size (MB) │ Family │ Max. Cxt │ Tools │ │
│ ├─────┼───────────────────────────┼──────────────┼─────────────────┼──────────┼───────┤ │
│ │ 1 │ qwen3-vl:32b │ 19941.6 │ qwen3vl │ 262144 │ Yes │ │
│ │ 2 │ qwen3-coder:latest │ 17697.0 │ qwen3moe │ 262144 │ Yes │ │
│ │ 3 │ gpt-oss:20b │ 13141.8 │ gptoss │ 131072 │ Yes │ │
│ │ 4 │ qwen3:14b │ 8846.5 │ qwen3 │ 40960 │ Yes │ │
│ │ 5 │ qwen3:latest │ 4983.3 │ qwen3 │ 40960 │ Yes │ │
│ │ 6 │ qwen3:30b │ 17697.0 │ qwen3moe │ 262144 │ Yes │ │
│ │ 7 │ llama3.2:latest │ 1925.8 │ llama │ 131072 │ Yes │ │
│ │ 8 │ mistral-small3.2:latest │ 14474.3 │ mistral3 │ 131072 │ Yes │ │
│ ╰─────┴───────────────────────────┴──────────────┴─────────────────┴──────────┴───────╯ │
│ │
│ 💡 Options: │
│ • 🔢 Select model (1-8) │
│ • 👋 Type 'q' to quit │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice: 3
╭────────────────────────────────────────── Markdown Rendering ───────────────────────────────────────────╮
│ 📝 Enable markdown formatting for responses? │
│ This will format code blocks, headers, tables, etc. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enable markdown? [y/n] (y): y
╭──────────────────────────────────────── Thinking Block Display ─────────────────────────────────────────╮
│ 🤔 Show model's thinking process in responses? │
│ This will display thinking blocks as formatted quotes. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Show thinking blocks? [y/n] (n): y
╭─ 🔧 System Prompts ─────────────────────────────────────────────────────────────────────────────────────╮
│ ╭─────┬─────────────────┬─────────────────────────────────────┬────────────╮ │
│ │ # │ Filename │ Preview │ Word Count │ │
│ ├─────┼─────────────────┼─────────────────────────────────────┼────────────┤ │
│ │ 1 │ AGENTS.md │ You are a helpful agent │ 5 │ │
│ ╰─────┴─────────────────┴─────────────────────────────────────┴────────────╯ │
│ │
│ 💡 Options: │
│ • 📝 Select system prompt (1-1) │
│ • 🆕 Type 'no' for no system prompt │
│ • 🗑️ Type '/delete <number>' to delete a system prompt │
│ • 👋 Type 'q' to quit │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice: no
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ 💡 System prompt removed. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Success ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ Switched to session a102ba9d9a with gpt-oss:20b │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Info ──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ The current model 'gpt-oss:20b' doesn't support structured summarization. Please select a compatible │
│ model to use for generating conversation summaries. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ 🤖 Available Models ───────────────────────────────────────────────────────────────────────────────────╮
│ ╭─────┬───────────────────────────┬──────────────┬─────────────────┬──────────┬───────╮ │
│ │ # │ Model Name │ Size (MB) │ Family │ Max. Cxt │ Tools │ │
│ ├─────┼───────────────────────────┼──────────────┼─────────────────┼──────────┼───────┤ │
│ │ 1 │ qwen3-vl:32b │ 19941.6 │ qwen3vl │ 262144 │ Yes │ │
│ │ 2 │ qwen3-coder:latest │ 17697.0 │ qwen3moe │ 262144 │ Yes │ │
│ │ 3 │ qwen3:latest │ 4983.3 │ qwen3 │ 40960 │ Yes │ │
│ │ 4 │ llama3.2:latest │ 1925.8 │ llama │ 131072 │ Yes │ │
│ │ 5 │ mistral-small3.2:latest │ 14474.3 │ mistral3 │ 131072 │ Yes │ │
│ ╰─────┴───────────────────────────┴──────────────┴─────────────────┴──────────┴───────╯ │
│ │
│ 💡 Options: │
│ • 🔢 Select model (1-5) │
│ • 👋 Type 'q' to quit ││ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice: 3
╭─ Success ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ Summary model set to 'qwen3:latest' for this session │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ 💬 Chat Session ───────────────────────────────────────────────────────────────────────────────────────╮
│ Session ID: a102ba9d9a │
│ Model: gpt-oss:20b │
│ Summary Model: qwen3:latest │
│ Context Window: No valid context data in session │
│ Tools: None │
│ Tool Policy: Not applicable │
│ Markdown: Enabled │
│ Thinking Blocks: Enabled │
│ Summary: Not available │
│ │
│ 💡 Available Commands: │
│ • /menu - Open the main menu │
│ • /status - Show session information │
│ • /edit - Edit a previous message │
│ • /exit or /quit - Exit the application │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────╮
│ 🧑 You │
╰────────╯
Chat Session Menu
During a chat session it is possible to open the chat menu with the command /menu. Select one of the options by typing the number (e.g. 1).
Tip:
Each of the available options in this menu is also a command itself and can therefore be directly executed without opening the chat menu. For example, typing
/1will switch to a different chat session. Or/5to toggle the tool feature and open the tool menu.
╭────────╮
│ 🧑 You │
╰────────╯
/menu
╭─ ⌨️ Available Commands ───────────────────────────────────────────────────────────────────────╮
│ ╭──────────────┬────────────────────────┬─────────────────────────────────────╮ │
│ │ /1 │ 💬 Switch Sessions │ Change to different chat session │ │
│ │ /2 │ 🤖 Change Model │ Select a different AI model │ │
│ │ /3 │ 📝 Toggle Markdown │ Enable/disable markdown rendering │ │
│ │ /4 │ 🤔 Toggle Thinking │ Show/hide thinking blocks │ │
│ │ /5 │ 📂 Enable Tools │ Select tools to use │ │
│ │ /6 │ 🔧 System Prompt │ Select different system prompt │ │
│ │ /help │ 📚 Help │ Show all available commands │ │
│ │ /quit │ 👋 Exit │ Exit the application │ │
│ ╰──────────────┴────────────────────────┴─────────────────────────────────────╯ │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice:
System Prompts
System prompts have to be provided within the /system_prompts folder at the terminals root directory. Only *.md or *.txt files are supported.
Find more here: User Guide System Prompts
The system prompts can be selected when creating a new chat session:
╭─ 🔧 System Prompts ──────────────────────────────────────────────────────────────────────╮
│ ╭─────┬─────────────────┬─────────────────────────────────────┬────────────╮ │
│ │ # │ Filename │ Preview │ Word Count │ │
│ ├─────┼─────────────────┼─────────────────────────────────────┼────────────┤ │
│ │ 1 │ AGENTS.md │ You are a helpful agent │ 5 │ │
│ ╰─────┴─────────────────┴─────────────────────────────────────┴────────────╯ │
│ │
│ 💡 Options: │
│ • 📝 Select system prompt (1-1) │
│ • 🆕 Type 'no' for no system prompt │
│ • 🗑️ Type '/delete <number>' to delete a system prompt │
│ • 👋 Type 'q' to quit │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice:
... or by opening the chat session menu and selecting the corresponding option
╭────────╮
│ 🧑 You │
╰────────╯
/menu
╭─ ⌨️ Available Commands ──────────────────────────────────────────────────────────────────╮
│ ╭──────────────┬────────────────────────┬─────────────────────────────────────╮ │
│ │ /1 │ 💬 Switch Sessions │ Change to different chat session │ │
│ │ /2 │ 🤖 Change Model │ Select a different AI model │ │
│ │ /3 │ 📝 Toggle Markdown │ Enable/disable markdown rendering │ │
│ │ /4 │ 🤔 Toggle Thinking │ Show/hide thinking blocks │ │
│ │ /5 │ 📂 Enable Tools │ Select tools to use │ │
│ │ /6 │ 🔧 System Prompt │ Select different system prompt │ │
│ │ /quit /q │ 👋 Exit │ Exit the menu │ │
│ ╰──────────────┴────────────────────────┴─────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice: 6
╭─ 🔧 System Prompts ──────────────────────────────────────────────────────────────────────╮
│ ╭─────┬─────────────────┬─────────────────────────────────────┬────────────╮ │
│ │ # │ Filename │ Preview │ Word Count │ │
│ ├─────┼─────────────────┼─────────────────────────────────────┼────────────┤ │
│ │ 1 │ AGENTS.md │ You are a helpful agent │ 5 │ │
│ ╰─────┴─────────────────┴─────────────────────────────────────┴────────────╯ │
│ │
│ 💡 Options: │
│ • 📝 Select system prompt (1-1) │
│ • 🆕 Type 'no' for no system prompt │
│ • 🗑️ Type '/delete <number>' to delete a system prompt │
│ • 👋 Type 'q' to quit │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice:
... or by typing the shortcut /system into the chat
╭────────╮
│ 🧑 You │
╰────────╯
/system
╭─ 🔧 System Prompts ──────────────────────────────────────────────────────────────────────╮
│ ╭─────┬─────────────────┬─────────────────────────────────────┬────────────╮ │
│ │ # │ Filename │ Preview │ Word Count │ │
│ ├─────┼─────────────────┼─────────────────────────────────────┼────────────┤ │
│ │ 1 │ AGENTS.md │ You are a helpful agent │ 5 │ │
│ ╰─────┴─────────────────┴─────────────────────────────────────┴────────────╯ │
│ │
│ 💡 Options: │
│ • 📝 Select system prompt (1-1) │
│ • 🆕 Type 'no' for no system prompt │
│ • 🗑️ Type '/delete <number>' to delete a system prompt │
│ • 👋 Type 'q' to quit │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice:
Edit Menu
With the in-chat command /edit you can edit messages from the current chat history.
╭────────╮
│ 🧑 You │
╰────────╯
/edit
✏️ Edit Message
╭─ ✏️ Edit Messages ────────────────────────────────────────────────────────────────────────────────────────╮
│ ╭─────┬──────────────┬───────────────────────────────────────────────────────────────────────────╮ │
│ │ # │ Role │ Preview │ │
│ ├─────┼──────────────┼───────────────────────────────────────────────────────────────────────────┤ │
│ │ 1 │ 🧑 User │ Who was the first Avenger in the MCU? │ │
│ │ - │ 🤖 Assistant │ **Captain America (Steve Rogers)** is widely considered the first Aven... │ │
│ ╰─────┴──────────────┴───────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Select a user message (1-1) or 'q' to cancel │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Disclaimer
Editing a message will continue the chat from this point. All previously trailing messages - whether user or assistant - will be deleted.
Tool Menu
The tool feature depends on the existence of a /tools folder in the terminal's root directory and python functions. Tools are not enabled by default.
Get more information how to use the tool feature here: User Guide: Tools
╭────────╮
│ 🧑 You │
╰────────╯
/5
No tools currently selected
╭─ 🛠️ Tool Selection ──────────────────────────────────────────────────────────────────────╮
│ Individual Tools │
│ ╭───────┬───────────────────────────┬──────────────────────────────────────────────────╮ │
│ │ # │ Tool Name │ Description │ │
│ ├───────┼───────────────────────────┼──────────────────────────────────────────────────┤ │
│ │ 1 │ add_numbers │ Add two numbers together. │ │
│ │ 2 │ subtract_numbers │ Subtract the second number from the first │ │
│ │ │ │ number. │ │
│ │ 3 │ multiply_numbers │ Multiply two numbers together. │ │
│ │ 4 │ divide_numbers │ Divide the first number by the second number. │ │
│ │ 5 │ power_calculation │ Calculate base raised to the power of exponent. │ │
│ │ 6 │ square_root │ Calculate the square root of a number. │ │
│ │ 7 │ calculate_percentage │ Calculate what percentage one number is of │ │
│ │ │ │ another. │ │
│ │ 8 │ get_current_time │ Get the current date and time. │ │
│ │ 9 │ generate_random_number │ Generate a random number between two values. │ │
│ │ 10 │ flip_coin │ Flip a virtual coin. │ │
│ │ 11 │ count_words │ Count the number of words in a text. │ │
│ │ 12 │ reverse_text │ Reverse the given text. │ │
│ │ 13 │ roll_dice │ Roll one or more dice with specified number of │ │
│ │ │ │ sides. │ │
│ ╰───────┴───────────────────────────┴──────────────────────────────────────────────────╯ │
│ │
│ Tool Groups │
│ ╭──────────┬───────────────────────────┬───────────────────────────────────────────────╮ │
│ │ Letter │ Group Name │ Tools Included │ │
│ ├──────────┼───────────────────────────┼───────────────────────────────────────────────┤ │
│ │ a │ basic_calculator │ add_numbers, subtract_numbers, │ │
│ │ │ │ multiply_numbers... │ │
│ │ b │ fun_tools │ flip_coin, roll_dice, reverse_text, │ │
│ │ │ │ generate_ra... │ │
│ │ c │ math │ add_numbers, subtract_numbers, │ │
│ │ │ │ multiply_numbers... │ │
│ │ d │ utilities │ get_current_time, generate_random_number, │ │
│ │ │ │ flip_... │ │
│ ╰──────────┴───────────────────────────┴───────────────────────────────────────────────╯ │
│ │
│ 💡 Options: │
│ • 🔢 Select tools by numbers (e.g., 1,3,4 or 1-3) │
│ • 📂 Select a group by letter (e.g., a) │
│ • ❌ Type 'none' to clear selection │
│ • 🔄 Type 'reload' to refresh tools │
│ • ↩️ Press Enter to keep current selection │
│ • 👋 Type 'q' to cancel │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Enter your choice:
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 mochi_coco-0.6.1.tar.gz.
File metadata
- Download URL: mochi_coco-0.6.1.tar.gz
- Upload date:
- Size: 194.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f68b30bb125b35be6e6509636aac53e25eef4735cc2f33f5860f6440adbd09cb
|
|
| MD5 |
3a8baf6105d26a01f035e06ae2b05505
|
|
| BLAKE2b-256 |
344aff04d105b33e80bcd18ed3a02726cbd8a11ba2d39e26314716e8ad8fd081
|
File details
Details for the file mochi_coco-0.6.1-py3-none-any.whl.
File metadata
- Download URL: mochi_coco-0.6.1-py3-none-any.whl
- Upload date:
- Size: 108.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.7.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a55c686809d8ac0e92019ff34572beeb081b6f2d40b26dd7e9b04483209635af
|
|
| MD5 |
1708983793436c48e5c6816d4a199637
|
|
| BLAKE2b-256 |
a9211b24e204fc185df9f13d747c884f16681bb17bd412d6ecc6fd9cdf35cd42
|