Your AI copilot in the terminal - a LangGraph-powered CLI chatbot with long-term memory
Project description
Saarthi CLI
AI copilot for the terminal.
Saarthi is a LangGraph-powered CLI chatbot with persistent memory, real-time token streaming, MCP integration, and multi-provider support. It runs entirely inside the terminal with a custom TUI built using prompt-toolkit.
No browser. No Electron. No cloud dashboard.
Current release:
0.1.0
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
- Built-in developer tools
Supported providers
- OpenAI
- Google Gemini
- Mistral AI
More providers 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
Install using pip
pip install saarthi-cli
Run:
saarthi
Install using uv
uv tool install saarthi-cli
Run:
saarthi
Install 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
First-time setup
On first launch, Saarthi will guide you through setup:
- Choose a username
- Select an LLM provider
- Enter your API key
API key input is hidden automatically.
Local storage
All configuration and memory are stored locally.
| Platform | Storage Path |
|---|---|
| Windows | %LOCALAPPDATA%\\saarthi\\ |
| Linux / macOS | ~/.local/share/saarthi/ |
This directory contains:
settings.jsonmcp_config.json- SQLite memory database
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.
Default MCP configuration:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/dir"
],
"transport": "stdio"
}
}
}
You can connect custom MCP servers for:
- Filesystem access
- Browser automation
- Databases
- Coding agents
- External APIs
- Custom tools
Memory system
Saarthi currently supports:
- Short-term memory for active conversations
- Long-term memory stored locally in SQLite
Conversation history can also be summarised automatically to reduce context size while preserving important information.
Upcoming features
Planned additions include:
- Human-in-the-loop workflows
- Planning mode
- Auto-toggle / autonomous execution mode
- Skill system support
- Export conversations
- More provider integrations
- 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
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.0.tar.gz.
File metadata
- Download URL: saarthi_cli-0.1.0.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e9a51639dfcb7e48ed0d7b5dca4c99979e9a1162ed0ad517c897c54c1504da2
|
|
| MD5 |
00c94ded9d485501238b7badb88c4f0d
|
|
| BLAKE2b-256 |
64bb8d8b370875755d68c969700d8f942fcd0e3eb305bac4b0bc5f5b095b9010
|
Provenance
The following attestation bundles were made for saarthi_cli-0.1.0.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.0.tar.gz -
Subject digest:
6e9a51639dfcb7e48ed0d7b5dca4c99979e9a1162ed0ad517c897c54c1504da2 - Sigstore transparency entry: 1568899743
- Sigstore integration time:
-
Permalink:
snehangshu2002/saarthi-cli@2f07e2a1ea8b133e6ea2ca249e3a15bad53abd4b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/snehangshu2002
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f07e2a1ea8b133e6ea2ca249e3a15bad53abd4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file saarthi_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: saarthi_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.6 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 |
258f98c509ca88a86d4f838e021e836fec172e394a0f8fba9a83ff28cb381d2f
|
|
| MD5 |
0dade753ed09daaf8113f7dbc83dffc4
|
|
| BLAKE2b-256 |
7f4332acaab20ecec718b1ce7063c3e5b9eb7e2cb3234dc1e9ce72ae9e6ac8b4
|
Provenance
The following attestation bundles were made for saarthi_cli-0.1.0-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.0-py3-none-any.whl -
Subject digest:
258f98c509ca88a86d4f838e021e836fec172e394a0f8fba9a83ff28cb381d2f - Sigstore transparency entry: 1568899768
- Sigstore integration time:
-
Permalink:
snehangshu2002/saarthi-cli@2f07e2a1ea8b133e6ea2ca249e3a15bad53abd4b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/snehangshu2002
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2f07e2a1ea8b133e6ea2ca249e3a15bad53abd4b -
Trigger Event:
push
-
Statement type: