MCP HubMCP Hub
luohy15

y-cli

by: luohy15

A Tiny Terminal Chat App for AI Models with MCP Client Support

117created 04/02/2025
Visit
Terminal
Chat

📌Overview

Purpose:
Provide a lightweight, terminal-based chat interface for interacting with AI models, supporting flexible bot and storage configurations.

Overview:
y-cli is a compact command-line chat application that enables users to converse with AI models directly from the terminal. It supports a variety of storage backends (local and cloud) and multiple AI platforms, offering adaptable workflows, integration with external tools via MCP, and developer-friendly configuration options for bots and prompts.

Key Features:

  • Flexible Storage Options:
    Store conversations locally in JSONL files or use Cloudflare KV/R2 for cloud-based storage and backup, ensuring data accessibility and redundancy.

  • Multi-Bot and API Integration:
    Support for multiple bot configurations, enabling connections to various AI services (OpenAI, Dify, Deepseek, etc.) with customizable endpoints and streaming formats for diverse conversational experiences.


y-cli 🚀

A tiny command-line AI chat application that brings conversational AI to your terminal.

For a web-based version, check out y-gui.


Features


Demo

asciicast

Multiple bot configurations

➜  ~ y-cli bot list
Name         API Key      API Type    Base URL                             Model                                Print Speed    Description    OpenRouter Config    MCP Servers    Reasoning Effort
-----------  -----------  ----------  -----------------------------------  -----------------------------------  -------------  -------------  -------------------  -------------  ------------------
default      sk-or-v1...  N/A         https://gateway.ai.cloudflare.co...  google/gemini-2.0-flash-001          None            N/A            Yes                  No             N/A
claude       sk-or-v1...  N/A         https://gateway.ai.cloudflare.co...  anthropic/claude-3.7-sonnet:beta     None             N/A            Yes                  todo           N/A
o3-mini      sk-or-v1...  N/A         https://gateway.ai.cloudflare.co...  openai/o3-mini                       None             N/A            Yes                  No             low
ds-chat      sk-or-v1...  N/A         https://gateway.ai.cloudflare.co...  deepseek/deepseek-chat-v3-0324:free  None            N/A            Yes                  tavily         N/A
dify-bot     app-2drF...  dify        https://api.dify.ai/v1               None             N/A            No                   No             N/A

Multiple MCP servers

➜  ~ y-cli mcp list
Name            Type    Command/URL          Arguments/Token    Environment     Auto-Confirm
--------------  ------  -------------------  -----------------  --------------  --------------
brave-search    sse     https://router.m...                                     brave_web_s...
todo            stdio   uvx                  mcp-todo
exa-mcp-server  stdio   npx                  exa-mcp-server     EXA_API_KEY...

Quick Start

Prerequisites

  • uv (for Python management and running the CLI)
  • OpenRouter API key (get one here)

Setup

  1. Install uv: uv installation guide
  2. Obtain and save your OpenRouter API key.

Running

Without installation:

uvx y-cli

With installation:

uv tool install y-cli

Initialization

y-cli init

Start Chat

y-cli chat

Usage

y-cli [OPTIONS] COMMAND [ARGS]...

Main Commands

  • chat: Start or continue a chat conversation
  • list: List chat conversations (with filtering)
  • share: Generate a shareable chat link
  • bot: Manage bot configurations
    • add, list, delete
  • mcp: Manage MCP server configurations
    • add, list, delete
  • daemon: Manage the MCP daemon
    • start, stop, status, log, restart
  • prompt: Manage prompt configurations
    • add, list, delete

Options

  • --help: Show help message and exit

Documentation

See the deepwiki page for full documentation and guides.