Skip to main content

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

PyPI version Python GitHub


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:

  1. Choose a username
  2. Select an LLM provider
  3. 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.json
  • mcp_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

saarthi_cli-0.1.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saarthi_cli-0.1.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

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

Hashes for saarthi_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e9a51639dfcb7e48ed0d7b5dca4c99979e9a1162ed0ad517c897c54c1504da2
MD5 00c94ded9d485501238b7badb88c4f0d
BLAKE2b-256 64bb8d8b370875755d68c969700d8f942fcd0e3eb305bac4b0bc5f5b095b9010

See more details on using hashes here.

Provenance

The following attestation bundles were made for saarthi_cli-0.1.0.tar.gz:

Publisher: publish.yml on snehangshu2002/saarthi-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for saarthi_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 258f98c509ca88a86d4f838e021e836fec172e394a0f8fba9a83ff28cb381d2f
MD5 0dade753ed09daaf8113f7dbc83dffc4
BLAKE2b-256 7f4332acaab20ecec718b1ce7063c3e5b9eb7e2cb3234dc1e9ce72ae9e6ac8b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for saarthi_cli-0.1.0-py3-none-any.whl:

Publisher: publish.yml on snehangshu2002/saarthi-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page