@titenq/mimo-tui
v1.0.1
Published
Terminal UI for chatting with MiMo models through Xiaomi's OpenAI-compatible API
Maintainers
Readme
MiMo TUI
TypeScript terminal UI for chatting with MiMo models through Xiaomi's OpenAI-compatible API.
Features
- Interactive terminal chat UI built with
Ink - Support for
mimo-v2-flash,mimo-v2-pro,mimo-v2-omni, andmimo-v2-tts - Real-time streaming responses
Markdownrendering inside theConversationpanelSyntax highlightingfor code blocks- Manual scrolling in
Conversation - SQLite-backed persistent chat history with multiple conversations
- Open previous chats from the
Chatssidebar, create a new chat, and delete saved chats - Copy the last response to the clipboard
- Conversation focus mode for easier reading and mouse selection
- TTS generation in
mp3orwav - Audio files saved to the system home directory with a clickable path for playback
Requirements
- Node.js 22.5+
- A valid MiMo API key
How to create a MiMo API key
Click
Get API keyClick
Sign in with Google, or clickSign upwith your email and passwordAccept the options, create a password, and click
Create API Key
Install
Install globally:
npm install -g @titenq/mimo-tuiConfigure the API key
Create a file named config.json with the following content:
{
"mimo_api_key": "your_api_key_here"
}Save this config.json in one of these paths:
- Linux:
~/.config/mimo/config.json - macOS:
~/Library/Application Support/mimo/config.json - Windows:
C:\Users\<your-user>\AppData\Roaming\mimo\config.json
When the app starts and the config file does not exist or is invalid, the TUI opens an API key setup screen. From there the user can:
- press
Eto type or paste the API key and save the JSON file automatically - create the file manually and press
Rto reload - press
Qto quit
Run
Run the globally installed command:
mimo-tuiOr run without global installation:
npx @titenq/mimo-tuiHow the TUI works
Layout
MiMo TUI: top bar with current focus and main shortcutsConversation: main panel for prompts, responses, Markdown, and scrollingSettings: controls for the active modelModel Details: model category, context length, max output, and featuresChats: persisted chat historyPrompt: multiline input area
Supported models
mimo-v2-flashmimo-v2-promimo-v2-omnimimo-v2-tts
Chat features
- Conversation history is stored in SQLite in the user app data directory
- The app loads the most recent chat on startup
- Persisted context is injected back into the system prompt to restore continuity
- The
Chatspanel shows recent chats in its own viewport - When there are more chats than visible space,
↑ More aboveand↓ More beloware shown
TTS features
When mimo-v2-tts is selected:
- the TUI automatically starts a new chat
- the prompt placeholder switches to TTS input text
- TTS chats are not persisted in history
- generated audio is saved to the user's home directory
- the file path is shown in
Conversation
TTS defaults
Response Format:mp3Voice:default_en
Available TTS voices
mimo_defaultdefault_endefault_zh
TTS works best with English text.
TTS output formats
mp3wavpcm16whenstreamis enabled
Shortcuts
Global
Tab: switch focus between panelsCtrl+C: abort the current response or exit the appCtrl+N: start a new chatCtrl+F: toggle conversation focus modeCtrl+Y: copy the last response to the clipboardCtrl+R: clear the current conversation
Prompt
Enter: send the current messageCtrl+J: insert a new lineLeft / Right: move the cursorHome / End: jump to the beginning or endBackspace: delete backwardCtrl+D: delete forward- pasting multiple lines automatically expands the prompt box
Conversation
Up / Down: scroll by linePageUp / PageDown: scroll by page
Chats
Enter: open the selected chatCtrl+Delete: delete the selected chat
Clipboard
Ctrl+Y copies the last MiMo response using clipboardy.
Notes
- TTS only uses the voices currently accepted by this API integration
- The audio file path is shown in
Conversationwith visual highlighting - Click behavior for the file path may vary depending on your terminal or IDE
Development
Install dependencies for local development:
npm installFor local development, create a .env file at the project root with:
MIMO_API_KEY=your_api_key_hereRun in development:
npm run devWatch mode:
npm run dev:watchBuild:
npm run buildRun the compiled build:
npm run startQuality checks:
npm run lintRun only type-checking:
npm run type-checkMain stack
TypeScriptReactInkmarkedcli-highlightclipboardynode:sqlite
License
Distributed under GPL-3.0. See LICENSE.txt.
⭐ Stargazers
This repository has no stargazers yet. Be the first!
