Your AI copilot in the terminal - a LangGraph-powered CLI chatbot with long-term memory
Project description
Saarthi CLI
Saarthi (सारथी) means guide or companion in Hindi.
Your AI copilot in the terminal.
Saarthi is a LangGraph-powered CLI chatbot with persistent memory, real-time token streaming, MCP integration, and multi-provider LLM support. It runs entirely inside the terminal with a custom TUI built using prompt-toolkit.
No browser. No Electron. No cloud dashboard.
Demo
Features
- Short-term and long-term memory support
- Local SQLite-backed conversation persistence
- Named chat sessions with resume support
- Real-time token streaming
- Live tool-call visualisation
- MCP (Model Context Protocol) server support
- Interactive terminal UI built with
prompt-toolkit - Multi-provider LLM support
- Local-first architecture — no data leaves your machine
- Built-in developer tools
Supported providers
- OpenAI
- Google Gemini
- Mistral AI
More providers (including Anthropic and local model support) are planned.
Built-in tools
| Tool | Description |
|---|---|
bash |
Execute shell commands and Python snippets |
calculator |
Evaluate mathematical expressions |
ddg_tool |
DuckDuckGo web search |
wiki_tool |
Wikipedia lookup |
arxiv_tool |
arXiv paper search |
Installation
Using pip
pip install saarthi-cli
saarthi
Using uv
uv tool install saarthi-cli
saarthi
From source
git clone https://github.com/snehangshu2002/saarthi-cli.git
cd saarthi-cli
uv sync
uv run python main.py
Linux / macOS install script
curl -fsSL https://raw.githubusercontent.com/snehangshu2002/saarthi-cli/main/install.sh | bash
Note: The install script is for Linux and macOS only. Windows users should install via
pip install saarthi-clioruv tool install saarthi-cli.
First-time setup
On first launch, Saarthi walks you through a one-time setup:
- Choose a username
- Select an LLM provider
- Enter your API key (input is hidden)
Local storage
All configuration and memory are stored locally — nothing is sent to any external service beyond your chosen LLM provider.
| Platform | Storage Path |
|---|---|
| Windows | %LOCALAPPDATA%\saarthi\ |
| Linux / macOS | ~/.local/share/saarthi/ |
Contents:
settings.json— provider and user configmcp_config.json— MCP server definitions- SQLite database — conversation memory
Commands
| Command | Description |
|---|---|
/help |
Show available commands |
/new |
Start a new session |
/resume |
Resume an older session |
/settings |
View current configuration |
/mcp |
Show connected MCP servers |
/exit |
Quit Saarthi |
MCP support
Saarthi supports MCP-compatible servers over STDIO transport. Edit mcp_config.json in your local storage directory to add servers.
Default configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/dir"
],
"transport": "stdio"
}
}
}
You can connect MCP servers for filesystem access, browser automation, databases, coding agents, external APIs, and custom tools.
Memory system
Saarthi supports two memory layers:
- Short-term memory — active conversation context
- Long-term memory — persisted locally in SQLite across sessions
Conversation history can also be summarised automatically to reduce context size while preserving important information.
Roadmap
- Human-in-the-loop workflows
- Planning mode
- Autonomous execution mode
- Skill system support
- Export conversations
- Anthropic and local model support
- Plugin-style custom tools
- Better configuration management
- More CLI-agent style workflows
Project structure
src/chatbot_cli/
├── app.py
├── chatbot.py
├── ui.py
├── streaming.py
├── tool.py
├── memory.py
├── sessions.py
├── providers.py
├── mcp_client.py
├── settings.py
└── clipboard.py
License
MIT — see LICENSE for details.
Project details
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 saarthi_cli-0.1.2.tar.gz.
File metadata
- Download URL: saarthi_cli-0.1.2.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89bee51ed366226e9ecc75cff2d8a753ce0b35ebb4a790432498947297e8213b
|
|
| MD5 |
49373e583a6b4de28cd94d932e0238ad
|
|
| BLAKE2b-256 |
e1f7f01c704caf773e3797cbf7413c8fc85c4495a3cd0c19ca01cda20c9152b0
|
Provenance
The following attestation bundles were made for saarthi_cli-0.1.2.tar.gz:
Publisher:
publish.yml on snehangshu2002/saarthi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
saarthi_cli-0.1.2.tar.gz -
Subject digest:
89bee51ed366226e9ecc75cff2d8a753ce0b35ebb4a790432498947297e8213b - Sigstore transparency entry: 1569142647
- Sigstore integration time:
-
Permalink:
snehangshu2002/saarthi-cli@2c163cdae001510043b8ac07755c4d416f17ff88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/snehangshu2002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2c163cdae001510043b8ac07755c4d416f17ff88 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file saarthi_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: saarthi_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70d05d70951e0473f621a09eda950aa386fad0247e7f4885c6e7ef654d692660
|
|
| MD5 |
2717b54574b46efca3b72e255033aea2
|
|
| BLAKE2b-256 |
9da16eef72034083712e2bedec7d68366d5ddb4d0b783d01942710b8c4a72086
|
Provenance
The following attestation bundles were made for saarthi_cli-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on snehangshu2002/saarthi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
saarthi_cli-0.1.2-py3-none-any.whl -
Subject digest:
70d05d70951e0473f621a09eda950aa386fad0247e7f4885c6e7ef654d692660 - Sigstore transparency entry: 1569142661
- Sigstore integration time:
-
Permalink:
snehangshu2002/saarthi-cli@2c163cdae001510043b8ac07755c4d416f17ff88 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/snehangshu2002
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2c163cdae001510043b8ac07755c4d416f17ff88 -
Trigger Event:
workflow_dispatch
-
Statement type: